Skip to content

Sliding sync: name field should fall back to canonical alias if there is no room name #17697

Open
@erikjohnston

Description

@erikjohnston

Alternatively, we could add canonical_alias as a separate field.

This is breaking the names of rooms without a m.room.name in EX. Apparently the rust SDK doesn't use name field.

c.f.

room_name: Optional[str] = None
# TODO: Should we also check for `EventTypes.CanonicalAlias`
# (`m.room.canonical_alias`) as a fallback for the room name? see
# https://github.com/matrix-org/matrix-spec-proposals/pull/3575#discussion_r1671260153
name_event = room_state.get((EventTypes.Name, ""))
if name_event is not None:
room_name = name_event.content.get("name")

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions