Now i have a group which have more than ten thousand members and for a group i have created a topic(Notification topic) where all the users in the group subscribed to that t
There is currently no parameter of any sort to exclude a specific user from receiving a message from a topic they are subscribed to. However, as a workaround, you could simply have a custom implementation on building the payload and handling the message to receive it.
Depending on how you build your payload, you could just add a custom key-value pair that includes the user id of the one who posted the data (something like posterId
or simply userId
).
Then on your client side, when handling the push notification, just check if the id is the user's or not. If it is the same user, don't show the notification, else show it. e.g.:
if (userId == currentUserId) {
// if user is the one that sent the message, don't show the notification
return;
}
Even though this question is already answered and a bit old, there's a workaround. So therefore I will still add the answer for future reference. What you can do is unsubscribe the user from the topic, send the message to the topic and subscribe the user once again. Sure that is a bit more work and calls to Firebase, but then you've got what you want.
Just a thought