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 unread messages in all channels

By using the getTotalUnreadMessageCount() method, you can retrieve the total number of unread messages of a user in all group channels the user joined.

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