From acf68eaeeea1d43eb7dda45b1d24e949e249ae21 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 24 Jan 2023 14:31:07 -0500 Subject: [PATCH 01/15] Suppress message edits. --- ...suppress-notifications-of-message-edits.md | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 proposals/3958-suppress-notifications-of-message-edits.md diff --git a/proposals/3958-suppress-notifications-of-message-edits.md b/proposals/3958-suppress-notifications-of-message-edits.md new file mode 100644 index 0000000000..b23997bfd2 --- /dev/null +++ b/proposals/3958-suppress-notifications-of-message-edits.md @@ -0,0 +1,80 @@ +# MSC3958: Suppress notifications of message edits + +[Event replacement](https://spec.matrix.org/v1.5/client-server-api/#event-replacements) +(more commonly known as message edits) signals that a message is intended to +be replaced with new content. + +This works well for fixing typos or correcting information, but tends to cause +spurious notifications if the event mentions a user. This contributes to notification +fatigue as the additional notifications contain no new information. + + +## Proposal + +A new default push rule is added to suppress notifications [due to edits](https://spec.matrix.org/v1.5/client-server-api/#event-replacements). + +```json +{ + "rule_id": ".m.rule.suppress_edits", + "default": true, + "enabled": true, + "conditions": [ + { + "kind": "event_match", + "key": "content.m.relates_to.rel_type", + "pattern": "m.replace" + } + ], + "actions": [] +} +``` + +This rule should be placed as the [first override rule](https://spec.matrix.org/v1.5/client-server-api/#default-override-rules). + +It would match events such as those given in [event replacements](https://spec.matrix.org/v1.5/client-server-api/#event-replacements) +portion of the spec: + +```json5 +{ + "type": "m.room.message", + "content": { + "body": "* Hello! My name is bar", + "msgtype": "m.text", + "m.new_content": { + "body": "Hello! My name is bar", + "msgtype": "m.text" + }, + "m.relates_to": { + "rel_type": "m.replace", + "event_id": "$some_event_id" + } + }, + // ... other fields required by events +} +``` + +## Potential issues + +Some users may be depending on notifications of edits. If a user would like to +revert to the old behavior they can disable the `.m.rule.suppress_edits` push rule. + +If the message edits were alloewd by other senders than it would be useful to +know that your own message was edited, but this +[is not currently allowed](https://spec.matrix.org/v1.5/client-server-api/#validity-of-replacement-events). + +## Alternatives + +None explored. + +## Security considerations + +None forseen. + +## Unstable prefix + +The unstable prefix of `.com.beeper.suppress_edits` should be used in place of +`.m.rule.suppress_edits`. + +## Dependencies + +N/A From 344c18fb99d1402b806860f0414971b7fffd93a6 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 24 Jan 2023 15:53:59 -0500 Subject: [PATCH 02/15] Fix typo. Co-authored-by: Sumner Evans --- proposals/3958-suppress-notifications-of-message-edits.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/3958-suppress-notifications-of-message-edits.md b/proposals/3958-suppress-notifications-of-message-edits.md index b23997bfd2..f7dbb31f90 100644 --- a/proposals/3958-suppress-notifications-of-message-edits.md +++ b/proposals/3958-suppress-notifications-of-message-edits.md @@ -58,7 +58,7 @@ portion of the spec: Some users may be depending on notifications of edits. If a user would like to revert to the old behavior they can disable the `.m.rule.suppress_edits` push rule. -If the message edits were alloewd by other senders than it would be useful to +If the message edits were allowed by other senders than it would be useful to know that your own message was edited, but this [is not currently allowed](https://spec.matrix.org/v1.5/client-server-api/#validity-of-replacement-events). From 09bb6ac16b334e2ab4db5c04e4662079a42192cd Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 24 Jan 2023 16:01:38 -0500 Subject: [PATCH 03/15] Add @room. --- .../3958-suppress-notifications-of-message-edits.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/proposals/3958-suppress-notifications-of-message-edits.md b/proposals/3958-suppress-notifications-of-message-edits.md index f7dbb31f90..e4ff8ef22d 100644 --- a/proposals/3958-suppress-notifications-of-message-edits.md +++ b/proposals/3958-suppress-notifications-of-message-edits.md @@ -4,10 +4,11 @@ (more commonly known as message edits) signals that a message is intended to be replaced with new content. -This works well for fixing typos or correcting information, but tends to cause -spurious notifications if the event mentions a user. This contributes to notification -fatigue as the additional notifications contain no new information. - +This works well for fixing typos or other minor correction, but can cause +spurious notifications if the event mentions a user's display name / localpart or +if it includes `@room` (which is particularly bad in large rooms as every user +is re-notified). This contributes to notification fatigue as the additional +notifications contain no new information. ## Proposal From 2ab860ac69fcdac916a54b9d5d0eddd48b48f55c Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 24 Jan 2023 16:02:59 -0500 Subject: [PATCH 04/15] Match MSC title to PR. --- proposals/3958-suppress-notifications-of-message-edits.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/3958-suppress-notifications-of-message-edits.md b/proposals/3958-suppress-notifications-of-message-edits.md index e4ff8ef22d..5833619d09 100644 --- a/proposals/3958-suppress-notifications-of-message-edits.md +++ b/proposals/3958-suppress-notifications-of-message-edits.md @@ -1,4 +1,4 @@ -# MSC3958: Suppress notifications of message edits +# MSC3958: Suppress notifications from message edits [Event replacement](https://spec.matrix.org/v1.5/client-server-api/#event-replacements) (more commonly known as message edits) signals that a message is intended to From 216a54cdd9a2f8e65d5010b99bc73687672375c5 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 25 Jan 2023 11:03:27 -0500 Subject: [PATCH 05/15] Add a potential issue. --- ...suppress-notifications-of-message-edits.md | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/proposals/3958-suppress-notifications-of-message-edits.md b/proposals/3958-suppress-notifications-of-message-edits.md index 5833619d09..96936a0386 100644 --- a/proposals/3958-suppress-notifications-of-message-edits.md +++ b/proposals/3958-suppress-notifications-of-message-edits.md @@ -63,6 +63,32 @@ If the message edits were allowed by other senders than it would be useful to know that your own message was edited, but this [is not currently allowed](https://spec.matrix.org/v1.5/client-server-api/#validity-of-replacement-events). +The rule is ambiguous (see [MSC3873](https://github.com/matrix-org/matrix-spec-proposals/pull/3873) +due to the `.` in `m.relates_to` and could also match other, unrelated, events: + +```json5 +{ + "type": "m.room.message", + "content": { + "body": "* Hello! My name is bar", + "msgtype": "m.text", + "m.new_content": { + "body": "Hello! My name is bar", + "msgtype": "m.text" + }, + "m": { + "relates_to": { + "rel_type": "m.replace", + "event_id": "$some_event_id" + } + } + }, + // ... other fields required by events +} +``` + +(Note that `relates_to` being embedded inside of the `m`.) + ## Alternatives None explored. From 69bd78b3008572117e983a18855c38f0b81c184a Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 31 Jan 2023 14:45:04 -0500 Subject: [PATCH 06/15] Clarify rule placement. --- proposals/3958-suppress-notifications-of-message-edits.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proposals/3958-suppress-notifications-of-message-edits.md b/proposals/3958-suppress-notifications-of-message-edits.md index 96936a0386..32560ac2b6 100644 --- a/proposals/3958-suppress-notifications-of-message-edits.md +++ b/proposals/3958-suppress-notifications-of-message-edits.md @@ -30,7 +30,8 @@ A new default push rule is added to suppress notifications [due to edits](https: } ``` -This rule should be placed as the [first override rule](https://spec.matrix.org/v1.5/client-server-api/#default-override-rules). +This rule should be placed before the [`.m.rule.suppress_notices` rule](https://spec.matrix.org/v1.5/client-server-api/#default-override-rules) +as the first non-master, non-user added override rule. It would match events such as those given in [event replacements](https://spec.matrix.org/v1.5/client-server-api/#event-replacements) portion of the spec: From 950ad36d3c9b36943a48b9c4d9973e777379e43f Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 7 Feb 2023 13:15:14 -0500 Subject: [PATCH 07/15] Change link text. Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> --- proposals/3958-suppress-notifications-of-message-edits.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/3958-suppress-notifications-of-message-edits.md b/proposals/3958-suppress-notifications-of-message-edits.md index 32560ac2b6..48449b125b 100644 --- a/proposals/3958-suppress-notifications-of-message-edits.md +++ b/proposals/3958-suppress-notifications-of-message-edits.md @@ -12,7 +12,7 @@ notifications contain no new information. ## Proposal -A new default push rule is added to suppress notifications [due to edits](https://spec.matrix.org/v1.5/client-server-api/#event-replacements). +A new default push rule is added to suppress notifications due to [edits](https://spec.matrix.org/v1.5/client-server-api/#event-replacements). ```json { From 59d917233653c4d39b22c46db987ccc5d1ea43aa Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 7 Feb 2023 13:15:31 -0500 Subject: [PATCH 08/15] Fix typo. Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> --- proposals/3958-suppress-notifications-of-message-edits.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/3958-suppress-notifications-of-message-edits.md b/proposals/3958-suppress-notifications-of-message-edits.md index 48449b125b..3f015a563d 100644 --- a/proposals/3958-suppress-notifications-of-message-edits.md +++ b/proposals/3958-suppress-notifications-of-message-edits.md @@ -64,7 +64,7 @@ If the message edits were allowed by other senders than it would be useful to know that your own message was edited, but this [is not currently allowed](https://spec.matrix.org/v1.5/client-server-api/#validity-of-replacement-events). -The rule is ambiguous (see [MSC3873](https://github.com/matrix-org/matrix-spec-proposals/pull/3873) +The rule is ambiguous (see [MSC3873](https://github.com/matrix-org/matrix-spec-proposals/pull/3873)) due to the `.` in `m.relates_to` and could also match other, unrelated, events: ```json5 From 02fd5c756f9428a51304b45ed14b96d5703cb31f Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 7 Feb 2023 14:04:07 -0500 Subject: [PATCH 09/15] Add a note about mobile clients. --- proposals/3958-suppress-notifications-of-message-edits.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/proposals/3958-suppress-notifications-of-message-edits.md b/proposals/3958-suppress-notifications-of-message-edits.md index 3f015a563d..224e7fde2b 100644 --- a/proposals/3958-suppress-notifications-of-message-edits.md +++ b/proposals/3958-suppress-notifications-of-message-edits.md @@ -90,6 +90,13 @@ due to the `.` in `m.relates_to` and could also match other, unrelated, events: (Note that `relates_to` being embedded inside of the `m`.) +Another issues is that mobile clients would no longer receive push notifications for +message edits, which are currently used to update the text of on-screen notifications +to show the updated content. The proposed push rule would mean that mobile clients would +no longer receive this update, but showing slightly outdated text on a notification screen +is only a minor impact and it would be better to separate when (& why) we send pushes vs. +when we generate notifications. + ## Alternatives None explored. From c0f11a1b86a650eb6788abe1d2b6e112b33d8bfe Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 8 Feb 2023 08:16:09 -0500 Subject: [PATCH 10/15] Update from anoa's feedback. --- ...suppress-notifications-of-message-edits.md | 37 ++++++++++++++++--- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/proposals/3958-suppress-notifications-of-message-edits.md b/proposals/3958-suppress-notifications-of-message-edits.md index 224e7fde2b..cc39858e51 100644 --- a/proposals/3958-suppress-notifications-of-message-edits.md +++ b/proposals/3958-suppress-notifications-of-message-edits.md @@ -55,14 +55,21 @@ portion of the spec: } ``` -## Potential issues - Some users may be depending on notifications of edits. If a user would like to revert to the old behavior they can disable the `.m.rule.suppress_edits` push rule. -If the message edits were allowed by other senders than it would be useful to -know that your own message was edited, but this -[is not currently allowed](https://spec.matrix.org/v1.5/client-server-api/#validity-of-replacement-events). +## Potential issues + +### Editing mentions + +With this MSC it would no longer possible to edit a message to change who is going +to be notified. For instance, if you write a message and then edit it to put another +user pill in it, in this case the user would not be notified. Socially it seems more +likely for the sender to send another message instead of editing: + +> @alice:example.com see above ^ + +### Rule Ambiguity The rule is ambiguous (see [MSC3873](https://github.com/matrix-org/matrix-spec-proposals/pull/3873)) due to the `.` in `m.relates_to` and could also match other, unrelated, events: @@ -90,6 +97,8 @@ due to the `.` in `m.relates_to` and could also match other, unrelated, events: (Note that `relates_to` being embedded inside of the `m`.) +### Keeping notifications up-to-date + Another issues is that mobile clients would no longer receive push notifications for message edits, which are currently used to update the text of on-screen notifications to show the updated content. The proposed push rule would mean that mobile clients would @@ -99,12 +108,28 @@ when we generate notifications. ## Alternatives -None explored. +An alternative solution would be to add a push rule with no actions and a condition to +check whether a notification should have been generated for the user in the original +message. + +This should be placed as an override rule before the `.m.rule.contains_display_name` +and the `.m.rule.roomnotif` [push rules](https://spec.matrix.org/v1.5/client-server-api/#push-rules). + +This would suppress duplicate notifications, while still allow for new notifications due +to new mentions or keywords changing. ## Security considerations None forseen. +## Future extensions + +If message edits by other senders were allowed than it would be useful to +know when your own message was edited, but this +[is not currently allowed](https://spec.matrix.org/v1.5/client-server-api/#validity-of-replacement-events). +A future MSC to define this behavior should take into account notifying +users in this situation. + ## Unstable prefix The unstable prefix of `.com.beeper.suppress_edits` should be used in place of From 876e19fa882f544cbfde1cb026ac0b9f7ef23647 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 31 May 2023 16:55:04 -0400 Subject: [PATCH 11/15] Updates for Matrix 1.7 --- ...suppress-notifications-of-message-edits.md | 85 ++++++++----------- 1 file changed, 35 insertions(+), 50 deletions(-) diff --git a/proposals/3958-suppress-notifications-of-message-edits.md b/proposals/3958-suppress-notifications-of-message-edits.md index cc39858e51..d1b45d5db3 100644 --- a/proposals/3958-suppress-notifications-of-message-edits.md +++ b/proposals/3958-suppress-notifications-of-message-edits.md @@ -10,9 +10,12 @@ if it includes `@room` (which is particularly bad in large rooms as every user is re-notified). This contributes to notification fatigue as the additional notifications contain no new information. +Additionally for users which have a room set to "all messages" then every event +edit results in a new notification. + ## Proposal -A new default push rule is added to suppress notifications due to [edits](https://spec.matrix.org/v1.5/client-server-api/#event-replacements). +A new default push rule is added to suppress notifications due to [edits](https://spec.matrix.org/v1.7/client-server-api/#event-replacements). ```json { @@ -21,19 +24,19 @@ A new default push rule is added to suppress notifications due to [edits](https: "enabled": true, "conditions": [ { - "kind": "event_match", - "key": "content.m.relates_to.rel_type", - "pattern": "m.replace" + "kind": "event_property_is", + "key": "content.m\\.relates_to.rel_type", + "value": "m.replace" } ], "actions": [] } ``` -This rule should be placed before the [`.m.rule.suppress_notices` rule](https://spec.matrix.org/v1.5/client-server-api/#default-override-rules) -as the first non-master, non-user added override rule. +This rule should be placed after the [`.m.rule.room.server_acl` rule](https://spec.matrix.org/v1.7/client-server-api/#default-override-rules) +as the last override rule. -It would match events such as those given in [event replacements](https://spec.matrix.org/v1.5/client-server-api/#event-replacements) +It would match events such as those given in [event replacements](https://spec.matrix.org/v1.7/client-server-api/#event-replacements) portion of the spec: ```json5 @@ -55,64 +58,43 @@ portion of the spec: } ``` +With the [updated mentions behavior in Matrix 1.7](https://spec.matrix.org/v1.7/client-server-api/#user-and-room-mentions), +this would allow the [`.m.rule.is_user_mention`](https://spec.matrix.org/v1.7/client-server-api/#_m_rule_is_user_mention) +and the [`.m.rule.is_room_mention`](https://spec.matrix.org/v1.7/client-server-api/#_m_rule_is_room_mention) +rules to continue matching, even for edited events, while suppressing notifications +from other edits. + Some users may be depending on notifications of edits. If a user would like to revert to the old behavior they can disable the `.m.rule.suppress_edits` push rule. ## Potential issues -### Editing mentions - -With this MSC it would no longer possible to edit a message to change who is going -to be notified. For instance, if you write a message and then edit it to put another -user pill in it, in this case the user would not be notified. Socially it seems more -likely for the sender to send another message instead of editing: - -> @alice:example.com see above ^ +### Edits of invites and tombstones -### Rule Ambiguity - -The rule is ambiguous (see [MSC3873](https://github.com/matrix-org/matrix-spec-proposals/pull/3873)) -due to the `.` in `m.relates_to` and could also match other, unrelated, events: - -```json5 -{ - "type": "m.room.message", - "content": { - "body": "* Hello! My name is bar", - "msgtype": "m.text", - "m.new_content": { - "body": "Hello! My name is bar", - "msgtype": "m.text" - }, - "m": { - "relates_to": { - "rel_type": "m.replace", - "event_id": "$some_event_id" - } - } - }, - // ... other fields required by events -} -``` - -(Note that `relates_to` being embedded inside of the `m`.) +The [`.m.rule.invite_for_me` and `.m.rule.tombstone`](https://spec.matrix.org/v1.7/client-server-api/#default-override-rules) +rules may still cause spurious notifications if events which match those rules +are edited. Both of those are state events and +[not subject to valid edits](https://spec.matrix.org/v1.7/client-server-api/#validity-of-replacement-events). ### Keeping notifications up-to-date -Another issues is that mobile clients would no longer receive push notifications for -message edits, which are currently used to update the text of on-screen notifications -to show the updated content. The proposed push rule would mean that mobile clients would -no longer receive this update, but showing slightly outdated text on a notification screen +Mobile clients currently depend on the push notifications of edited events to update the +text of on-screen notifications. The proposed push rule would result in mobile clients no +longer receiving these edits; but showing slightly outdated text on a notification screen is only a minor impact and it would be better to separate when (& why) we send pushes vs. when we generate notifications. +### Suppression of notifications to a new keyword + +If an event is edited and the new event (but not the original event) matches a keyword +then the notification would erroneously be suppressed. + ## Alternatives An alternative solution would be to add a push rule with no actions and a condition to -check whether a notification should have been generated for the user in the original -message. +check whether a notification was generated for the original message. -This should be placed as an override rule before the `.m.rule.contains_display_name` +This would be placed as an override rule before the `.m.rule.contains_display_name` and the `.m.rule.roomnotif` [push rules](https://spec.matrix.org/v1.5/client-server-api/#push-rules). This would suppress duplicate notifications, while still allow for new notifications due @@ -132,9 +114,12 @@ users in this situation. ## Unstable prefix -The unstable prefix of `.com.beeper.suppress_edits` should be used in place of +The unstable prefix of `.org.matrix.msc3958.suppress_edits` should be used in place of `.m.rule.suppress_edits`. +A previous version of this MSC used `.com.beeper.suppress_edits` with a different condition +(which should match the same events), but different rule placement. + ## Dependencies N/A From f93d03d4c566046c9da37ff7bf772b5f5b9938ab Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 31 May 2023 16:55:58 -0400 Subject: [PATCH 12/15] Update more spec links. --- proposals/3958-suppress-notifications-of-message-edits.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proposals/3958-suppress-notifications-of-message-edits.md b/proposals/3958-suppress-notifications-of-message-edits.md index d1b45d5db3..01acc897d9 100644 --- a/proposals/3958-suppress-notifications-of-message-edits.md +++ b/proposals/3958-suppress-notifications-of-message-edits.md @@ -1,6 +1,6 @@ # MSC3958: Suppress notifications from message edits -[Event replacement](https://spec.matrix.org/v1.5/client-server-api/#event-replacements) +[Event replacement](https://spec.matrix.org/v1.7/client-server-api/#event-replacements) (more commonly known as message edits) signals that a message is intended to be replaced with new content. @@ -95,7 +95,7 @@ An alternative solution would be to add a push rule with no actions and a condit check whether a notification was generated for the original message. This would be placed as an override rule before the `.m.rule.contains_display_name` -and the `.m.rule.roomnotif` [push rules](https://spec.matrix.org/v1.5/client-server-api/#push-rules). +and the `.m.rule.roomnotif` [push rules](https://spec.matrix.org/v1.7/client-server-api/#push-rules). This would suppress duplicate notifications, while still allow for new notifications due to new mentions or keywords changing. @@ -108,7 +108,7 @@ None forseen. If message edits by other senders were allowed than it would be useful to know when your own message was edited, but this -[is not currently allowed](https://spec.matrix.org/v1.5/client-server-api/#validity-of-replacement-events). +[is not currently allowed](https://spec.matrix.org/v1.7/client-server-api/#validity-of-replacement-events). A future MSC to define this behavior should take into account notifying users in this situation. From 5c603f0c47ff37175cee3b466c545b165c1fa34b Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Thu, 1 Jun 2023 13:40:23 -0400 Subject: [PATCH 13/15] Minor clarifications. Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> --- proposals/3958-suppress-notifications-of-message-edits.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/3958-suppress-notifications-of-message-edits.md b/proposals/3958-suppress-notifications-of-message-edits.md index 01acc897d9..641b8f10c9 100644 --- a/proposals/3958-suppress-notifications-of-message-edits.md +++ b/proposals/3958-suppress-notifications-of-message-edits.md @@ -80,7 +80,7 @@ are edited. Both of those are state events and Mobile clients currently depend on the push notifications of edited events to update the text of on-screen notifications. The proposed push rule would result in mobile clients no -longer receiving these edits; but showing slightly outdated text on a notification screen +longer receiving these edits; but showing slightly outdated text on a notification screen. That is only a minor impact and it would be better to separate when (& why) we send pushes vs. when we generate notifications. From 1128719764145cac61a9784edaaf96a826cbaba7 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 26 Jul 2023 08:49:35 -0400 Subject: [PATCH 14/15] Add downside about "all messages" --- ...suppress-notifications-of-message-edits.md | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/proposals/3958-suppress-notifications-of-message-edits.md b/proposals/3958-suppress-notifications-of-message-edits.md index 641b8f10c9..9b02d50f6f 100644 --- a/proposals/3958-suppress-notifications-of-message-edits.md +++ b/proposals/3958-suppress-notifications-of-message-edits.md @@ -89,6 +89,31 @@ when we generate notifications. If an event is edited and the new event (but not the original event) matches a keyword then the notification would erroneously be suppressed. +### Edits of rooms set to "all messages" + +A room can be configured to be notify for "all messages" by creating the earliest +[override push rule](https://spec.matrix.org/v1.7/client-server-api/#push-rules) +possible which matches the room ID & has `actions` set to "notify" [^1][^2], e.g.: + +```json +{ + "rule_id" : "!abcdef:example.com", + "conditions" : [ + { + "key" : "room_id", + "kind" : "event_match", + "pattern" : "!abcdef:example.com" + } + ], + "default" : false, + "enabled" : true, + "actions" : ["notify"] +} +``` + +Since this push rule would be evaluated before the new `.m.rule.suppress_edits` it would +still result in duplicate notifications for those rooms. + ## Alternatives An alternative solution would be to add a push rule with no actions and a condition to @@ -123,3 +148,9 @@ A previous version of this MSC used `.com.beeper.suppress_edits` with a differen ## Dependencies N/A + +[^1]: The [`.m.rule.master`](https://spec.matrix.org/v1.7/client-server-api/#default-override-rules) +is *always* first, so this rule gets created right after it. + +[^2]: See the [Element Web](https://github.com/matrix-org/matrix-react-sdk/blob/da7aa4055e04f291be9b5141b704bd12aec03d0c/src/RoomNotifs.ts#L162-L170) +implementation. From 33083c09906c2f8cd9265dba0f873a4d0daa04cf Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Wed, 26 Jul 2023 09:23:53 -0400 Subject: [PATCH 15/15] Clarify again that this *does* work with all messages. --- ...suppress-notifications-of-message-edits.md | 46 +++++++------------ 1 file changed, 16 insertions(+), 30 deletions(-) diff --git a/proposals/3958-suppress-notifications-of-message-edits.md b/proposals/3958-suppress-notifications-of-message-edits.md index 9b02d50f6f..52351b1ac9 100644 --- a/proposals/3958-suppress-notifications-of-message-edits.md +++ b/proposals/3958-suppress-notifications-of-message-edits.md @@ -11,7 +11,7 @@ is re-notified). This contributes to notification fatigue as the additional notifications contain no new information. Additionally for users which have a room set to "all messages" then every event -edit results in a new notification. +edit results in an additional notification.[^1] ## Proposal @@ -89,31 +89,6 @@ when we generate notifications. If an event is edited and the new event (but not the original event) matches a keyword then the notification would erroneously be suppressed. -### Edits of rooms set to "all messages" - -A room can be configured to be notify for "all messages" by creating the earliest -[override push rule](https://spec.matrix.org/v1.7/client-server-api/#push-rules) -possible which matches the room ID & has `actions` set to "notify" [^1][^2], e.g.: - -```json -{ - "rule_id" : "!abcdef:example.com", - "conditions" : [ - { - "key" : "room_id", - "kind" : "event_match", - "pattern" : "!abcdef:example.com" - } - ], - "default" : false, - "enabled" : true, - "actions" : ["notify"] -} -``` - -Since this push rule would be evaluated before the new `.m.rule.suppress_edits` it would -still result in duplicate notifications for those rooms. - ## Alternatives An alternative solution would be to add a push rule with no actions and a condition to @@ -149,8 +124,19 @@ A previous version of this MSC used `.com.beeper.suppress_edits` with a differen N/A -[^1]: The [`.m.rule.master`](https://spec.matrix.org/v1.7/client-server-api/#default-override-rules) -is *always* first, so this rule gets created right after it. + + +[^1]: A room can be configured to be notify for "all messages" by creating a [room-specific push rule](https://spec.matrix.org/v1.7/client-server-api/#push-rules) +with an `rule_id` of the room ID & has `actions` set to "notify" , e.g.: + + ```json + { + "rule_id" : "!abcdef:example.com", + "default" : false, + "enabled" : true, + "actions" : ["notify"] + } + ``` -[^2]: See the [Element Web](https://github.com/matrix-org/matrix-react-sdk/blob/da7aa4055e04f291be9b5141b704bd12aec03d0c/src/RoomNotifs.ts#L162-L170) -implementation. + See the [Element Web](https://github.com/matrix-org/matrix-react-sdk/blob/da7aa4055e04f291be9b5141b704bd12aec03d0c/src/RoomNotifs.ts#L162-L170) + implementation.