Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
erikjohnston opened this issue Sep 11, 2024 · 2 comments
Labels

Comments

@erikjohnston
Copy link
Member

erikjohnston commented Sep 11, 2024

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")

@MadLittleMods
Copy link
Contributor

Relevant MSC discussion: matrix-org/matrix-spec-proposals#3575 (comment)

@MadLittleMods
Copy link
Contributor

The name field is strictly just the m.room.name value right now. The MSC discussion asks about whether we should fallback to m.room.canonical_alias which aligns with what the spec suggests for whether heroes should be sent in Sync v2.

Another alternative is that clients can simply just request m.room.canonical_alias in the required_state. This is what the Rust SDK is already doing -> matrix-org/matrix-rust-sdk#3982

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants