Add information on mentions & replies.

This commit is contained in:
Patrick Cloke 2023-05-03 15:23:19 -04:00
parent 2d76908dae
commit b16b850731
2 changed files with 33 additions and 3 deletions

View file

@ -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

View file

@ -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
}
```