pusher / push-notifications-web

Beams Browser notifications
MIT License
39 stars 19 forks source link

Can't clear device interests #139

Open eyeshield2110 opened 1 year ago

eyeshield2110 commented 1 year ago

I have a button that, when I click on it, it should unsubscribe my device of all interests This is the code: image

The promise is resolved and fulfilled but the list of interests is not cleared.

Any other functions from the documentations such as getDeviceInterests work, so it's not an issue with my pusher beams instance.

benw-pusher commented 1 year ago

You may need to wait for the clearDeviceInterests function to resolve before using getDeviceInterests - the operation within our system is not completed immediately.

ghost commented 1 year ago

Also had this problem. Did remove them in a loop. This worked. .clearDeviceInterests has an issue i guess.

benw-pusher commented 1 year ago

Thanks @b6oh - I have been able to replicate this issue and can see the interests are not correctly removed when using clearDeviceInterests. I'll raise internally to get this reviewed.