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
- To mark a chatroom as read, use the function
markReadChatroom()
. - Pass in the required parameter
chatroomId
. - 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.
Variable | Type | Description | Optional |
---|---|---|---|
chatroomId | number | Chatroom Id |
Mark Read Chatroom Response
List of parameters in the response.
Variable | Type | Description |
---|---|---|
success | boolean | API success status |
error_message | string | Error message in case of failure |