Skip to main content

Join Chatroom

Joining a chatroom with LikeMinds React Chat SDK allows you to receive all the conversations happening within that chatroom.Experience real-time engagement and never miss out on any important conversations by joining the chatroom using LikeMinds React Chat SDK.

Steps to Join a chatroom

  1. To join a chatroom use the method followChatroom().
  2. Pass in the required parameters chatroomId and value.
  3. Process the response as per your requirement.
// To leave a chatroom, set the value to false
const payload: any = {
collabcardId: 89899, //your chatroom id
value: true,
memberId: 1234,
};
const response = await lmChatClient.followChatroom(payload);

if (response.success) {
// your function to process the response data
processResponse(response);
} else {
// your function to process error message
processError(response);
}

Join Chatroom Payload

List of parameters for the followChatroom() method.

VariableTypeDescriptionOptional
collabcardIdnumberChatroom Id
memberIdnumberMember Id
valuebooleanFollow value

Join Chatroom Response

List of parameters in the response.

VariableTypeDescription
successbooleanAPI success status
error_messagestringError message in case of failure