Documentation
¶
Overview ¶
Package msc2836 'Threading' implements https://github.com/matrix-org/matrix-doc/pull/2836
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Enable ¶
func Enable( base *setup.BaseDendrite, rsAPI roomserver.RoomserverInternalAPI, fsAPI fs.FederationSenderInternalAPI, userAPI userapi.UserInternalAPI, keyRing gomatrixserverlib.JSONVerifier, ) error
Enable this MSC nolint:gocyclo
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) ChildrenForParent ¶
func (*DB) StoreRelation ¶
func (p *DB) StoreRelation(ctx context.Context, ev *gomatrixserverlib.HeaderedEvent) error
type Database ¶
type Database interface {
// StoreRelation stores the parent->child and child->parent relationship for later querying.
// Also stores the event metadata e.g timestamp
StoreRelation(ctx context.Context, ev *gomatrixserverlib.HeaderedEvent) error
// ChildrenForParent returns the events who have the given `eventID` as an m.relationship with the
// provided `relType`. The returned slice is sorted by origin_server_ts according to whether
// `recentFirst` is true or false.
ChildrenForParent(ctx context.Context, eventID, relType string, recentFirst bool) ([]eventInfo, error)
}
func NewDatabase ¶
func NewDatabase(dbOpts *config.DatabaseOptions) (Database, error)
NewDatabase loads the database for msc2836
type EventRelationshipRequest ¶
type EventRelationshipRequest struct {
EventID string `json:"event_id"`
MaxDepth int `json:"max_depth"`
MaxBreadth int `json:"max_breadth"`
Limit int `json:"limit"`
DepthFirst bool `json:"depth_first"`
RecentFirst bool `json:"recent_first"`
IncludeParent bool `json:"include_parent"`
IncludeChildren bool `json:"include_children"`
Direction string `json:"direction"`
Batch string `json:"batch"`
AutoJoin bool `json:"auto_join"`
}
func NewEventRelationshipRequest ¶
func NewEventRelationshipRequest(body io.Reader) (*EventRelationshipRequest, error)
func (*EventRelationshipRequest) Defaults ¶
func (r *EventRelationshipRequest) Defaults()
type EventRelationshipResponse ¶
type EventRelationshipResponse struct {
Events []gomatrixserverlib.ClientEvent `json:"events"`
NextBatch string `json:"next_batch"`
Limited bool `json:"limited"`
}
Click to show internal directories.
Click to hide internal directories.