Skip to content
This repository has been 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

Closed
MadLittleMods opened this issue Apr 5, 2022 · 0 comments · Fixed by #14149
Closed

/messages can't paginate from the beginning of the room forwards - MSC3567 #12383

MadLittleMods opened this issue Apr 5, 2022 · 0 comments · Fixed by #14149
Labels
A-Messages-Endpoint /messages client API endpoint (`RoomMessageListRestServlet`) (which also triggers /backfill) A-Spec-Compliance places where synapse does not conform to the spec S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@MadLittleMods
Copy link
Contributor

MadLittleMods commented Apr 5, 2022

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 the dir 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

  1. GET /_matrix/client/v3/rooms/{roomId}/messages?dir=f
  2. 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:

  • Platform: macOS 12.3
@MadLittleMods MadLittleMods added A-Spec-Compliance places where synapse does not conform to the spec S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. labels Apr 5, 2022
@MadLittleMods MadLittleMods added the A-Messages-Endpoint /messages client API endpoint (`RoomMessageListRestServlet`) (which also triggers /backfill) label Jul 19, 2022
gnunicorn added a commit to gnunicorn/synapse that referenced this issue Oct 11, 2022
…. Include

unit tests for forward and backward pagination of room messages.

Fixes matrix-org#12383 .
gnunicorn added a commit to gnunicorn/synapse that referenced this issue Oct 11, 2022
…. Include

unit tests for forward and backward pagination of room messages.

Fixes matrix-org#12383 .
gnunicorn added a commit to gnunicorn/synapse that referenced this issue Oct 11, 2022
…. Include

unit tests for forward and backward pagination of room messages.

Fixes matrix-org#12383 .
gnunicorn added a commit to gnunicorn/synapse that referenced this issue Oct 12, 2022
…. Include

unit tests for forward and backward pagination of room messages.

Fixes matrix-org#12383 .
gnunicorn added a commit to gnunicorn/synapse that referenced this issue Oct 17, 2022
…. Include

unit tests for forward and backward pagination of room messages.

Fixes matrix-org#12383 .
gnunicorn added a commit to gnunicorn/synapse that referenced this issue Oct 17, 2022
…. Include

unit tests for forward and backward pagination of room messages.

Fixes matrix-org#12383 .
gnunicorn added a commit to gnunicorn/synapse that referenced this issue Nov 10, 2022
…. Include

unit tests for forward and backward pagination of room messages.

Fixes matrix-org#12383 .
gnunicorn added a commit to gnunicorn/synapse that referenced this issue Nov 13, 2022
…. Include

unit tests for forward and backward pagination of room messages.

Fixes matrix-org#12383 .
gnunicorn added a commit to gnunicorn/synapse that referenced this issue Nov 16, 2022
…. Include

unit tests for forward and backward pagination of room messages.

Fixes matrix-org#12383 .
gnunicorn added a commit to gnunicorn/synapse that referenced this issue Nov 22, 2022
…. Include

unit tests for forward and backward pagination of room messages.

Fixes matrix-org#12383 .
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Messages-Endpoint /messages client API endpoint (`RoomMessageListRestServlet`) (which also triggers /backfill) A-Spec-Compliance places where synapse does not conform to the spec S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
1 participant