From f564c07e600fa0f8ae63096387ed9cbc2066a022 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= <76261501+zecakeh@users.noreply.github.com> Date: Tue, 23 May 2023 17:18:16 +0200 Subject: [PATCH] Fixes and clarifications around m.reaction (#1531) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kévin Commaille --- changelogs/client_server/newsfragments/1531.feature | 1 + content/client-server-api/modules/event_annotations.md | 6 ++++++ content/client-server-api/modules/push.md | 2 +- content/client-server-api/modules/receipts.md | 6 ------ data/event-schemas/schema/m.reaction.yaml | 8 +++++--- 5 files changed, 13 insertions(+), 10 deletions(-) create mode 100644 changelogs/client_server/newsfragments/1531.feature diff --git a/changelogs/client_server/newsfragments/1531.feature b/changelogs/client_server/newsfragments/1531.feature new file mode 100644 index 00000000..a59c2177 --- /dev/null +++ b/changelogs/client_server/newsfragments/1531.feature @@ -0,0 +1 @@ +Add `m.annotation` relations (reactions), as per [MSC2677](https://github.com/matrix-org/matrix-spec-proposals/pull/2677). diff --git a/content/client-server-api/modules/event_annotations.md b/content/client-server-api/modules/event_annotations.md index 8aeff40f..661d8001 100644 --- a/content/client-server-api/modules/event_annotations.md +++ b/content/client-server-api/modules/event_annotations.md @@ -71,6 +71,12 @@ change their reaction, the original reaction should be redacted and a new one sent in its place. {{% /boxes/note %}} +{{% boxes/note %}} +The `key` field in `m.reaction` can be any string so clients must take care to +render long reactions in a sensible manner. For example, clients can elide +overly-long reactions. +{{% /boxes/note %}} + #### Server behaviour ##### Avoiding duplicate annotations diff --git a/content/client-server-api/modules/push.md b/content/client-server-api/modules/push.md index ad2c544b..d1855f58 100644 --- a/content/client-server-api/modules/push.md +++ b/content/client-server-api/modules/push.md @@ -700,7 +700,7 @@ Definition: {{% added-in v="1.7" %}} -Matches any event whose type is `m.room.reaction`. This suppresses notifications for [`m.reaction`](#mreaction) events. +Matches any event whose type is `m.reaction`. This suppresses notifications for [`m.reaction`](#mreaction) events. Definition: diff --git a/content/client-server-api/modules/receipts.md b/content/client-server-api/modules/receipts.md index 1b1af61a..8cd4e9f6 100644 --- a/content/client-server-api/modules/receipts.md +++ b/content/client-server-api/modules/receipts.md @@ -153,12 +153,6 @@ relationships and solid lines showing topological ordering. ![threaded-dag](/diagrams/threaded-dag.png) -{{% boxes/note %}} -`m.reaction` relationships are not currently specified, but are shown here for -their conceptual place in a threaded DAG. They are currently proposed as -[MSC2677](https://github.com/matrix-org/matrix-spec-proposals/pull/2677). -{{% /boxes/note %}} - This DAG can be represented as 3 threaded timelines, with `A` and `B` being thread roots: diff --git a/data/event-schemas/schema/m.reaction.yaml b/data/event-schemas/schema/m.reaction.yaml index 4d8ce43b..6d369c5f 100644 --- a/data/event-schemas/schema/m.reaction.yaml +++ b/data/event-schemas/schema/m.reaction.yaml @@ -30,8 +30,10 @@ properties: key: type: string description: |- - An emoji representing the reaction being made. Should include the - unicode emoji presentation selector (`\uFE0F`) for codepoints - which allow it (see the [emoji variation sequences + The reaction being made, usually an emoji. + + If this is an emoji, it should include the unicode emoji + presentation selector (`\uFE0F`) for codepoints which allow it + (see the [emoji variation sequences list](https://www.unicode.org/Public/UCD/latest/ucd/emoji/emoji-variation-sequences.txt)). example: "👍"