Chat / JavaScript
Chat JavaScript v4
Chat JavaScript
Chat
JavaScript
Version 4
Home
/
Chat
/
JavaScript
/
Message

Retrieve number of channels with unread messages

Copy link

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();