Skip to main content

Mark Read Chatroom

In LikeMinds React Chat SDK, you have the ability to mark conversations within a chatroom as read. This feature enables you to keep track of your chatroom discussions and easily identify which messages have been viewed or not.

Steps to Mark a Chatroom as Read

  1. To mark a chatroom as read, use the function markReadChatroom().
  2. Pass in the required parameter chatroomId.
  3. Process the response as per your requirement.
const payload: any = {
chatroomId: 89899,
};
const response = await lmChatClient.markReadChatroom(payload);
if (response.success) {
// your function to process the response data
processResponse(response);
} else {
// your function to process error message
processError(response);
}

Mark Read Chatroom Payload

List of parameters for the markReadChatroom() method.

VariableTypeDescriptionOptional
chatroomIdnumberChatroom Id

Mark Read Chatroom Response

List of parameters in the response.

VariableTypeDescription
successbooleanAPI success status
error_messagestringError message in case of failure