Join Chatroom
Joining a chatroom with LikeMinds React Native 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 Native Chat SDK.
Steps to Join a chatroom
- To join a chatroom use the method
followChatroom()
. - Pass in the required parameters
chatroomId
,uuid
andvalue
. - 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,
uuid: "23233", // member uuid
};
const response = await lmChatClient?.followChatroom(payload);
if (response.success) {
// Update followStatus to true in local db as well
await lmChatClient?.updateChatroomFollowStatus(chatroomId, true);
// 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.
Variable | Type | Description | Optional | |
---|---|---|---|---|
collabcardId | number | Chatroom Id | ||
uuid | string | Member Uuid | ✔️ | |
value | boolean | Follow value |
Join 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 |