Accepts a group invitation.
The group ID.
The user ID of the inviter.
Accepts a join request.
Only the group owner or admin can call this method.
The group ID.
The ID of the user who sends a request to join the group.
Adds a group admin.
Only the group owner can call this method and group admins cannot.
The group ID.
The user ID of the admin to add.
Adds members to the allow list of the group.
Only the group owner or admin can call this method.
The group ID.
The user IDs of members to be added to the allow list of the group.
Adds a group listener.
The group listener to add.
Adds users to the group.
Only the group owner or admin can call this method.
The group ID.
The array of new members to add.
(optional) The welcome message.
Blocks group messages.
The user that blocks group messages is still a group member, but cannot receive group messages.
The group ID.
Adds the user to the block list of the group.
Users will be first removed from the group they have joined before being added to the block list of the group. The users on the group block list cannot join the group again.
Only the group owner or admin can call this method.
The group ID.
The array of user IDs of members to be added to the block list.
Modifies the group description.
Only the group owner or admin can call this method.
The group ID.
The new group description.
Changes the group name.
Only the group owner or admin can call this method.
The group ID.
The new group name.
Transfers the group ownership.
Only the group owner can call this method.
The group ID.
The user ID of the new group owner.
Creates a group instance.
After the group is created, the data in the memory and database will be updated and multiple devices will receive the notification event and update the group to the memory and database.
You can set ChatGroupEventListener to listen for the event.
The options for creating a group. They are optional and cannot be null
. See ChatGroupOptions.
The options are as follows:
false
, indicating that invitees are automatically added to the group without their permission.The group name. It is optional. Pass null
if you do not want to set this parameter.
The group description. It is optional. Pass null
if you do not want to set this parameter.
The group member array. The group owner ID is optional. This parameter cannot be null
.
The group joining invitation. It is optional. Pass null
if you do not want to set this parameter.
The created group instance.
Declines a group invitation.
The group ID.
The user ID of the inviter.
The reason for declining the invitation.
Declines a join request.
Only the group owner or admin can call this method.
The group ID.
The ID of the user who sends a request to join the group.
The reason of declining the join request.
Destroys the group instance.
Only the group owner can call this method.
The group ID.
Downloads the shared file of the group.
The group ID.
The ID of the shared file.
The local path of the shared file.
(Optional) The file upload result callback.
Uses the pagination to get the allow list of the group from the server.
Only the group owner or admin can call this method.
The group ID.
The allow list of the group.
Gets the group announcement from the server.
All group members can call this method.
The group ID.
The group announcement.
Uses the pagination to get the group block list from the server.
Only the group owner or admin can call this method.
The group ID.
The number of group members on the block list that you expect to get on each page.
The page number, starting from 1.
The group block list.
Uses the pagination to get the shared files of the group from the server.
The group ID.
The number of shared files that you get on each page.
The page number, starting from 1.
The shared file list.
Gets the group information from the server.
The group ID.
Whether to get group member information:
- true
: Yes. This method can return information of at most 200 group members. To get information of all group members, you can call fetchMemberListFromServer.
- false
: No.
The group instance. The SDK returns undefined
if the group does not exist.
Gets the list of groups that the current user has joined.
This method gets data from the server.
This method returns a group list which does not contain member information. If you want to update information of a group to include its member information, call fetchMemberListFromServer.
The number of groups that you expect to return on each page [1, 20].
The page number, starting from 0.
The list of groups that the current user joins.
Gets all custom attributes of a group member.
The group ID.
The user ID of the group member whose all custom attributes are retrieved.
The user attributes.
Uses the pagination to get the member list of the group from the server.
The group ID.
The number of group members that you expect to get on each page.
The cursor position from which to start to get data. At the first method call, if you set cursor
as null
, the SDK gets the data in the reverse chronological order of when users join the group.
The group member list and the cursor for the next query. See ChatCursorResult.
Gets custom attributes of multiple group members by attribute key.
The group ID.
The array of user IDs of group members whose custom attributes are retrieved.(limitation is ten. More than callback error. )
The array of keys of custom attributes to be retrieved.
The users attributes.
Uses the pagination to get the mute list of the group from the server.
Only the group owner or admin can call this method.
The group ID.
The number of muted members that you expect to get on each page.
The page number, starting from 1.
The group mute list.
Gets public groups from the server with pagination.
The number of public groups that you expect on each page.
The cursor position from which to start to get data. At the first method call, if you set cursor
as null
, the SDK gets the data in the reverse chronological order of when groups are created.
The group list and the cursor for the next query. See ChatCursorResult.
Gets the group instance from the memory by group ID.
The group ID.
The group instance. The SDK returns undefined
if the group does not exist.
Gets the list of groups that the current user has joined.
This method gets data from the local database.
The group list.
Invites users to join the group.
This method works only for groups with the following styles:
PrivateOnlyOwnerInvite
style: Only the group owner can invite users to join the group.PrivateMemberCanInvite
style: Each group member can invite users to join the group.PublicJoinNeedApproval
style: Each group member can invite users to join the group and users can join a group only after getting approval from the group owner or admins.The group ID.
The array of user IDs of new members to invite.
The invitation reason.
Gets whether the member is on the allow list of the group.
The group ID.
Whether the current user is on the allow list of the group.
true
: Yes.false
: No.Joins a public group.
For a group that requires no authentication,users can join it freely without obtaining permissions from the group owner or admin.
For a group that requires authentication, users need to wait for the group owner or admin to agree before joining the group. For details, see ChatGroupStyle.
The group ID.
Leaves a group.
The group ID.
Mutes all members.
Only the group owner or admin can call this method.
The group ID.
Mutes group members.
Only the group owner or admin can call this method.
The group ID.
The list of user IDs of members to mute.
The mute duration in milliseconds. It is a reserved parameter.
Removes a group admin.
Only the group owner can call this method.
The group ID.
The user ID of the group admin to remove.
Clears all group listeners.
Removes members from the allow list of the group.
Only the group owner or admin can call this method.
The group ID.
The user IDs of members to be removed from the allow list of the group.
Removes the group listener.
The group listener to remove.
Removes a shared file of the group.
Group members can delete their own uploaded files. The group owner or admin can delete all shared files.
The group ID.
The ID of the shared file.
Removes a member from the group.
Only the group owner or admin can call this method.
The group ID.
The user ID of the member to be removed.
Requests to join a group.
You can call this method to only join public groups requiring authentication, i.e., groups with the style of ChatGroupStyle.PublicJoinNeedApproval.
The group ID.
The reason for requesting to join the group.
Sets custom attributes of a group member.
The group ID.
The array of user IDs of group members whose custom attributes are retrieved.(limitation is ten. More than callback error. )
Unmutes all group members.
Only the group owner or admin can call this method.
The group ID.
Unmutes group members.
Only the group owner or admin can call this method.
The group ID.
The array of user IDs of members to be unmuted.
Unblocks group messages.
The group ID.
Removes users from the group block list.
Only the group owner or admin can call this method.
The group ID.
The user IDs of members to be removed from the group block list.
Updates the group announcement.
Only the group owner or admin can call this method.
The group ID.
The group announcement.
Updates the group extension field.
Only the group owner or admin can call this method.
The group ID.
The updated group extension field.
Uploads the shared file to the group.
When a shared file is uploaded, the upload progress callback will be triggered.
The group ID.
The local path of the shared file.
(Optional) The file upload result callback.
Generated using TypeDoc
export manager