Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
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

@MadLittleMods

Description

@MadLittleMods

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Messages-Endpoint/messages client API endpoint (`RoomMessageListRestServlet`) (which also triggers /backfill)A-Spec-Complianceplaces where synapse does not conform to the specS-TolerableMinor significance, cosmetic issues, low or no impact to users.T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions