-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/messages
endpoint returns end
token identical to from
token #12102
Description
Description
Goal is to fetch messages in a room backwards.
Steps to reproduce
- My client first does a
/sync
to get the latestnext_batch
token - I'm then using that token to pass it into the messages endpoint as
{ from: $next_batch, direction: "b", .. }
. - The response from the server has an
end
field that's the same as thenext_batch
token that was used in the initial request, additionally to all room messages.
So it seems there's an issue with synapse not leaving the end
token empty if it reaches the end of the timeline.
For reference, here's the raw response from synapse, where start
and end
are identical.
matrix_sdk::http_client: Got response: Response { status: 200, version: HTTP/1.1, headers: {"transfer-encoding": "chunked", "server": "Synapse/1.53.0", "date": "Mon, 28 Feb 2022 14:45:37 GMT", "content-type": "application/json", "cache-control": "no-cache, no-store, must-revalidate", "access-control-allow-origin": "*", "access-control-allow-methods": "GET, HEAD, POST, PUT, DELETE, OPTIONS", "access-control-allow-headers": "X-Requested-With, Content-Type, Authorization, Date"}, body: b"{"chunk":[],"start":"t1-915_1917_28_2_75_1_1_77_1","end":"t1-915_1917_28_2_75_1_1_77_1"}" }
Version information
- Homeserver: Local dev instance
If not matrix.org:
-
Version: 1.53.0
-
Install method: docker hub
- Platform: x86 64bit, docker container