canMarkAsUnread
fun canMarkAsUnread(markAsUnreadEnabled: Boolean, currentUser: User?, message: Message, ownCapabilities: Set<String>): Boolean
Determines whether messages in the channel can be marked as unread.
Messages can be marked as unread when:
Mark as unread functionality is enabled in the UI configuration
The user has the capability to receive read events in the channel
The message was not sent by the current user (users cannot mark their own messages as unread)
Return
true if the message can be marked as unread, false otherwise.
Parameters
markAsUnreadEnabled
Whether the mark as unread feature is enabled in the UI.
currentUser
The currently authenticated user.
message
The message to check for mark as unread eligibility.
ownCapabilities
The set of capabilities the current user has in the channel.