Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70435

How to manage fcm topic based subscriptions from user's device and admin device?

$
0
0

I have an ionic app, where I need to manage subscriptions to firebase cloud messaging.
I have users and groups of users, when something is added to the group data, I need to notify users of this group, so I am subscribing users to topics (topic is group id).
I am wondering when to subscribe users to topics, knowing that an admin can search for a user and send him a connection request, then the user accept the connection request (user is subscribed from his device - I know how to do it), and a user can send a connection request and group admin can accept that request (need to subscribe new user device from admin device) (here where I am wondering how to manage subscriptions).
I am building this app for both web (a custom service) and mobile (plugin @ionic-native/fcm) apps.
Notes:

  1. A users must subscribe to topic when the connection request is accepted by him or by the admin.
  2. A user must unsubscribe when he leaves the group or when the admin remove him from it.

Questing: How to save users token when subscribing and unsubscribing him to group topic from admin device?

Any suggestion is appreciated.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 70435

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>