Leave Community
The Leave Community method allows users to gracefully exit a community by handling the necessary backend processes, such as updating membership records and adjusting access permissions. This function ensures a smooth user experience while departing from a community, maintaining data integrity and security.
Leaving a community
- For an user to leave a community, use the
leaveCommunity()
method of the client you initialised. - Pass in the required parameter
uuids
which is a list of string. - Process the response as per your requirement.
const payload: any = {
uuids: [89899], // pass in user's uuids.
};
const response = await lmChatClient.leaveCommunity(payload);
if (response.success) {
// your function to process the response data
processResponse(response);
} else {
// your function to process error message
processError(response);
}
Leave Community Payload
List of parameters supported.
Variable | Type | Description | Optional |
---|---|---|---|
uuids | strings[] | List of uuids of user who want to leave the community | ✔️ |
Leave Community Response
List of parameters in the response.
Variable | Type | Description |
---|---|---|
success | boolean | API success status |
error_message | string | Error message in case of failure |