Documentation ¶
Index ¶
- func ApplyHistoryVisibilityFilter(ctx context.Context, syncDB storage.DatabaseTransaction, ...) ([]*gomatrixserverlib.HeaderedEvent, error)
- func DeviceListCatchup(ctx context.Context, db storage.SharedUsers, keyAPI keyapi.SyncKeyAPI, ...) (newPos types.StreamPosition, hasNew bool, err error)
- func DeviceOTKCounts(ctx context.Context, keyAPI keyapi.SyncKeyAPI, userID, deviceID string, ...) error
- func TrackChangedUsers(ctx context.Context, rsAPI roomserverAPI.SyncRoomserverAPI, userID string, ...) (changed, left []string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyHistoryVisibilityFilter ¶ added in v0.9.2
func ApplyHistoryVisibilityFilter( ctx context.Context, syncDB storage.DatabaseTransaction, rsAPI api.SyncRoomserverAPI, events []*gomatrixserverlib.HeaderedEvent, alwaysIncludeEventIDs map[string]struct{}, userID, endpoint string, ) ([]*gomatrixserverlib.HeaderedEvent, error)
ApplyHistoryVisibilityFilter applies the room history visibility filter on gomatrixserverlib.HeaderedEvents. Returns the filtered events and an error, if any.
func DeviceListCatchup ¶
func DeviceListCatchup( ctx context.Context, db storage.SharedUsers, keyAPI keyapi.SyncKeyAPI, rsAPI roomserverAPI.SyncRoomserverAPI, userID string, res *types.Response, from, to types.StreamPosition, ) (newPos types.StreamPosition, hasNew bool, err error)
DeviceListCatchup fills in the given response for the given user ID to bring it up-to-date with device lists. hasNew=true if the response was filled in, else false if there are no new device list changes because there is nothing to catch up on. The response MUST be already filled in with join/leave information.
func DeviceOTKCounts ¶
func DeviceOTKCounts(ctx context.Context, keyAPI keyapi.SyncKeyAPI, userID, deviceID string, res *types.Response) error
DeviceOTKCounts adds one-time key counts to the /sync response
func TrackChangedUsers ¶
func TrackChangedUsers( ctx context.Context, rsAPI roomserverAPI.SyncRoomserverAPI, userID string, newlyJoinedRooms, newlyLeftRooms []string, ) (changed, left []string, err error)
TrackChangedUsers calculates the values of device_lists.changed|left in the /sync response.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.