-
Notifications
You must be signed in to change notification settings - Fork 392
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
MSC4269: Unambiguous mentions in body #4269
base: main
Are you sure you want to change the base?
Conversation
1f05056
to
35e6d3b
Compare
Signed-off-by: Jan Alexander Steffens (heftig) <[email protected]>
35e6d3b
to
6aa0ee1
Compare
|
||
## Proposal | ||
|
||
The specified client behavior for user and room mentions is modified so that the event's `body` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Linking to the spec here might help in better understanding the proposal.
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` |
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. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC, applying this to the example from the spec would lead to the following?
```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"] | |
} | |
} |
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Rendered
The message
body
should contain user IDs instead of display names.