You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: chunk.count =0 is not enough to decide end of pagination. The client must check start token = end token in server response.
Indeed the client may receive empty chunk during back pagination on a period where the user was outside the room.
Example: I joined a room, I left it, others sent more than 20 messages while I am outside, then I joined again.
I receive empty chunk when I scroll back in room history. The start/end tokens are different in this case.
matrixbot
changed the title
Pagination: specify returned tokens when the end of pagination is hit.
Pagination: specify returned tokens when the end of pagination is hit. (SPEC-319)
Oct 31, 2016
Previously the section was very strict in what pagination was, however this isn't the reality for the matrix specification. Several endpoints have their own pagination naming conventions and do not follow those mandated by this section.
This commit generalizes the language to cover those endpoints while also describing how pagination works. In particular, it describes the rough API shape to expect and how to deal with the responses.
This commit also removes the `M_BAD_PAGINATION` error as it is not used in the real world. Homeservers are instead encouraged to use the standard `M_INVALID_PARAM` or similar error code.
Fixesmatrix-org#610Fixesmatrix-org#1523
This information is missing in the specification of "rooms/roomId/messages" API.
Presently when we hit the end of pagination the chunk is empty and both tokens start/end are equal (see attachment EndOfPagination.png).
(Imported from https://matrix.org/jira/browse/SPEC-319)
(Reported by @giomfo)
Attachments:
https://matrix.org/jira/secure/attachment/10226/EndOfPagination.png
The text was updated successfully, but these errors were encountered: