Called by the /sync loop whenever an m.room.encryption event is received.
This is called before RoomStateEvents are emitted for any of the events in the /sync response (even if the other events technically happened first). This works around a problem if the client uses a RoomStateEvent (typically a membership event) as a trigger to send a message in a new room (or one where encryption has been newly enabled): that would otherwise leave the crypto layer confused because it expects crypto to be set up, but it has not yet been.
in which the event was received
encryption event to be processed
Called by the /sync loop after each /sync response is processed.
Used to complete batch processing, or to initiate background processes
information about the completed sync.
Called by the /sync loop whenever there are incoming to-device messages.
The implementation may preprocess the received messages (eg, decrypt them) and return an updated list of messages for dispatch to the rest of the system.
Note that, unlike ToDeviceEvent events, this is called on the raw to-device messages, rather than the results of any decryption attempts.
the received to-device messages
A list of preprocessed to-device messages.
Handle the notification from /sync that device lists have been changed.
device_lists field from /sync
Called by the /sync loop when one time key counts and unused fallback key details are received.
Optional
oneTimeKeysCounts: Record<string, number>the received one time key counts
Optional
unusedFallbackKeys: string[]the received unused fallback keys
Generated using TypeDoc
The methods which crypto implementations should expose to the Sync api