Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add /sync endpoint #12

Open
damon-myers opened this issue Nov 19, 2018 · 0 comments
Open

Add /sync endpoint #12

damon-myers opened this issue Nov 19, 2018 · 0 comments

Comments

@damon-myers
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant