Implement MSC3952: intentional mentions (#9983)

Implements the intentional mentions feature of MSC3952 (behind
a labs flag).

If enabled, this will send an org.matrix.msc3952.mentions property
on events that will contain the user IDs and/or whether the room is
being mentioned. These mentions also gets propagated via some
custom behaviour for replies and edits.
This commit is contained in:
Patrick Cloke 2023-03-23 07:47:40 -04:00 committed by GitHub
parent 5a1a91f16a
commit e19127f8ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 431 additions and 23 deletions

View file

@ -125,6 +125,8 @@ export async function createMessageContent(
const newRelation = isEditing ? { ...relation, rel_type: "m.replace", event_id: editedEvent.getId() } : relation;
// TODO Do we need to attach mentions here?
// TODO Handle editing?
attachRelation(content, newRelation);
if (!isEditing && replyToEvent && permalinkCreator) {