Chat / JavaScript
Chat JavaScript v4
Chat JavaScript
Chat
JavaScript
Home
/
Chat
/
JavaScript
/
Message
This is the new Docs for Chat SDK v4 for JavaScript. To see the previous Docs, click here.

Retrieve number of channels with unread messages

By using the getTotalUnreadChannelCount() method, you can retrieve the total number of group channels in which a user has one or more unread messages.

const count = await sb.groupChannel.getTotalUnreadChannelCount();