mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-26 04:54:10 +01:00
Add information on mentions & replies.
This commit is contained in:
parent
2d76908dae
commit
b16b850731
|
|
@ -76,12 +76,12 @@ background color to signify to the user that they were mentioned.
|
|||
When clicked, the mention should navigate the user to the appropriate
|
||||
user or room information.
|
||||
|
||||
TODO Behavior with replies.
|
||||
|
||||
TODO Behavior with edits.
|
||||
|
||||
TODO Always include `m.mentions` property.
|
||||
|
||||
TODO Note that users should *never* include their own Matrix ID in `m.mentions`.
|
||||
|
||||
{{% boxes/note %}}
|
||||
Similar to legacy [matrix.to URLs](/appendices/#matrixto-navigation),
|
||||
groups used to be representable by mentions. They follow a similar format
|
||||
|
|
|
|||
|
|
@ -176,4 +176,34 @@ This is where the reply goes.
|
|||
|
||||
For `m.image`, the text should be `"sent an image."`. For `m.video`, the
|
||||
text should be `"sent a video."`. For `m.audio`, the text should be
|
||||
`"sent an audio file"`.
|
||||
`"sent an audio file"`.
|
||||
|
||||
#### Mentioning the replied to user
|
||||
|
||||
In order to notify users of the reply, it may be desirable to include the `sender`
|
||||
of the replied to event and any users mentioned in that event. See
|
||||
[user and room mentions](#user-and-room-mentions) for additional information.
|
||||
|
||||
An example including mentioning the original sender and other users:
|
||||
|
||||
```json5
|
||||
{
|
||||
"content": {
|
||||
"m.relates_to": {
|
||||
"m.in_reply_to": {
|
||||
"event_id": "$another_event"
|
||||
}
|
||||
},
|
||||
"body": "That sounds like a great idea!",
|
||||
"m.mentions": {
|
||||
"user_ids": [
|
||||
// The sender of $another_event.
|
||||
"@alice:example.org",
|
||||
// Another Matrix ID copied from the m.mentions property of $another_event.
|
||||
"@bob:example.org"
|
||||
]
|
||||
}
|
||||
},
|
||||
// other fields as required by events
|
||||
}
|
||||
```
|
||||
|
|
|
|||
Loading…
Reference in a new issue