-
Notifications
You must be signed in to change notification settings - Fork 399
MSC3881: Remotely toggle push notifications for another client #3881
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
Open
kerryarchibald
wants to merge
18
commits into
main
Choose a base branch
from
kerry/remote-push-toggle
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
18818cd
first cut
1844be0
add tables
08c45ed
exlcude non-pusher notifs
62eb149
tweak headings
75ff4df
add msc number
eef3fc5
Update proposals/3881-remote-push-notification-toggling.md
ae4ec9f
invert is_disabled field to enabled
8492d15
format
e653dcf
make device_id nullable
2a843ef
remove device_id illegal in post para
8a78282
use optional throughout
f93afcb
add support flag to /versions
b82104c
remove copy paste mess
469d540
Update proposals/3881-remote-push-notification-toggling.md
8fc3851
Update proposals/3881-remote-push-notification-toggling.md
ec835f1
move migration section under unstable prefix heading
5da3d98
further description about how users might use remote push toggle
8a6bc04
Merge branch 'kerry/remote-push-toggle' of github.com:matrix-org/matr…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
format
- Loading branch information
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This section should not be under the "Proposal" heading, but rather the "Unstable prefix" heading: compatibility is determined by spec version support, not by unstable flags |
||
|
||
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 | ||
kerryarchibald marked this conversation as resolved.
Show resolved
Hide resolved
kerryarchibald marked this conversation as resolved.
Show resolved
Hide resolved
|
||
as `true`. | ||
|
||
Home servers should migrate pushers that were registered before this proposal so that `enabled` is `true` | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason for this restriction? I don't think it would be too much of an issue to generalise this to
email
pushers, even if we're not using it in clients at the moment.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think maybe there was a semantic reason. For
http
pushers, the client will treatdevice_id
as the device receiving the notifications whereas foremail
pushers that doesn't work.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, though I guess technically in both cases
device_id
is the device that added the pusher and forhttp
pushers clients can make the implicit assumption that that device is also the one receiving the notifications. So it's probably fine to allowdevice_id
regardless of the pusher type.