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

Retrieve number of unread messages in all channels

Copy link

Using the GetTotalUnreadMessageCount() method, you can retrieve the total number of a user's unread messages in all group channels the user has joined.

SbGroupChannelTotalUnreadMessageCountParams unreadMessageCountParams = new SbGroupChannelTotalUnreadMessageCountParams();

SendbirdChat.GroupChannel.GetTotalUnreadMessageCount(unreadMessageCountParams, (inGroupChannelCount, inFeedChannelCount, inError) =>
{
    if (inError != null)
        return; // Handle error.

    // Further actions or processing using inGroupChannelCount and inFeedChannelCount if necessary.
});