uniqush / uniqush-push

Uniqush is a free and open source software system which provides a unified push service for server side notification to apps on mobile devices.
http://uniqush.org
Apache License 2.0
1.53k stars 201 forks source link

Add an option to remove all subscriptions for a user #216

Open TysonAndre opened 5 years ago

TysonAndre commented 5 years ago

Reason: this is slightly more convenient than fetching subscriptions and deleting them individually.

Add a new option alldevices=1 to delete any subscriptions from the service (or comma separated service list?)

/unsubscribe?service=<servicename>&subscriber=uniqush.client1234&alldevices=1

Example use case: A user of an app has deleted their account (which affects all devices), so the backend (using uniqush) would free up the memory used for the subscription and prevent new pushes.

This should report success if all device tokens or regids were deleted (and services/psps were fetched successfully), even if there was nothing to delete