You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a way to cancel previous push notification #399
Chess.com is a the primary source for this issue, trigger many notifications by using the website on a secondary device (this can be as simple as playing a daily game) then launch firefox, the queued notifications will start one after the other with no way to dismiss all sometimes taking several minutes to finish.
Here, there are two independent push subscriptions managed by one app server, tied to one user account. The app server triggers two push messages for an event, but even if the user got one from either of the subscriptions, there's no way for the app server to cancel another push message for another subscription.
Canceling already delivered push notification may be more tricky (would it allow abusing e.g. for effectively no-notification push?) but it still sounds reasonable to cancel a push message that hasn't delivered yet.
Using the "Topic" field to enable this ensures that the push service is able to know which messages to enable this treatment for, but it's equally possible that this could be done for all messages.
Activity
saschanaz commentedon Mar 30, 2025
The problem is that there's no unencrypted metadata field for push messages that push servers can read. 🤔 Add an HTTP header field instead?
martinthomson commentedon Mar 31, 2025
The original idea for this was to allow a DELETE on the resource that was created by the push service when a message is posted.
See https://datatracker.ietf.org/doc/html/rfc8030#section-5.4 for an example of replacement. In addition to that, you might imagine that a push service could support deletion.
From a request:
To which the server responds:
That example shows the message contents being replaced, but they could also be replaced with nothing (i.e., removed) as follows:
Using the "Topic" field to enable this ensures that the push service is able to know which messages to enable this treatment for, but it's equally possible that this could be done for all messages.