Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSC2153: Add a default push rule to ignore m.reaction events #2153

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions proposals/2153-reaction-push-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Add a default push rule to ignore m.reaction events

Reactions are considered "metadata" that annotates an existing event and thus
they should not by default trigger notifications. (See
[MSC1849](https://github.com/matrix-org/matrix-doc/blob/matthew/msc1849/proposals/1849-aggregations.md#event-format)
richvdh marked this conversation as resolved.
Show resolved Hide resolved
for the reaction event format.)

This is especially important for rooms that may be set with a room-specific rule
to notify, as they will trigger notifications for every reaction and it's tricky
to clear them as well. See https://github.com/vector-im/riot-web/issues/10208
richvdh marked this conversation as resolved.
Show resolved Hide resolved
for details.

## Proposal

A new default override rule is to be added that ignores reaction events:

```json
{
"rule_id": ".m.rule.reaction",
"default": true,
"enabled": true,
"conditions": [
{
"kind": "event_match",
"key": "type",
"pattern": "m.reaction"
}
],
"actions": [
"dont_notify"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

per #2624: this is a no-op. We should remember to follow whatever the convention in the rest of the spec is when merging this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

]
}
```

## Tradeoffs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Tradeoffs
## Alternatives


We could instead allow notifications for reactions in some cases (the current
state) but then modify each client with complex heuristics to clear them by
advancing the read receipt. This would be more involved than for regular messages
because reaction events may target any event in the timeline, so there's no
guarantee that a new reaction event targets something that's currently displayed
to the user. By going with the push rule above, client developers won't have to
deal with this issue.