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

Add verbage for how per-room profiles work #1302

Closed

Conversation

turt2live
Copy link
Member

Fixes https://github.com/matrix-org/matrix-doc/issues/545

Note

This assumes the following is desired in the spec:

we might need server-side support to ensure you can still change your "default" displayname without breaking per-room displaynames

https://github.com/matrix-org/matrix-doc/issues/545#issuecomment-306156163

Signed-off-by: Travis Ralston <travpc@gmail.com>
room. To accomplish this, the client should modify the ``displayname`` and
``avatar_url`` properties of the user's ``m.room.member`` event in the room.

Homeservers SHOULD NOT overwrite ``m.room.member`` events that were updated in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rationale?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see related issue


Homeservers SHOULD NOT overwrite ``m.room.member`` events that were updated in
this way when the client invokes the dedicated profile API. Further, homeservers
should not return per-room profiles as part of this profile API.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So how can a client know that an event is global or per room, and how can a client differentiate between an event set globally or per-room?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out of scope - this is to primarily document the current behaviour.

this way when the client invokes the dedicated profile API. Further, homeservers
should not return per-room profiles as part of this profile API.

Clients SHOULD use the ``m.room.member`` event for users in a room when showing
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this already true or only specific to per-room profile? A better question might be: is this some new item, or a change to an existing behavior?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already well-communicated as the 'proper' way to get display names in a particular room, and therefore the current expectation.

@KitsuneRal
Copy link
Member

Correct me if I'm wrong but it seems to me this text mixes the desired behaviour ("Homeservers SHOULD NOT overwrite m.room.member") into a description of the current behaviour. Does Synapse actually not overwrite m.room.member in each room on profile operations anymore? Or we just leave a loophole for it by using "SHOULD NOT" instead of "MUST NOT"?

Per-room Profiles
+++++++++++++++++
Users may wish to have a different display name or avatar or both in a specific
room. To accomplish this, the client should modify the ``displayname`` and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How to do it is not documented.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kinda feel as though describing which fields to modify on what event of what kind is enough information to figure out that one needs to go to the state APIs. I'm open to suggestions for improved wording though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least the endpoint (method + path) that needs to be called

@turt2live
Copy link
Member Author

@KitsuneRal the "SHOULD NOT" is to get around this limitation, although I do plan on submitting a PR to synapse pending general approval on this.

@turt2live
Copy link
Member Author

turt2live commented Jun 14, 2018

ftr, this should not be merged until the debate in #matrix-spec is resolved (whether PRs like this are acceptable, and whether they can bypass the proposal process).

@Half-Shot
Copy link
Contributor

@KitsuneRal the "SHOULD NOT" is to get around this limitation, although I do plan on submitting a PR to synapse pending general approval on this.

Fwiw I did try this a while ago and we had some problems: matrix-org/synapse#2039

@turt2live
Copy link
Member Author

I'm going to close this for now then.

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

Successfully merging this pull request may close these issues.

4 participants