Skip to content

Commit

Permalink
Fixes and clarifications around m.reaction (#1531)
Browse files Browse the repository at this point in the history
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
  • Loading branch information
zecakeh committed May 23, 2023
1 parent 6496d37 commit f564c07
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions changelogs/client_server/newsfragments/1531.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add `m.annotation` relations (reactions), as per [MSC2677](https://github.com/matrix-org/matrix-spec-proposals/pull/2677).
6 changes: 6 additions & 0 deletions content/client-server-api/modules/event_annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion content/client-server-api/modules/push.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
6 changes: 0 additions & 6 deletions content/client-server-api/modules/receipts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
8 changes: 5 additions & 3 deletions data/event-schemas/schema/m.reaction.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: "👍"

0 comments on commit f564c07

Please sign in to comment.