Skip to main content

sync_events_handler

Function sync_events_handler 

Source
pub(crate) async fn sync_events_handler(
    state: State<ServerState>,
    __arg1: AuthenticatedClaims,
    __arg2: RumaRequest<Request>,
) -> Result<SyncResponse, SyncError>
Expand description

Handler for GET /_matrix/client/v3/sync (See https://spec.matrix.org/v1.14/client-server-api/#get_matrixclientv3sync).

Endpoint that returns state of the data and is used by clients to sync their data with the homeserver.

Warning: Whenever you add support for any other data to be synced in this endpoint (e.g account_data, keys, etc), make sure to call arminius_lib_nats::connection::NatsClient::notify_new_sync_data on the creator of such data that will get synced.