This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
/messages
can't paginate from the beginning of the room forwards - MSC3567 #12383
Copy link
Copy link
Closed
Closed
Copy link
Labels
A-Messages-Endpoint/messages client API endpoint (`RoomMessageListRestServlet`) (which also triggers /backfill)/messages client API endpoint (`RoomMessageListRestServlet`) (which also triggers /backfill)A-Spec-Complianceplaces where synapse does not conform to the specplaces where synapse does not conform to the specS-TolerableMinor significance, cosmetic issues, low or no impact to users.Minor significance, cosmetic issues, low or no impact to users.T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Description
As discovered in matrix-org/matrix-spec#601 (comment)
Description
In MSC3567,
The
from
field on the/_matrix/client/v3/rooms/{roomId}/messages
becomes optional. If it is not provided, the homeserver shall return a list of
messages from the first or last (per the value of thedir
parameter) visible
event in the room history for the requesting user.
But Synapse doesn't seem to behave this way:
- ✅
GET /_matrix/client/v3/rooms/{roomId}/messages?dir=b
: Gets the most recent events in the room - ❌
GET /_matrix/client/v3/rooms/{roomId}/messages?dir=f
: Gets no messages- Expected to get the first messages in the room (oldest)
Steps to reproduce
GET /_matrix/client/v3/rooms/{roomId}/messages?dir=f
- Notice that the response doesn't include any messages and appears to just be the most recent position in the timeline looking forward
{ "chunk": [], "start": "s962_0_0_0_0_0_0_0_0", "end": "s962_0_0_0_0_0_0_0_0" }
Version information
- Homeserver: local dev homeserver
If not matrix.org:
-
Version: Most recent
develop
(163fd68) -
Install method: Local development setup
- Platform: macOS 12.3
Metadata
Metadata
Assignees
Labels
A-Messages-Endpoint/messages client API endpoint (`RoomMessageListRestServlet`) (which also triggers /backfill)/messages client API endpoint (`RoomMessageListRestServlet`) (which also triggers /backfill)A-Spec-Complianceplaces where synapse does not conform to the specplaces where synapse does not conform to the specS-TolerableMinor significance, cosmetic issues, low or no impact to users.Minor significance, cosmetic issues, low or no impact to users.T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.Bugs, crashes, hangs, security vulnerabilities, or other reported issues.