/ SDKs / JavaScript
SDKs
Chat SDKs JavaScript v4
Chat SDKs JavaScript
Chat SDKs
JavaScript
Version 4

Retrieve number of unread messages in all channels

Copy link

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

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

TotalUnreadMessageCountParams

Copy link
Property nameTypeDescription

channelCustomTypesFilter

string[]

Channels with the specified custom channel types are returned.

superChannelFilter

SuperChannelFilter

Channels matching the specified group channel types are returned. Acceptable values are ALL, EXCLUSIVE_ONLY, SUPER, and NON_SUPER.