Mute/Unmute Chatroom
Muting a chatroom in LikeMinds React Chat SDK ensures that you won't receive any notifications for new conversations happen within that chatroom.
Steps to Mute/Unmute a Chatroom
- To mute on a chatroom use the method
muteChatroom()
. - Pass in the required parameters
chatroomId
andvalue
. - Set the
value
totrue
for muting a chatroom orfalse
to unmute it. - Process the response as per your requirement.
const payload: any = {
chatroomId: 89899, //Your chatroom id.
value: true, // true if you want to mute the chatroom or false for unmuting.
};
const response = await lmChatClient.muteChatroom(payload);
if (response.success) {
// your function to process the response data
processResponse(response);
} else {
// your function to process error message
processError(response);
}
Mute Chatroom Payload
List of parameters for the muteChatroom()
method.
Variable | Type | Description | Optional |
---|---|---|---|
chatroomId | number | Chatroom Id | |
value | boolean | Mute value |
Mute Chatroom Response
List of parameters for the response.
Variable | Type | Description |
---|---|---|
success | boolean | API success status |
error_message | string | Error message in case of failure |