Secret Chatroom Invite
LikeMinds React Native Chat SDK offers a convenient feature for sending secret chatroom invites. It allows you to send invites to a specific user within a group chat.
Steps to send Secret Chatroom Invite to a participant
- Send Invite to selected members using
sendInvites()
method. - Pass the required parameters
chatroomId
,isSecret
andchatroomParticipants
. - Process the response of type
LMResponse<Nothing>
as per your requirement.
const payload: any = {
chatroomId: "ENTER_CHATROOM_ID",
isSecret: true,
chatroomParticipants: ["ENTER_LIST_OF_IDs_OF_PARTICIPANTS"],
};
const response = await myClient?.sendInvites(payload);
if (response.success) {
// your function to process the response data
processResponse();
} else {
// your function to process error message
processError(response);
}
Secret Chatroom Invite Payload
List of parameters for the sendInvites()
function.
Variable | Type | Description | Optional |
---|---|---|---|
chatroomId | number | Chatroom Id | |
isSecret | boolean | true if chatroom is secret | |
chatroomParticipants | array | List the IDs of participants |