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

Incorrect and unclear description of prev_batch usage for /sync #595

Open
joepie91 opened this issue Mar 4, 2020 · 4 comments
Open

Incorrect and unclear description of prev_batch usage for /sync #595

joepie91 opened this issue Mar 4, 2020 · 4 comments
Labels
A-Client-Server Issues affecting the CS API clarification An area where the expected behaviour is understood, but the spec could do with being more explicit

Comments

@joepie91
Copy link

joepie91 commented Mar 4, 2020

From the spec:

Finally, the response includes, for each room, a prev_batch field, which can be passed as a start parameter to the /rooms/<room_id>/messages API to retrieve earlier messages.
[...]
prev_batch: A token that can be supplied to the from parameter of the rooms/{roomId}/messages endpoint.

Two issues with this:

  1. It's not clearly defined what dir one should request from /messages, using this prev_batch token
  2. There is no such thing as a start parameter, like the first part of the quoted text claims (there's only such a property in the response); presumably, that was supposed to say from rather than start.
@turt2live
Copy link
Member

I think this is largely a duplicate of matrix-org/matrix-spec-proposals#2420, though anything not mentioned there can be merged into the comments section.

@joepie91
Copy link
Author

joepie91 commented Mar 4, 2020

That's definitely a different issue; neither of these two issues are mentioned there, and that issue concerns the documentation for the /messages endpoint itself whereas this one concerns the documentation for /sync.

Not sure if you want them merged anyway, but it's definitely not a duplicate :)

@turt2live
Copy link
Member

ah, indeed. Nowhere in your issue did it say this was was sync, but all the words show up in the backfill endpoints.

@turt2live turt2live reopened this Mar 4, 2020
@turt2live turt2live changed the title Incorrect and unclear description of prev_batch usage Incorrect and unclear description of prev_batch usage for /sync Mar 4, 2020
@turt2live turt2live added clarification An area where the expected behaviour is understood, but the spec could do with being more explicit A-Client-Server Issues affecting the CS API labels Mar 4, 2020
@joepie91
Copy link
Author

joepie91 commented Mar 4, 2020

Ah right, I probably should've mentioned that explicitly. Apologies.

@richvdh richvdh transferred this issue from matrix-org/matrix-spec-proposals Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Client-Server Issues affecting the CS API clarification An area where the expected behaviour is understood, but the spec could do with being more explicit
Projects
None yet
Development

No branches or pull requests

2 participants