[Push API] Fine-grained unsubscription

Currently the user can turn off notifications for a website directly from
the browser. When he unsubscribes all notifications from that website are
turned off.

However, it is a common practice (for example with email) to allow the user
to turn off only some topics (i.e. fine grained preferences). I think this
is a must for push notifications too.

A simple way to implement this would be to add an editPreferencesUrl option
to the pushManager.subscribe(). Then, when the user clicks the wheel to
turn off push notifications sees two options: "Turn off all notifications"
and "Manage push preferences on the website". When he clicks the latter is
sent to the editPreferencesUrl on the website.

It would also be very useful to be able to display a custom message before
the unsubscription happens. That message can appear above the unsubscribe
actions.

Another option would be to have a callback *before* the unsubscription:
that callback can show a single prompt to the user with a custom message
(e.g. "Are you sure? Remember that you can visit example.com if you want to
turn off only some notifications").


Marco Colli
Pushpad (https://pushpad.xyz)

Received on Monday, 4 April 2016 19:34:46 UTC