Expand description
Implements APIs for client sync API
See https://bundesmessenger.gitlab.io/backend/neo/arminius/arminius/architecture/sync.html for information about how the stream IDs work
For limited timelines: We generally fetch up to limit+1 events from the
database, where limit is the amount of events the user asked for, or a
sensible default. If there are actually limit+1 events we can sync to the
user, we throw away the last event, and mark the timeline as limited,
indicating to the user that if they use the /messages endpoint, there are
more events they could fetch.
Structsยง
- Sync
Data - This structure contains any data that needs to be synchronized.
- Sync
Response ๐ - A wrapper around a sync response
- Synced
Room ๐ - A synchronized room
Enumsยง
Functionsยง
- fetch_
sync_ ๐data - This function is a central point in which we query every possible data that needs synchronization.
- normalize_
filter ๐ - Since the client can send us a filter on the fly we need to normalize the the request.
- sync_
events_ ๐handler - Handler for
GET /_matrix/client/v3/sync(See https://spec.matrix.org/v1.14/client-server-api/#get_matrixclientv3sync). - wait_
for_ ๐sync_ data - Given a [
arminius_lib_nats::Subscriber] instanced fromsync_data_subscriber, wait until it receives a NATS message about a new sync response.