Chat groups are features that enable instant messaging among multiple chat users. The relationship between chat group members is persistent: chat group members can send and receive messages in the group and also receive push messages when they are offline.
Agora Chat has two types of chat group:
Chat groups have the following roles and privileges:
Chat groups and chat rooms both support instant messaging among multiple users. However, chat groups typically have a more consistent membership than chat rooms. Chat group users are normally connected to the group itself; chat room users are more likely to be connected by their interest in the subject of the chat room, and so they tend to join and leave more freely.
The specific feature differences are listed in the following table:
Feature | Chat group | Chat room |
---|---|---|
Use cases | Group chat scenarios in Signal and Skype, where members have a preexisting relationship with each other. | Stream chat scenarios in Twitch, where viewers have no relationship with each other. Once a member quits the stream channel, they leave the chat room. |
Maximum number of members | 5,000 | 20,000+ |
Message push support | Members receive push messages when they go offline. | Members do not receive push messages when they go offline. |
Message storage support | Supports message storage when a member is offline. Once online, this member receives all the stored messages. A maximum number of 200 messages can be stored for each group chat thread. | This feature can be enabled and disabled. If you enable this feature, the SDK supports message storage when a member is offline. Once online, this member receives all the stored messages. By default, 10 messages can be stored for each chat room thread, and you can set this number to a maximum value of 200. |
Message reliablity | All members receive all the messages in the chat group. | Members might not see all messages. The SDK discards messages if the chat group message threshold is exceeded. The default threshold is 100 messages per second. You can adjust this threshold according to your needs. |
The Agora Chat SDK supports creating and managing chat groups, managing group members, and modifying group attributes.
You can implement the following features with the chat group APIs.
Any chat user can create a chat group. A user that creates a chat group becomes its owner. The maximum number of chat groups and group members supported varies accroding to the pricing plan. For details, see Chat group total member limits.
Users can search for public chat groups and request to join them by the group ID. For private chat groups, you can only join the group if the group owner or admin sends you a group chat invitation.
Chat group members and admins can quit a chat group. Once they do, they no longer receive the group messages. Group owners cannot quit the chat group; instead, they must transfer ownship or disband the chat group. When a chat group is disbanded, all of its members are forced to leave the group.
Owners and admins for both public and private chat groups can invite other users to join their group.
Chat group owners and admins can remove a specified member from their group.
Only the group owner can disband a chat group. Once a chat group is disbanded, all local group data is deleted, and all the group members are forced to leave the group.
All the chat group users can retrieve a paginated list of the group's membership from the server. The members are displayed in descending order according to the timestamp when they joined the chat group.
Users can retrieve the list of groups they have created or joined.
All chat group members can block and unblock group messages. Once a user blocks group messages, they no longer receive messages from the specified chat group.
You can listen for chat group events such as when a user joins and leaves the group, and add app logic as needed.
Group owners or admins can add a specified group members to the block list; they can also remove blocked users from the list. Members added to the block list are forced to leave the chat group and can no longer join it.
Group owners and admins can retrieve the chat group block list. Members on the group block list cannot join the chat group.
Chat group owners and admins can add specified group members to the group allow list; they can also remove users from the list. Members on the allow list can send group messages when a group owner or an admin has muted all group members.
Chat group owners and admins can retrieve the chat group allow list. Members on the group allow list can still send group messages when a chat group owner or admin has muted all the group members.
Chat group owner or admin can add specifed group members to the group mute list. They can also remove them from list. Members on the mute list can no longer send chat group messages. Muted members still receive group messages.
Chat group owners and admins can mute or unmute all the chat group members simultaneously. Muting all members prevents anyone from sending group messages except the group owner, admins, and the group members on the group allow list. Muted members still receive group messages.
Chat group owners and admins can retrieve the chat group mute list. Members in the group mute list cannot send group messages.
A chat group owner can transfer ownership of the group to a specified group member. Once the ownership is transferred, the group owner becomes a regular group member.
Chat group owners can add members to the chat group admin list; they can also remove them from the list. Members on the admin list gain all admin privileges.
Chat group owners and admins can modify their chat group name and description. They can also set or update the group announcements. Chat group members can retrieve group announcements.
All the chat group members can upload or download group shared files. Chat group owners and admins can delete all group shared files, whereas group members can only delete shared files whey have personally uploaded.
Chat group owners and admins can update the extesnion information of the chat group. Extension information can be used to customize group extensions. The data length of the extension information cannot exceed 8 KB.
The maximum number of members per chat group depends on your pricing plan, as follows: 100 for Free, 10,000 for Starter, 50,000 for Pro, and custom (100,000 by default) for Enterprise.