Skip to main content

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

  1. To mute on a chatroom use the method muteChatroom().
  2. Pass in the required parameters chatroomId and value.
  3. Set the value to true for muting a chatroom or false to unmute it.
  4. 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.

VariableTypeDescriptionOptional
chatroomIdnumberChatroom Id
valuebooleanMute value

Mute Chatroom Response

List of parameters for the response.

VariableTypeDescription
successbooleanAPI success status
error_messagestringError message in case of failure