/ SDKs / .NET
SDKs
Chat SDKs .NET v4
Chat SDKs .NET
Chat SDKs
.NET
Version 4

Retrieve number of channels with unread messages

Copy link

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

SbGroupChannelTotalUnreadMessageCountParams unreadMessageCountParams = new SbGroupChannelTotalUnreadMessageCountParams();

SendbirdChat.GroupChannel.GetTotalUnreadChannelCount(unreadMessageCountParams, (inCount, inError) =>
{
    if (inError != null)
        return; // Handle error.
    
    // Further processing using inCount if needed.
});