Skip to content

CSAPI GET /rooms/{roomId}/event/{eventId} does not pull events over federation, breaking pinned messages (it's not clear how clients should fetch m.room.pinned_events) #2335

@reivilibre

Description

@reivilibre

Link to problem area:

Issue

Pinned events currently don't work in Element Web if the user is on a (Synapse) homeserver that doesn't have the event already in the local homeserver database.

The root cause appears to be because Element Web is fetching pinned events using the CSAPI GET /rooms/{roomId}/event/{eventId} endpoint, which does not pull events over federation. (The end result is that new users do not see the pinned events, assuming they aren't using a homeserver that was already in the room before. This degrades their utility as a replacement for the room topic.) Two problems here:

  • The spec doesn't prescribe any behaviour for clients to fetch the events to display the pinned messages; I don't think you can blame Element Web from trying the obvious here.
  • The spec doesn't mention whether GET /rooms/{roomId}/event/{eventId} should or should not pull over federation.

Even if this endpoint should pull over federation, it's not clear who to pull from, given we have no hint as to which server has that event or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clarificationAn area where the expected behaviour is understood, but the spec could do with being more explicit

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions