Sets custom chat room attributes.
Optional
deleteOptional
overwrite?: booleanIf certain attributes fail to be set, the SDK returns a map of the attributes in key-value format, where the key is the attribute key and the value is the reason for the failure.
params
true
: Yes.false
: No.true
: Yes.false
: No.A description of the exception. See ChatError.
Adds a chat room admin.
Only the chat room owner can call this method.
The chat room ID.
The user ID of the chat room admin to be added.
A description of the exception. See ChatError.
Adds members to the allow list of the chat room.
Only the chat room owner or admin can call this method.
The chat room ID.
The user IDs of members to be added to the allow list of the chat room.
A description of the exception. See ChatError.
Adds a chat room listener.
The listener to add.
Adds the specified members to the block list of the chat room.
Only the chat room owner or admin can call this method.
The chat room ID.
The user IDs of members to be added to block list of the chat room.
A description of the exception. See ChatError.
Modifies the chat room description.
Only the chat room owner can call this method.
The chat room ID.
The new description of the chat room.
A description of the exception. See ChatError.
Changes the chat room name.
Only the chat room owner can call this method.
The chat room ID.
The new name of the chat room.
A description of the exception. See ChatError.
Transfers the chat room ownership.
Only the chat room owner can call this method.
The chat room ID.
The user ID of the new chat room owner.
A description of the exception. See ChatError.
Creates a chat room.
The chat room name.
Optional
description: stringThe chat room description.
Optional
welcome: stringA welcome message for new chat room members.
Optional
members: string[]The list of members invited to join the chat room.
The maximum number of members allowed to join the chat room.
The chat room instance.
A description of the exception. See ChatError.
Destroys a chat room.
Only the chat room owner can call this method.
The chat room ID.
A description of the exception. See ChatError.
Gets the allow list from the server.
Only the chat room owner or admin can call this method.
The chat room ID.
The allow list of the chat room.
A description of the exception. See ChatError.
Gets the chat room announcement from the server.
The chat room ID.
The chat room announcement.
A description of the exception. See ChatError.
Gets custom chat room attributes from the server.
The chat room ID.
Optional
keys: string[]The key list of custom attributes to get. If you set it as null
or leave it empty, this method retrieves all custom attributes.
Custom chat room attributes in key-value format.
A description of the exception. See ChatError.
Gets the chat room block list with pagination.
Only the chat room owner or admin can call this method.
The chat room ID.
The page number, starting from 1.
The number of users on the block list that you expect to get on each page.
The user IDs of the chat room members on the block list.
A description of the exception. See ChatError.
Gets the details of the chat room from the server.
By default, the details do not include the chat room member list.
The chat room ID.
The chat room instance. The SDK returns undefined
if the chat room does not exist.
A description of the exception. See ChatError.
Gets the chat room member list.
The chat room ID.
The cursor position from which to start to get data.
At the first method call, if you set cursor
as null
or an empty string, the SDK gets the data in the reverse chronological order of when users join the chat room.
The number of members that you expect to get on each page.
The list of chat room members and the cursor for the next query. See ChatCursorResult.
A description of the exception. See ChatError.
Uses the pagination to get the list of members who are muted in the chat room.
This method gets data from the server.
Only the chat room owner or admin can call this method.
The chat room ID.
The page number, starting from 1.
The number of muted members that you expect to get on each page.
The user IDs of muted members.
A description of the exception. See ChatError.
Gets chat room data from the server with pagination.
The page number, starting from 1.
The number of chat rooms that you expect to get on each page.
The list of obtained chat rooms. See ChatPageResult.
A description of the exception. See ChatError.
Gets the chat room by ID from the local database.
The chat room ID.
The chat room instance. The SDK returns undefined
if the chat room does not exist.
A description of the exception. See ChatError.
Checks whether the member is on the allow list of the chat room.
The chat room ID.
Whether the member is on the allow list of the chat room.
- true
: Yes.
- false
: No.
A description of the exception. See ChatError.
Joins the chat room.
To leave the chat room, you can call leaveChatRoom.
The ID of the chat room to join.
A description of the exception. See ChatError.
Leaves the chat room.
The ID of the chat room to leave.
A description of the exception. See ChatError.
Mutes all members.
Only the chat room owner or admin can call this method.
The chat room owner, admins, and members added to the allow list cannot be muted.
The chat room ID.
A description of the exception. See ChatError.
Mutes the specified members in a chat room.
Only the chat room owner or admin can call this method.
The chat room ID.
The user IDs of members to be muted.
The mute duration in milliseconds.
A description of the exception. See ChatError.
Removes custom chat room attributes.
Optional
forced?: booleanIf certain attributes fail to be removed, the SDK returns a map of the attributes in key-value format, where the key is the attribute key and the value is the reason for the failure.
params
true
: Yes.false
: No.A description of the exception. See ChatError.
Removes administrative privileges of a chat room admin.
The chat room ID.
The user ID of the chat room admin whose administrative privileges are to be removed.
A description of the exception. See ChatError.
Removes the specified members from a chat room.
Only the chat room owner or admin can call this method.
The chat room ID.
The user IDs of the members to be removed.
A description of the exception. See ChatError.
Removes members from the allow list of the chat room.
Only the chat room owner or admin can call this method.
The chat room ID.
The user IDs of members to be removed from the allow list of the chat room.
A description of the exception. See ChatError.
Removes the chat room listener.
The listener to remove.
Removes the specified members from the block list of the chat room.
Only the chat room owner or admin can call this method.
The chat room ID.
The user IDs of members to be removed from the block list of the chat room.
A description of the exception. See ChatError.
Unmutes all members of the chat room.
Only the chat room owner or admins can call this method.
The chat room ID.
A description of the exception. See ChatError.
Unmutes the specified members in a chat room.
Only the chat room owner or admin can call this method.
The chat room ID.
The user IDs of members to be unmuted.
A description of the exception. See ChatError.
Updates the chat room announcement.
Only the chat room owner or admin can call this method.
The chat room ID.
The new chat room announcement.
A description of the exception. See ChatError.
Protected
Static
_callProtected
Static
check
The chat room manager class, which manages user operations, like joining and leaving the chat room and retrieving the chat room list, and manages member privileges.