Expand description
/sync snapshot. Returns JSON. Does not wait, poll, or wake.
Structs§
Constants§
- SYNC_
HERO_ LIMIT m.heroescap (plan §3.4).- SYNC_
MAX_ TIMEOUT_ MS timeout(ms) is clamped to this ceiling regardless of what the client asks for (plan §4/syncrow).- SYNC_
TIMELINE_ DEFAULT_ LIMIT filter.room.timeline.limitdefault and ceiling (P10 brief — overrides plan §3.2’s own “default 20” wherever they differ).- SYNC_
TIMELINE_ MAX_ LIMIT - SYNC_
TO_ DEVICE_ CAP to_device.eventscap per response (P10 brief).
Functions§
- build_
invite_ room_ block - One
rooms.invite.{roomId}block, orNonewhen the invite is not new (an incremental sync whose invite predatessince_stream). - build_
join_ room_ block - One
rooms.join.{roomId}block, orNonewhen this is an incremental sync AND nothing changed for this room at all (a room is only listed when something happened — see the module doc’s emptiness rule). - build_
leave_ room_ block - One
rooms.leave.{roomId}block: timeline up to and including the leave/kick/ban event itself (naturally bounded — nothing after that point is ever queried),stateminimal (v1 simplification: the client was previously joined, so it already has the room’s bootstrap state from before it left — nothing new is reconstructed here). - build_
receipt_ event - One coalesced
m.receiptephemeral event (plan §3.6): everym.readreceipt (visible to the whole room by definition) plus ONLY the caller’s ownm.read.privatereceipt — Matrix’s own privacy rule that a private receipt must never reach another user’s/sync.Nonewhenreceiptscontained only OTHER users’ private receipts — after the privacy filter there is nothing left worth an (otherwise empty-content) event at all, and an empty-but-presentm.receiptevent would wrongly count as “this room changed” for the emptiness check that gates a room’s inclusion. - build_
sync_ response - format_
event - format_
pagination_ token - parse_
filter_ param - Resolve the
filterquery param: a storedfilter_id(looked up viacrate::store::get_filter, scoped touser_id— the same isolationroutes::matrix::account::get_filterenforces) or inline JSON (a leading{). Absent/empty isSyncFilter::default. - passes_
type_ filter types/not_typesgate shared by the timeline and account-data filter sections — own copy per this codebase’s one-copy-per-route-module convention (mirrorsroutes::matrix::messaging::event_passes_filter).- sync_
response_ is_ empty - “No rooms/account-data/to-device/device-lists changes, no typing/receipt
change” (P10 brief) —
device_one_time_keys_count/device_unused_fallback_key_typesare deliberately NOT part of this check: they are static per-device facts always present, never a “new since last time” signal.