Documentation ¶
Overview ¶
Package msc2946 'Spaces Summary' implements https://github.com/matrix-org/matrix-doc/pull/2946
Index ¶
Constants ¶
View Source
const ( ConstCreateEventContentKey = "org.matrix.msc1772.type" ConstSpaceChildEventType = "org.matrix.msc1772.space.child" ConstSpaceParentEventType = "org.matrix.msc1772.space.parent" )
Variables ¶
This section is empty.
Functions ¶
func Defaults ¶ added in v0.3.7
func Defaults(r *gomatrixserverlib.MSC2946SpacesRequest)
Defaults sets the request defaults
func Enable ¶
func Enable( base *setup.BaseDendrite, rsAPI roomserver.RoomserverInternalAPI, userAPI userapi.UserInternalAPI, fsAPI fs.FederationSenderInternalAPI, keyRing gomatrixserverlib.JSONVerifier, ) error
Enable this MSC
func SpaceTarget ¶
func SpaceTarget(he *gomatrixserverlib.HeaderedEvent) string
SpaceTarget returns the destination room ID for the space event. This is either a child or a parent depending on the event type.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) References ¶
func (d *DB) References(ctx context.Context, roomID string) ([]*gomatrixserverlib.HeaderedEvent, error)
func (*DB) StoreReference ¶
func (d *DB) StoreReference(ctx context.Context, he *gomatrixserverlib.HeaderedEvent) error
type Database ¶
type Database interface { // StoreReference persists a child or parent space mapping. StoreReference(ctx context.Context, he *gomatrixserverlib.HeaderedEvent) error // References returns all events which have the given roomID as a parent or child space. References(ctx context.Context, roomID string) ([]*gomatrixserverlib.HeaderedEvent, error) }
func NewDatabase ¶
func NewDatabase(dbOpts *config.DatabaseOptions) (Database, error)
NewDatabase loads the database for msc2836
Click to show internal directories.
Click to hide internal directories.