JavaScript API - getUnreadMessageCount() doesn't return unread messages for all groups

I am trying to use the JavaScript SDK to get the total unread message count for all users and all groups:

CometChat.getUnreadMessageCount().then((count) => {
      console.log(count)
});

This returns the correct unread message count for users, but only the unread count for one of the groups that I am subscribed to?

Is there a criteria for returning the unread message count?

Is anyone able to help with this?

Hello @neeko,

CometChat.getUnreadMessageCount() method will only return unread count for all users & group conversations of which the logged-in user is part of.

Warm Regards,

CometChat Pro
Mayur Bhandari

Hi @mayur.bhandari,

I apart of these channels but still not getting the unread notifications for groups via the api.

Is anyone able to help debug this?

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