This document is intended to collect Matrix sync information which are documented or not in the official Matrix Spec. Especially, how raiden treats the syncing process introduces some special behavior.
Generally spoken the first sync delivers different results if a user already used this ID in Matrix or not. If already used the UserID is already part of the broadcast rooms (discovery, PFS, Monitoring). The Matrix Server will notice this and already send you information of the rooms you joined.
Events user receives:
- State Events of joined rooms
- Membership Events such as joined, leave, invite. Only sends one event per user with the current membership state.
- room states (Join_rules, power levels, canonical alias, room aliases, etc.)
- no timeline events. They are filtered by the first sync filter. Hence no messages received.
- Presence Events
- Presence Events are global. The Server collects presence events from all user_ids of interest. Which is all other users the user shares a room with.
- Online Events are resend in a given interval
- Offline Events are only received once
- Other Events
- I found some data in the
account_datakey which should be neglectable
- I found some data in the
In general syncs all events from broadcast rooms are filtered. In general we can expect the following events.
- Presence events
- rooms
- invite -> If user is only invited. Limited information about the room passed. (e.g. no members info)
- leave
- join -> All events if user joined the room (First sync after
join_room())- state events -> Events about the state of the room membership of partners, power levels, visibility, aliases
- timeline events -> most recent state events and messages
Presence events are not room bounded. The server collects presence events for all users of interest. Which should be the partners sharing a room with the user. Presence events come only once if presence changed to offline. Online events come frequently with the sync.
Yes, it does, but afaik, it's called on start_healthcheck or so, not on
presenceevents (which is when we should check for roaming users). Also,search_user_directoryreturnsdisplayName, but not status (online/offline), requiring a/profilecall on its own but for a different reason. This may/should also be noticed.