Skip to content

Add /sync endpoint #12

@damon-myers

Description

@damon-myers

Feature Description

Lighthouse should respond to http GET requests at /_matrix/client/r0/sync with a response containing the latest state on the server for all of the rooms they are interested in.

Clients use this API when they first log in to get an initial snapshot of the server, and then continually poll this endpoint to get incremental deltas to the state, and to receive new messages.

Acceptance Requirements

  • The 'sync' endpoint is only available to authenticated ( Add basic password authentication #9 ) users
  • Clients can make GET requests at '/_matrix/client/r0/sync' using the following parameters which results in a response containing the following parameters
  • Query Parameters
    • filter
      • Either the ID of a filter created using the filter API (Add filter endpoint #11) or a JSON string representing a filter
    • since
      • A point in time to continue a sync from
    • full_state
      • A boolean indicating whether the full state for all rooms the user is a member of should be returned or not
    • set_presence
      • Controls whether the client is marked as online when it uses this API
    • timeout
      • The maximum time to wait for events, in milliseconds, before returning this request if the response is empty
  • Response Parameters
    • next_batch (Required)
      • The batch token the client can use in the since param of their next request
    • rooms
      • A list of Room objects detailing room state and updates
    • presence
      • A list of updates to the presence status of other users
    • account_data
      • The global private data created by this user
    • to_device
      • Information on the send-to-device messages for the client device
      • Send-to-device messages are one-time messages that should not persist in a room graph
    • device_lists
      • Information on device updates for end-to-end encryption
      • Only used during incremental syncs (i.e., ones with a since parameter specified`)
    • device_one_time_keys_count
      • Information on keys for end-to-end encryption
      • For each key algorithm used, the number of unclaimed one-time-keys currently held on the server for this device

Documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions