syncUnreadCountWithReads

fun Channel.syncUnreadCountWithReads(currentUserId: UserId? = ChatClient.instance().getCurrentUser()?.id): Channel

Synchronizes the unread count of the channel with the read state of the current user.

Return

A new instance of the channel with the unread count synchronized with the read state of the current user.

Parameters

currentUserId

The ID of the current user. If not provided, the ID of the current user will be taken from the ChatClient if it is available.