Skip to main content

Module sticky

Module sticky 

Source
Available on crate feature unstable-msc4354 only.
Expand description

Sticky events (MSC4354), received over sliding sync through the MSC4480 extension.

A sticky event is a message-like event that the server keeps delivering to clients for a bounded duration (at most one hour), regardless of the timeline limit. Clients fold the sticky events of a room into a map keyed by (sender, type, content.sticky_key), in which the event that is last to expire wins, and from which entries disappear once they expire. MatrixRTC uses this to track who is in a call.

The map of a room is reachable through Room::sticky_events. It is fed from the sync response, expires its entries in the background, and broadcasts every visible change to its subscribers. Encrypted sticky events that cannot be decrypted yet are kept aside and retried when their room key arrives. Nothing is persisted: the server re-sends every sticky event that is still live when the sliding sync connection starts over.

Structs§

StickyEvent
A sticky event that is currently live in the map of a room.
StickyEvents
The sticky events of a room.
StickyEventsUpdate
A batch of visible changes to the map of a room.
StickyKey
The key of a sticky event in the map of a room.

Enums§

RemovalReason
Why a sticky event disappeared from the map of a room.