Group chat message notifications are received even after a member is kicked out of the group

Let’s assume User A and B are in a group. B kicks A out of the group and sends a message in the group. A still receives the message notifications even after being kicked out.

@aditya.gokula please let me know if there is a fix or a workaround for this.

Hello @Deepan,
Since at the moment CometChat uses topic based notifications, this will happen as the user needs to unsubscribe from the channel on being kicked which is not happening at your end.
For now, this can be handled in the below way:

  1. When you receive a real-time event for the user being kicked, you can check if the user that is kicked is the logged in user, you can unsubscribe to the push notification channel for the group from which the user was kicked from.
  2. When the push notification is received for user being kicked, again check if the user kicked is the logged in user, unsubscribe to the group channel.
    This should make sure that the user does not receive push notifications on being kicked from any group.
    This problem occurs as at the moment CometChat uses the topic based mechanism. We are in the process of migrating to token based mechanism. We have added your email to the list of subscribers for this feature request so that you are informed via email when we release this.
    Hope this helps.

Got it, thanks Aditya

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.