From 18818cded444946effd575f5edc1194b15e721c8 Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Mon, 5 Sep 2022 17:04:59 +0200 Subject: [PATCH 01/17] first cut --- .../9999-remote-push-notification-toggling.md | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 proposals/9999-remote-push-notification-toggling.md diff --git a/proposals/9999-remote-push-notification-toggling.md b/proposals/9999-remote-push-notification-toggling.md new file mode 100644 index 00000000000..4d169f04506 --- /dev/null +++ b/proposals/9999-remote-push-notification-toggling.md @@ -0,0 +1,99 @@ +# MSC9999: Remotely toggling push notifications for another client + +The [push notification API](https://spec.matrix.org/v1.3/client-server-api/#push-notifications) allows clients to +register HTTP pushers so that they can receive notifications. An HTTP pusher is always tied to a specific Matrix device +due to its `pushkey` property which is issued by the particular platform (e.g. an APNS token). As a client is aware of +its `pushkey`s, it can identify its own pushers and remove or read them as needed. There is, however, no way to modify a +client's pushers from another client logged into the same account because the latter isn't aware of the former's +`pushkey`s. + +This is limiting because it means that push notifications can only be en- or disabled on the device that is receiving +them. When the latter isn't currently at hand, this can become a point of frustration. + +The current proposal solves this problem by making the connection between HTTP pushers and Matrix devices explicit and +assigning an enabled state to every pusher. + +## Proposal + +### Pusher-dependent clients + +#### Disabling pushers +A new nullable field `is_disabled` is added to the `Pusher` model. + +In [POST /_matrix/client/v3/pushers/set](https://spec.matrix.org/v1.3/client-server-api/#post_matrixclientv3pushersset) +the value is optional and if omitted, defaults to `false`. + +In [GET /_matrix/client/v3/pushers](https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3pushers) the value +is always returned. + +Pushers that are disabled do not send +[`/notify`](https://spec.matrix.org/v1.3/push-gateway-api/#post_matrixpushv1notify) requests to push providers, or +produce email notifications. + +#### Explicitly linking device and pusher +A new field `device_id` is added to the `Pusher` model. To be able to remove Pushers when sessions are deleted home +servers must have some existing way to link a session to pusher, so exposing the `device_id` on http pushers should be +trivial. (Synapse, for instance, stores the [access +token](https://github.com/matrix-org/synapse/blob/develop/synapse/storage/databases/main/pusher.py#L487) when adding a +pusher) + +In [GET /_matrix/client/v3/pushers](https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3pushers) the value +is required when `kind` is `http`. If `kind` is _not_ `http`, the `device_id` field is null. + +In [POST /_matrix/client/v3/pushers/set](https://spec.matrix.org/v1.3/client-server-api/#post_matrixclientv3pushersset) +`device_id` is an invalid parameter and should raise an invalid request error. + + +### Pusher-less clients + +Pausing notifications for clients that create notifications outside of the Push Gateway will be handled separately. + +## Migration + +Clients that connect to a home server that doesn't yet support this proposal should interpret a missing `is_disabled` +value as `false`. + +Home servers should migrate pushers that were registered before this proposal so that `is_disabled` is `false` + +## Potential issues + +Adding an enabled state to pushers increases the complexity of the push notification API. In addition to a pusher +existing or not existing, implementations now have to also evaluate the pusher's `is_disabled` field. + +## Alternatives + +The spec allows for pushers to be assigned a +[`profile_tag`](https://spec.matrix.org/v1.3/client-server-api/#post_matrixclientv3pushersset) which can be used to +define per-device push rule sets. In combination with the `notify_in_app` action proposed in +[MSC3768](https://github.com/matrix-org/matrix-spec-proposals/pull/3768) this would allow to toggle a pusher between the +`global` push rule set and a push rule set where all rules with `notify` actions were overridden to use `notify_in_app`. +Furthermore, the overrides could be simplified through cascading profile tags as proposed in +[MSC3837](https://github.com/matrix-org/matrix-spec-proposals/pull/3837). Keeping the two sets in sync would, however, +not be trivial. Additionally, profile tags are only partially spec'ed and there is active interest in +[removing](https://github.com/matrix-org/matrix-spec/issues/637) them entirely. + +Another alternative is client-side notification filtering at the time of delivery which is supported on many platforms. +This feature could be (ab)used to create the _impression_ of paused push notifications. The downside, however, is that +this is not a true deactivation and the wasteful overhead of sending and processing push notifications still exists. + +Finally, when registering a pusher, a client could store the request body for +[/_matrix/client/v3/pushers/set](https://spec.matrix.org/v1.3/client-server-api/#post_matrixclientv3pushersset) in a +per-device account data event. Other clients of the same user could then issue network request on the client's behalf +using the body of said event. This appears somewhat kludgey though and would also conflict with existing home server +logic to store access tokens when adding or modifying pushers. + +## Security considerations + +None. + +## Unstable prefix + +Until this proposal lands + +- `is_disabled` should be referred to as `org.matrix.msc0000.is_disabled` +- `device_id` should be referred to as `org.matrix.msc0000.device_id` + +## Dependencies + +None. + From 1844be03c59a2c3cbc4120743c6ae667b7621a44 Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Mon, 5 Sep 2022 17:14:09 +0200 Subject: [PATCH 02/17] add tables --- .../9999-remote-push-notification-toggling.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/proposals/9999-remote-push-notification-toggling.md b/proposals/9999-remote-push-notification-toggling.md index 4d169f04506..f0f47027798 100644 --- a/proposals/9999-remote-push-notification-toggling.md +++ b/proposals/9999-remote-push-notification-toggling.md @@ -20,6 +20,10 @@ assigning an enabled state to every pusher. #### Disabling pushers A new nullable field `is_disabled` is added to the `Pusher` model. +| Name | Type | Description | +|------|------|-------------| +| `is_disabled` | boolean | Whether the pusher should actively create push notifications + In [POST /_matrix/client/v3/pushers/set](https://spec.matrix.org/v1.3/client-server-api/#post_matrixclientv3pushersset) the value is optional and if omitted, defaults to `false`. @@ -31,9 +35,16 @@ Pushers that are disabled do not send produce email notifications. #### Explicitly linking device and pusher -A new field `device_id` is added to the `Pusher` model. To be able to remove Pushers when sessions are deleted home -servers must have some existing way to link a session to pusher, so exposing the `device_id` on http pushers should be -trivial. (Synapse, for instance, stores the [access +A new field `device_id` is added to the `Pusher` model as returned from [GET +/_matrix/client/v3/pushers](https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3pushers). + +| Name | Type | Description | +|------|------|-------------| +| `device_id` | string | **Required.** The device_id of the session that registered the pusher + + +To be able to remove Pushers when sessions are deleted home servers must have some existing way to link a session to +pusher, so exposing the `device_id` on http pushers should be trivial. (Synapse, for instance, stores the [access token](https://github.com/matrix-org/synapse/blob/develop/synapse/storage/databases/main/pusher.py#L487) when adding a pusher) From 08c45ed1b9cd41b413779476266a99f00f6a3757 Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Mon, 5 Sep 2022 17:19:18 +0200 Subject: [PATCH 03/17] exlcude non-pusher notifs --- proposals/9999-remote-push-notification-toggling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/9999-remote-push-notification-toggling.md b/proposals/9999-remote-push-notification-toggling.md index f0f47027798..95fc662863d 100644 --- a/proposals/9999-remote-push-notification-toggling.md +++ b/proposals/9999-remote-push-notification-toggling.md @@ -57,7 +57,7 @@ In [POST /_matrix/client/v3/pushers/set](https://spec.matrix.org/v1.3/client-ser ### Pusher-less clients -Pausing notifications for clients that create notifications outside of the Push Gateway will be handled separately. +Pausing notifications for clients that create notifications outside of the Push Gateway will not be addressed in this MSC. ## Migration From 62eb14929549039b7fb2c243bb1731ea187a6ebe Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Mon, 5 Sep 2022 17:23:18 +0200 Subject: [PATCH 04/17] tweak headings --- proposals/9999-remote-push-notification-toggling.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/proposals/9999-remote-push-notification-toggling.md b/proposals/9999-remote-push-notification-toggling.md index 95fc662863d..53585d4a392 100644 --- a/proposals/9999-remote-push-notification-toggling.md +++ b/proposals/9999-remote-push-notification-toggling.md @@ -73,6 +73,8 @@ existing or not existing, implementations now have to also evaluate the pusher's ## Alternatives + +#### Profile tags The spec allows for pushers to be assigned a [`profile_tag`](https://spec.matrix.org/v1.3/client-server-api/#post_matrixclientv3pushersset) which can be used to define per-device push rule sets. In combination with the `notify_in_app` action proposed in @@ -83,10 +85,12 @@ Furthermore, the overrides could be simplified through cascading profile tags as not be trivial. Additionally, profile tags are only partially spec'ed and there is active interest in [removing](https://github.com/matrix-org/matrix-spec/issues/637) them entirely. +#### Client side notification filtering Another alternative is client-side notification filtering at the time of delivery which is supported on many platforms. This feature could be (ab)used to create the _impression_ of paused push notifications. The downside, however, is that this is not a true deactivation and the wasteful overhead of sending and processing push notifications still exists. +#### Caching pusher-client relationships in account_data Finally, when registering a pusher, a client could store the request body for [/_matrix/client/v3/pushers/set](https://spec.matrix.org/v1.3/client-server-api/#post_matrixclientv3pushersset) in a per-device account data event. Other clients of the same user could then issue network request on the client's behalf From 75ff4df0d4dc6d1b0133aeb41b54d8bc6b25e419 Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Mon, 5 Sep 2022 17:28:08 +0200 Subject: [PATCH 05/17] add msc number --- ...oggling.md => 3881-remote-push-notification-toggling.md} | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename proposals/{9999-remote-push-notification-toggling.md => 3881-remote-push-notification-toggling.md} (96%) diff --git a/proposals/9999-remote-push-notification-toggling.md b/proposals/3881-remote-push-notification-toggling.md similarity index 96% rename from proposals/9999-remote-push-notification-toggling.md rename to proposals/3881-remote-push-notification-toggling.md index 53585d4a392..54ffc7ff5c8 100644 --- a/proposals/9999-remote-push-notification-toggling.md +++ b/proposals/3881-remote-push-notification-toggling.md @@ -1,4 +1,4 @@ -# MSC9999: Remotely toggling push notifications for another client +# MSC3881: Remotely toggling push notifications for another client The [push notification API](https://spec.matrix.org/v1.3/client-server-api/#push-notifications) allows clients to register HTTP pushers so that they can receive notifications. An HTTP pusher is always tied to a specific Matrix device @@ -105,8 +105,8 @@ None. Until this proposal lands -- `is_disabled` should be referred to as `org.matrix.msc0000.is_disabled` -- `device_id` should be referred to as `org.matrix.msc0000.device_id` +- `is_disabled` should be referred to as `org.matrix.msc3881.is_disabled` +- `device_id` should be referred to as `org.matrix.msc3881.device_id` ## Dependencies From eef3fc53a168e3e19d70fd5b5c6ee05dd9ef0908 Mon Sep 17 00:00:00 2001 From: Kerry Date: Fri, 9 Sep 2022 11:25:54 +0200 Subject: [PATCH 06/17] Update proposals/3881-remote-push-notification-toggling.md Co-authored-by: Brendan Abolivier --- proposals/3881-remote-push-notification-toggling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/3881-remote-push-notification-toggling.md b/proposals/3881-remote-push-notification-toggling.md index 54ffc7ff5c8..246f189458b 100644 --- a/proposals/3881-remote-push-notification-toggling.md +++ b/proposals/3881-remote-push-notification-toggling.md @@ -45,7 +45,7 @@ A new field `device_id` is added to the `Pusher` model as returned from [GET To be able to remove Pushers when sessions are deleted home servers must have some existing way to link a session to pusher, so exposing the `device_id` on http pushers should be trivial. (Synapse, for instance, stores the [access -token](https://github.com/matrix-org/synapse/blob/develop/synapse/storage/databases/main/pusher.py#L487) when adding a +token](https://github.com/matrix-org/synapse/blob/3d201151152ca8ba9b9aae8da5b76a26044cc85f/synapse/storage/databases/main/pusher.py#L487) when adding a pusher) In [GET /_matrix/client/v3/pushers](https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3pushers) the value From ae4ec9f57727b3d35214e11ce3373cc27bf65195 Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Fri, 9 Sep 2022 11:49:40 +0200 Subject: [PATCH 07/17] invert is_disabled field to enabled --- .../3881-remote-push-notification-toggling.md | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/proposals/3881-remote-push-notification-toggling.md b/proposals/3881-remote-push-notification-toggling.md index 246f189458b..55b68b71f63 100644 --- a/proposals/3881-remote-push-notification-toggling.md +++ b/proposals/3881-remote-push-notification-toggling.md @@ -18,21 +18,20 @@ assigning an enabled state to every pusher. ### Pusher-dependent clients #### Disabling pushers -A new nullable field `is_disabled` is added to the `Pusher` model. +A new nullable field `enabled` is added to the `Pusher` model. | Name | Type | Description | |------|------|-------------| -| `is_disabled` | boolean | Whether the pusher should actively create push notifications +| `enabled` | boolean | Whether the pusher should actively create push notifications In [POST /_matrix/client/v3/pushers/set](https://spec.matrix.org/v1.3/client-server-api/#post_matrixclientv3pushersset) -the value is optional and if omitted, defaults to `false`. +the value is optional and if omitted, defaults to `true`. In [GET /_matrix/client/v3/pushers](https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3pushers) the value is always returned. -Pushers that are disabled do not send -[`/notify`](https://spec.matrix.org/v1.3/push-gateway-api/#post_matrixpushv1notify) requests to push providers, or -produce email notifications. +Pushers that are not enabled do not send +[`/notify`](https://spec.matrix.org/v1.3/push-gateway-api/#post_matrixpushv1notify) requests to push providers. #### Explicitly linking device and pusher A new field `device_id` is added to the `Pusher` model as returned from [GET @@ -61,15 +60,15 @@ Pausing notifications for clients that create notifications outside of the Push ## Migration -Clients that connect to a home server that doesn't yet support this proposal should interpret a missing `is_disabled` -value as `false`. +Clients that connect to a home server that doesn't yet support this proposal should interpret a missing `enabled` +value as `true`. -Home servers should migrate pushers that were registered before this proposal so that `is_disabled` is `false` +Home servers should migrate pushers that were registered before this proposal so that `enabled` is `true` ## Potential issues Adding an enabled state to pushers increases the complexity of the push notification API. In addition to a pusher -existing or not existing, implementations now have to also evaluate the pusher's `is_disabled` field. +existing or not existing, implementations now have to also evaluate the pusher's `enabled` field. ## Alternatives @@ -105,7 +104,7 @@ None. Until this proposal lands -- `is_disabled` should be referred to as `org.matrix.msc3881.is_disabled` +- `enabled` should be referred to as `org.matrix.msc3881.enabled` - `device_id` should be referred to as `org.matrix.msc3881.device_id` ## Dependencies From 8492d1506708d0e4c052a948fd1dc406975afc00 Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Fri, 9 Sep 2022 11:54:25 +0200 Subject: [PATCH 08/17] format --- .../3881-remote-push-notification-toggling.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/proposals/3881-remote-push-notification-toggling.md b/proposals/3881-remote-push-notification-toggling.md index 55b68b71f63..152c02826b1 100644 --- a/proposals/3881-remote-push-notification-toggling.md +++ b/proposals/3881-remote-push-notification-toggling.md @@ -30,8 +30,9 @@ the value is optional and if omitted, defaults to `true`. In [GET /_matrix/client/v3/pushers](https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3pushers) the value is always returned. -Pushers that are not enabled do not send -[`/notify`](https://spec.matrix.org/v1.3/push-gateway-api/#post_matrixpushv1notify) requests to push providers. +Pushers that are not enabled do not produce push notifications of any kind, either by sending +[`/notify`](https://spec.matrix.org/v1.3/push-gateway-api/#post_matrixpushv1notify) requests to push providers for +`http` pushers or otherwise. #### Explicitly linking device and pusher A new field `device_id` is added to the `Pusher` model as returned from [GET @@ -44,8 +45,8 @@ A new field `device_id` is added to the `Pusher` model as returned from [GET To be able to remove Pushers when sessions are deleted home servers must have some existing way to link a session to pusher, so exposing the `device_id` on http pushers should be trivial. (Synapse, for instance, stores the [access -token](https://github.com/matrix-org/synapse/blob/3d201151152ca8ba9b9aae8da5b76a26044cc85f/synapse/storage/databases/main/pusher.py#L487) when adding a -pusher) +token](https://github.com/matrix-org/synapse/blob/3d201151152ca8ba9b9aae8da5b76a26044cc85f/synapse/storage/databases/main/pusher.py#L487) +when adding a pusher) In [GET /_matrix/client/v3/pushers](https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3pushers) the value is required when `kind` is `http`. If `kind` is _not_ `http`, the `device_id` field is null. @@ -56,12 +57,13 @@ In [POST /_matrix/client/v3/pushers/set](https://spec.matrix.org/v1.3/client-ser ### Pusher-less clients -Pausing notifications for clients that create notifications outside of the Push Gateway will not be addressed in this MSC. +Pausing notifications for clients that create notifications outside of the Push Gateway will not be addressed in this +MSC. ## Migration -Clients that connect to a home server that doesn't yet support this proposal should interpret a missing `enabled` -value as `true`. +Clients that connect to a home server that doesn't yet support this proposal should interpret a missing `enabled` value +as `true`. Home servers should migrate pushers that were registered before this proposal so that `enabled` is `true` From e653dcf04081d417d91ad397d288aee25e40967e Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Tue, 13 Sep 2022 16:20:47 +0200 Subject: [PATCH 09/17] make device_id nullable --- proposals/3881-remote-push-notification-toggling.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proposals/3881-remote-push-notification-toggling.md b/proposals/3881-remote-push-notification-toggling.md index 152c02826b1..da1ed7a9012 100644 --- a/proposals/3881-remote-push-notification-toggling.md +++ b/proposals/3881-remote-push-notification-toggling.md @@ -40,13 +40,13 @@ A new field `device_id` is added to the `Pusher` model as returned from [GET | Name | Type | Description | |------|------|-------------| -| `device_id` | string | **Required.** The device_id of the session that registered the pusher +| `device_id` | string | **Nullable.** The device_id of the session that registered the pusher -To be able to remove Pushers when sessions are deleted home servers must have some existing way to link a session to +To be able to remove Pushers when sessions are deleted some home servers have some existing way to link a session to pusher, so exposing the `device_id` on http pushers should be trivial. (Synapse, for instance, stores the [access token](https://github.com/matrix-org/synapse/blob/3d201151152ca8ba9b9aae8da5b76a26044cc85f/synapse/storage/databases/main/pusher.py#L487) -when adding a pusher) +when adding a pusher, which is usually associated with a device) In [GET /_matrix/client/v3/pushers](https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3pushers) the value is required when `kind` is `http`. If `kind` is _not_ `http`, the `device_id` field is null. From 2a843ef66fc075837b43dab6012041df69ece9ca Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Thu, 22 Sep 2022 09:11:31 +0200 Subject: [PATCH 10/17] remove device_id illegal in post para --- proposals/3881-remote-push-notification-toggling.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/proposals/3881-remote-push-notification-toggling.md b/proposals/3881-remote-push-notification-toggling.md index da1ed7a9012..45c60b8b4d2 100644 --- a/proposals/3881-remote-push-notification-toggling.md +++ b/proposals/3881-remote-push-notification-toggling.md @@ -51,10 +51,6 @@ when adding a pusher, which is usually associated with a device) In [GET /_matrix/client/v3/pushers](https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3pushers) the value is required when `kind` is `http`. If `kind` is _not_ `http`, the `device_id` field is null. -In [POST /_matrix/client/v3/pushers/set](https://spec.matrix.org/v1.3/client-server-api/#post_matrixclientv3pushersset) -`device_id` is an invalid parameter and should raise an invalid request error. - - ### Pusher-less clients Pausing notifications for clients that create notifications outside of the Push Gateway will not be addressed in this From 8a7828271c3e25b3b604f83d21ba6c0d33c0732a Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Thu, 22 Sep 2022 09:13:40 +0200 Subject: [PATCH 11/17] use optional throughout --- proposals/3881-remote-push-notification-toggling.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/proposals/3881-remote-push-notification-toggling.md b/proposals/3881-remote-push-notification-toggling.md index 45c60b8b4d2..0eae2dab7fb 100644 --- a/proposals/3881-remote-push-notification-toggling.md +++ b/proposals/3881-remote-push-notification-toggling.md @@ -18,11 +18,11 @@ assigning an enabled state to every pusher. ### Pusher-dependent clients #### Disabling pushers -A new nullable field `enabled` is added to the `Pusher` model. +A new optional field `enabled` is added to the `Pusher` model. | Name | Type | Description | |------|------|-------------| -| `enabled` | boolean | Whether the pusher should actively create push notifications +| `enabled` | boolean | **Optional** Whether the pusher should actively create push notifications In [POST /_matrix/client/v3/pushers/set](https://spec.matrix.org/v1.3/client-server-api/#post_matrixclientv3pushersset) the value is optional and if omitted, defaults to `true`. @@ -35,12 +35,12 @@ Pushers that are not enabled do not produce push notifications of any kind, eith `http` pushers or otherwise. #### Explicitly linking device and pusher -A new field `device_id` is added to the `Pusher` model as returned from [GET +A new optional field `device_id` is added to the `Pusher` model as returned from [GET /_matrix/client/v3/pushers](https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3pushers). | Name | Type | Description | |------|------|-------------| -| `device_id` | string | **Nullable.** The device_id of the session that registered the pusher +| `device_id` | string | **Optional** The device_id of the session that registered the pusher To be able to remove Pushers when sessions are deleted some home servers have some existing way to link a session to @@ -49,7 +49,7 @@ token](https://github.com/matrix-org/synapse/blob/3d201151152ca8ba9b9aae8da5b76a when adding a pusher, which is usually associated with a device) In [GET /_matrix/client/v3/pushers](https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3pushers) the value -is required when `kind` is `http`. If `kind` is _not_ `http`, the `device_id` field is null. +is optional. ### Pusher-less clients From f93afcbfbacff439aa06095de863a83edbb9d90d Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Thu, 22 Sep 2022 09:16:54 +0200 Subject: [PATCH 12/17] add support flag to /versions --- proposals/3881-remote-push-notification-toggling.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/proposals/3881-remote-push-notification-toggling.md b/proposals/3881-remote-push-notification-toggling.md index 0eae2dab7fb..a22f0c42e4f 100644 --- a/proposals/3881-remote-push-notification-toggling.md +++ b/proposals/3881-remote-push-notification-toggling.md @@ -58,11 +58,19 @@ MSC. ## Migration +Home servers should indicate their support of this MSC by adding `org.matrix.msc3881` and `org.matrix.msc3881.stable` in +the response of `/_matrix/client/versions`. + Clients that connect to a home server that doesn't yet support this proposal should interpret a missing `enabled` value as `true`. Home servers should migrate pushers that were registered before this proposal so that `enabled` is `true` + + +# Adds support for remotely enabling/disabling pushers, as per MSC3881 + "org.matrix.msc3881": self.config.experimental.msc3881_enabled, + ## Potential issues Adding an enabled state to pushers increases the complexity of the push notification API. In addition to a pusher From b82104c8a9ad67dc6ab55eeb59bcb92209685cb3 Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Thu, 22 Sep 2022 10:36:57 +0200 Subject: [PATCH 13/17] remove copy paste mess --- proposals/3881-remote-push-notification-toggling.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/proposals/3881-remote-push-notification-toggling.md b/proposals/3881-remote-push-notification-toggling.md index a22f0c42e4f..c2bf482d340 100644 --- a/proposals/3881-remote-push-notification-toggling.md +++ b/proposals/3881-remote-push-notification-toggling.md @@ -66,11 +66,6 @@ as `true`. Home servers should migrate pushers that were registered before this proposal so that `enabled` is `true` - - -# Adds support for remotely enabling/disabling pushers, as per MSC3881 - "org.matrix.msc3881": self.config.experimental.msc3881_enabled, - ## Potential issues Adding an enabled state to pushers increases the complexity of the push notification API. In addition to a pusher From 469d540756d3e5ae08ebed57ebaf68b3aa2f7671 Mon Sep 17 00:00:00 2001 From: Kerry Date: Mon, 21 Nov 2022 14:35:00 +1300 Subject: [PATCH 14/17] Update proposals/3881-remote-push-notification-toggling.md Co-authored-by: Travis Ralston --- proposals/3881-remote-push-notification-toggling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/3881-remote-push-notification-toggling.md b/proposals/3881-remote-push-notification-toggling.md index c2bf482d340..7f3bb32d3ad 100644 --- a/proposals/3881-remote-push-notification-toggling.md +++ b/proposals/3881-remote-push-notification-toggling.md @@ -43,7 +43,7 @@ A new optional field `device_id` is added to the `Pusher` model as returned from | `device_id` | string | **Optional** The device_id of the session that registered the pusher -To be able to remove Pushers when sessions are deleted some home servers have some existing way to link a session to +To be able to remove Pushers when sessions are deleted some homeservers have some existing way to link a session to pusher, so exposing the `device_id` on http pushers should be trivial. (Synapse, for instance, stores the [access token](https://github.com/matrix-org/synapse/blob/3d201151152ca8ba9b9aae8da5b76a26044cc85f/synapse/storage/databases/main/pusher.py#L487) when adding a pusher, which is usually associated with a device) From 8fc3851cd0b9d50fc6a64b16220afd77fe6fd174 Mon Sep 17 00:00:00 2001 From: Kerry Date: Mon, 21 Nov 2022 14:35:25 +1300 Subject: [PATCH 15/17] Update proposals/3881-remote-push-notification-toggling.md Co-authored-by: Travis Ralston --- proposals/3881-remote-push-notification-toggling.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proposals/3881-remote-push-notification-toggling.md b/proposals/3881-remote-push-notification-toggling.md index 7f3bb32d3ad..795451d908d 100644 --- a/proposals/3881-remote-push-notification-toggling.md +++ b/proposals/3881-remote-push-notification-toggling.md @@ -61,7 +61,7 @@ MSC. Home servers should indicate their support of this MSC by adding `org.matrix.msc3881` and `org.matrix.msc3881.stable` in the response of `/_matrix/client/versions`. -Clients that connect to a home server that doesn't yet support this proposal should interpret a missing `enabled` value +Clients that connect to a homeserver that doesn't yet support this proposal should interpret a missing `enabled` value as `true`. Home servers should migrate pushers that were registered before this proposal so that `enabled` is `true` From ec835f1cb719e6b1a117dd6e661a5ba86331e4ea Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Mon, 21 Nov 2022 14:38:10 +1300 Subject: [PATCH 16/17] move migration section under unstable prefix heading --- .../3881-remote-push-notification-toggling.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/proposals/3881-remote-push-notification-toggling.md b/proposals/3881-remote-push-notification-toggling.md index c2bf482d340..3dd915d4cf5 100644 --- a/proposals/3881-remote-push-notification-toggling.md +++ b/proposals/3881-remote-push-notification-toggling.md @@ -56,16 +56,6 @@ is optional. Pausing notifications for clients that create notifications outside of the Push Gateway will not be addressed in this MSC. -## Migration - -Home servers should indicate their support of this MSC by adding `org.matrix.msc3881` and `org.matrix.msc3881.stable` in -the response of `/_matrix/client/versions`. - -Clients that connect to a home server that doesn't yet support this proposal should interpret a missing `enabled` value -as `true`. - -Home servers should migrate pushers that were registered before this proposal so that `enabled` is `true` - ## Potential issues Adding an enabled state to pushers increases the complexity of the push notification API. In addition to a pusher @@ -108,6 +98,16 @@ Until this proposal lands - `enabled` should be referred to as `org.matrix.msc3881.enabled` - `device_id` should be referred to as `org.matrix.msc3881.device_id` +### Migration + +Home servers should indicate their support of this MSC by adding `org.matrix.msc3881` and `org.matrix.msc3881.stable` in +the response of `/_matrix/client/versions`. + +Clients that connect to a home server that doesn't yet support this proposal should interpret a missing `enabled` value +as `true`. + +Home servers should migrate pushers that were registered before this proposal so that `enabled` is `true` + ## Dependencies None. From 5da3d986451e55e11e72839bedcd38bd7ab0b959 Mon Sep 17 00:00:00 2001 From: Kerry Archibald Date: Mon, 21 Nov 2022 16:56:04 +1300 Subject: [PATCH 17/17] further description about how users might use remote push toggle --- proposals/3881-remote-push-notification-toggling.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/proposals/3881-remote-push-notification-toggling.md b/proposals/3881-remote-push-notification-toggling.md index 3dd915d4cf5..d4ec673aaec 100644 --- a/proposals/3881-remote-push-notification-toggling.md +++ b/proposals/3881-remote-push-notification-toggling.md @@ -11,7 +11,10 @@ This is limiting because it means that push notifications can only be en- or dis them. When the latter isn't currently at hand, this can become a point of frustration. The current proposal solves this problem by making the connection between HTTP pushers and Matrix devices explicit and -assigning an enabled state to every pusher. +assigning an enabled state to every pusher. This enables clients to remotely silence (and un-silence) notifications for +other devices. For users with multiple active devices, this means they can avoid unwanted interruptions or duplicate +pings without having to switch context and physically retrieve each device to change settings. A common example is +silencing a mobile device once you sit down at your desktop. ## Proposal