Hi,
Im trying to send push notification to all users excluding mine (the sender). As I learned there are no standard ways to exclude one user from receiving notification posted to a channel so I’m trying to work around it.
My idea is to:
- Before sending the notification, save the list of all channels my device is registered to.
- Deregister from the channel i’m going to post my notification to. (in practice deregister from all channels)
- Send notification to that channel.
- Register again to all channels I saved earlier.
That should be easy, i just call getRegistration for my deviceId - > access “channels” property and do the magic. BUT when I access the channels array it contains only the last channel I registered my device to.
Does calling “registerDevice…” with just one, new channel automatically deregisters the device from all the other, previously subscribed channels instead of just adding the new channel to the list?
Is it possible to do what i specified in points 1-4 at all ?