MSC4269: Unambiguous mentions in body#4269
Draft
heftig wants to merge 1 commit into
Draft
Conversation
1f05056 to
35e6d3b
Compare
Signed-off-by: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
35e6d3b to
6aa0ee1
Compare
Johennes
reviewed
Mar 3, 2025
|
|
||
| ## Proposal | ||
|
|
||
| The specified client behavior for user and room mentions is modified so that the event's `body` |
Contributor
There was a problem hiding this comment.
Linking to the spec here might help in better understanding the proposal.
Suggested change
| The specified client behavior for user and room mentions is modified so that the event's `body` | |
| The [specified client behavior](https://spec.matrix.org/v1.13/client-server-api/#user-and-room-mentions) for user and room mentions is modified so that the event's `body` |
Johennes
reviewed
Mar 3, 2025
| The specified client behavior for user and room mentions is modified so that the event's `body` | ||
| should contain the unambiguous user ID, canonical room alias or room ID instead of the anchor's | ||
| text component. | ||
|
|
Contributor
There was a problem hiding this comment.
IIUC, applying this to the example from the spec would lead to the following?
Suggested change
| ```json5 | |
| { | |
| "body": "Hello @alice:example.org!", | |
| "msgtype": "m.text", | |
| "format": "org.matrix.custom.html", | |
| "formatted_body": "Hello <a href='https://matrix.to/#/@alice:example.org'>Alice</a>!", | |
| "m.mentions": { | |
| "user_ids": ["@alice:example.org"] | |
| } | |
| } |
Johennes
reviewed
Mar 3, 2025
Comment on lines
+24
to
+26
| Some clients, especially bridges, might rely on the body containing the display name for a good user | ||
| experience. However, it would not be difficult to modify such a client to translate user IDs in the | ||
| message body to display names. |
Contributor
There was a problem hiding this comment.
I think this would make it impossible to send a literal MXID in body without having it transformed to the display name upon display?
It would also be a breaking change which could possibly require a new room version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rendered
The message
bodyshould contain user IDs instead of display names.