From f2f28497330f688827be224f1c840187ad8f2c9e Mon Sep 17 00:00:00 2001 From: Giom Foret <gforet@matrix.org> Date: Fri, 20 Oct 2023 14:22:09 +0200 Subject: [PATCH 1/4] Add a new push rule tweak to disable email notification --- proposals/40XX-dont_email_tweak.md | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 proposals/40XX-dont_email_tweak.md diff --git a/proposals/40XX-dont_email_tweak.md b/proposals/40XX-dont_email_tweak.md new file mode 100644 index 00000000000..211b547dd7c --- /dev/null +++ b/proposals/40XX-dont_email_tweak.md @@ -0,0 +1,37 @@ +# MSC40XX: Add a push rule tweak to disable email notification + +A user may set up a pusher to receive emails with unread notifications (see the spec [here](https://spec.matrix.org/v1.8/client-server-api/#post_matrixclientv3pushersset) with `kind` = "email"). Note that in the current Synapse implementation this pusher sends emails on a delay of ~10 minutes to give people time to see the notification and mark it as read. It looks like some other server implementations don't support email pushers though (see details in [this comment](https://github.com/matrix-org/matrix-spec-proposals/pull/4028#discussion_r1364373223)). + +In order to support mentions-and-keywords-only notifications in encrypted rooms on clients which get push notifications, we introduced in [MSC4028](https://github.com/matrix-org/matrix-spec-proposals/pull/4028) a new predefined **override** push rule (`.m.rule.encrypted_event`). When this rule is enabled, the server pushes all encrypted events except for muted rooms. The resulting notifications are not relevant for the email notifications. They concern encrypted events which may contain an actual notification or not. The server implementations which support email notifications should ignore in the email the events pushed because of this new push rule. Otherwise the users will receive an immense amount more email notifications. This will cause people to treat those emails as spam. + +The present proposal attempts to resolve this situation by introducing a new push rule tweak to disable the email notification for a push rule when it triggers a notification for an event. + +## Proposal + +A new tweak `dont_email` is introduced in the push rules [`actions`](https://spec.matrix.org/latest/client-server-api/#actions) definition. + +- **`dont_email`** -- A boolean representing whether or not this event should be notified by email too. If a `dont_email` tweak is given with no value, its value is defined to be true. If no dont_email tweak is given at all then the value of `dont_email` is defined to be false. + +The servers which implement email notifications have to check this tweak before adding a new notification in the email. No change is expected in the client implementation. + +## Potential issues + +None. + +## Alternatives + +Another option was to define a new action `push_but_dont_notify`. We prefer the new tweak option because no change is required in the client implementations. They can ignore it. + +About the naming of this new tweak, `http_only` has been suggested too (if we don't want a negative). We prefer `dont_email` in case a new kind of pusher is introduced later. + +## Security considerations + +None. + +## Unstable prefix + +While this MSC is not considered stable, `dont_email` should be referred to as `org.matrix.msc40XX.dont_email`. + +## Dependencies + +None. From 3f9e7234bf4ef06355ec73f9f3b635130a987959 Mon Sep 17 00:00:00 2001 From: Giom Foret <gforet@matrix.org> Date: Fri, 20 Oct 2023 14:24:00 +0200 Subject: [PATCH 2/4] Update MSC number --- proposals/40XX-dont_email_tweak.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proposals/40XX-dont_email_tweak.md b/proposals/40XX-dont_email_tweak.md index 211b547dd7c..898ab985ded 100644 --- a/proposals/40XX-dont_email_tweak.md +++ b/proposals/40XX-dont_email_tweak.md @@ -1,4 +1,4 @@ -# MSC40XX: Add a push rule tweak to disable email notification +# MSC4062: Add a push rule tweak to disable email notification A user may set up a pusher to receive emails with unread notifications (see the spec [here](https://spec.matrix.org/v1.8/client-server-api/#post_matrixclientv3pushersset) with `kind` = "email"). Note that in the current Synapse implementation this pusher sends emails on a delay of ~10 minutes to give people time to see the notification and mark it as read. It looks like some other server implementations don't support email pushers though (see details in [this comment](https://github.com/matrix-org/matrix-spec-proposals/pull/4028#discussion_r1364373223)). @@ -30,7 +30,7 @@ None. ## Unstable prefix -While this MSC is not considered stable, `dont_email` should be referred to as `org.matrix.msc40XX.dont_email`. +While this MSC is not considered stable, `dont_email` should be referred to as `org.matrix.msc4062.dont_email`. ## Dependencies From ebb5cf4b389da5e65e2e41ffe3e0be52a823594a Mon Sep 17 00:00:00 2001 From: Giom Foret <gforet@matrix.org> Date: Fri, 20 Oct 2023 14:25:33 +0200 Subject: [PATCH 3/4] update proposal title --- proposals/{40XX-dont_email_tweak.md => 4062-dont_email_tweak.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename proposals/{40XX-dont_email_tweak.md => 4062-dont_email_tweak.md} (100%) diff --git a/proposals/40XX-dont_email_tweak.md b/proposals/4062-dont_email_tweak.md similarity index 100% rename from proposals/40XX-dont_email_tweak.md rename to proposals/4062-dont_email_tweak.md From 1440ecb2f51cf007d859f0fa72e132a8cf57ecd1 Mon Sep 17 00:00:00 2001 From: Giom Foret <gforet@matrix.org> Date: Mon, 23 Oct 2023 09:59:52 +0200 Subject: [PATCH 4/4] limit lines to approximately 120 characters --- proposals/4062-dont_email_tweak.md | 37 ++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/proposals/4062-dont_email_tweak.md b/proposals/4062-dont_email_tweak.md index 898ab985ded..e530ad2cc33 100644 --- a/proposals/4062-dont_email_tweak.md +++ b/proposals/4062-dont_email_tweak.md @@ -1,18 +1,33 @@ # MSC4062: Add a push rule tweak to disable email notification -A user may set up a pusher to receive emails with unread notifications (see the spec [here](https://spec.matrix.org/v1.8/client-server-api/#post_matrixclientv3pushersset) with `kind` = "email"). Note that in the current Synapse implementation this pusher sends emails on a delay of ~10 minutes to give people time to see the notification and mark it as read. It looks like some other server implementations don't support email pushers though (see details in [this comment](https://github.com/matrix-org/matrix-spec-proposals/pull/4028#discussion_r1364373223)). - -In order to support mentions-and-keywords-only notifications in encrypted rooms on clients which get push notifications, we introduced in [MSC4028](https://github.com/matrix-org/matrix-spec-proposals/pull/4028) a new predefined **override** push rule (`.m.rule.encrypted_event`). When this rule is enabled, the server pushes all encrypted events except for muted rooms. The resulting notifications are not relevant for the email notifications. They concern encrypted events which may contain an actual notification or not. The server implementations which support email notifications should ignore in the email the events pushed because of this new push rule. Otherwise the users will receive an immense amount more email notifications. This will cause people to treat those emails as spam. - -The present proposal attempts to resolve this situation by introducing a new push rule tweak to disable the email notification for a push rule when it triggers a notification for an event. +A user may set up a pusher to receive emails with unread notifications (see the spec +[here](https://spec.matrix.org/v1.8/client-server-api/#post_matrixclientv3pushersset) with `kind` = "email"). Note that +in the current Synapse implementation this pusher sends emails on a delay of ~10 minutes to give people time to see the +notification and mark it as read. It looks like some other server implementations don't support email pushers though +(see details in [this comment](https://github.com/matrix-org/matrix-spec-proposals/pull/4028#discussion_r1364373223)). + +In order to support mentions-and-keywords-only notifications in encrypted rooms on clients which get push notifications, +we introduced in [MSC4028](https://github.com/matrix-org/matrix-spec-proposals/pull/4028) a new predefined **override** +push rule (`.m.rule.encrypted_event`). When this rule is enabled, the server pushes all encrypted events except for +muted rooms. The resulting notifications are not relevant for the email notifications. They concern encrypted events +which may contain an actual notification or not. The server implementations which support email notifications should +ignore in the email the events pushed because of this new push rule. Otherwise the users will receive an immense amount +more email notifications. This will cause people to treat those emails as spam. + +The present proposal attempts to resolve this situation by introducing a new push rule tweak to disable the email +notification for a push rule when it triggers a notification for an event. ## Proposal -A new tweak `dont_email` is introduced in the push rules [`actions`](https://spec.matrix.org/latest/client-server-api/#actions) definition. +A new tweak `dont_email` is introduced in the push rules +[`actions`](https://spec.matrix.org/latest/client-server-api/#actions) definition. -- **`dont_email`** -- A boolean representing whether or not this event should be notified by email too. If a `dont_email` tweak is given with no value, its value is defined to be true. If no dont_email tweak is given at all then the value of `dont_email` is defined to be false. +- **`dont_email`** -- A boolean representing whether or not this event should be notified by email too. If a +`dont_email` tweak is given with no value, its value is defined to be true. If no dont_email tweak is given at all then +the value of `dont_email` is defined to be false. -The servers which implement email notifications have to check this tweak before adding a new notification in the email. No change is expected in the client implementation. +The servers which implement email notifications have to check this tweak before adding a new notification in the +email. No change is expected in the client implementation. ## Potential issues @@ -20,9 +35,11 @@ None. ## Alternatives -Another option was to define a new action `push_but_dont_notify`. We prefer the new tweak option because no change is required in the client implementations. They can ignore it. +Another option was to define a new action `push_but_dont_notify`. We prefer the new tweak option because no change is +required in the client implementations. They can ignore it. -About the naming of this new tweak, `http_only` has been suggested too (if we don't want a negative). We prefer `dont_email` in case a new kind of pusher is introduced later. +About the naming of this new tweak, `http_only` has been suggested too (if we don't want a negative). We prefer +`dont_email` in case a new kind of pusher is introduced later. ## Security considerations