-
Notifications
You must be signed in to change notification settings - Fork 12
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
Track display names and include them in WHOIS and WHO #70
base: main
Are you sure you want to change the base?
Conversation
Previous behaviour was to use whatever the display name was on first connect and drop any updates, which resulted in skew in displayed messages between M51 and other clients.
Display names are per-room. The way they are transmitted is through each room's latest |
According to the spec, they're per-user:
There's nothing physically preventing a homeserver from sending |
I see, that's for fetching display names from the user's profile, which is global. However, this PR uses room state rather than the profile to fetch display names, which may differ from each other and/or the profile. |
Looking into it more (especially matrix-org/matrix-spec#103 which has a lot of discussion on this topic), it looks like the current state of affairs is:
Based on this I'm pretty comfortable saying that per-room display names are not well supported, and are more of a side effect of how most servers handle All that said, we have a few other options here, if we don't trust room state to be consistent; the easiest and most spirit-of-the-law is, I think, to simply call the |
Sounds good |
(but keep the per-room display-name in the |
Will do, not planning to touch that code, just |
I'm using this locally and it seems to work fine. If display names are ever used to derive nicks this will need more work (in particular, send
NICK
when a user's display name changes), but this suffices for now.The existing TODOs said to use the "most common" display name, but since display names are per-user rather than per-channel or per-message, we can just pick an arbitrary member record and get the display name from there; the only time these will be inconsistent is if the user has just changed their name and the server is still in the process of sending
m.room.member
events to propagate it to all the channels.