Group channel overview
Group chat is a common multi-user communication method in instant messaging applications. A group typically contains two or more users. The group channel service supports rich features including member management, mute management, offline message push, and message history roaming. You can use group channels for interest groups, work groups, customer service communication, and more. ChatUI provides out-of-the-box UI components for group chat channels.
Service configuration
The client SDK supports group channel features by default. No separate service activation is required. You can configure some basic features on the Service Configuration page in the IM service console.
- No limit on the number of group channels that can be created under an App Key. No limit on the number of group channels a single user can join.
- Group channels have a capacity limit. The default maximum number of members is 3,000. You can 联系客服 modify this limit.
- By default, the Cloud Storage for Direct and Group Messages service is not enabled for an App Key. You can enable this service in the console (the original help center link is deprecated). For production environment App Keys, only IM Flagship Edition and IM Premium Edition can enable this service.
- By default, users can only view group messages sent after they join the group. After enabling the New User Access to Pre-Join Group Message History service, new members can retrieve group message history from before they joined (the original help center link is deprecated).
Client SDK usage notes
- The client SDK (ChatUI / Chat SDK) does not provide complete group governance capabilities. Core group management operations such as create, dismiss, join, and quit should be implemented by your app server calling the server-side API. See Group management functions below.
- Group owner, group administrator, group announcement, invitation to join, and group ID search are all group business logic features that you must implement in your app.
- The platform only delivers messages to all users in the group channel. It does not maintain member profiles (avatar, name, member card, etc.). Your app must maintain this data on your business server and implement the relevant ChatUI interfaces to provide data to ChatUI. See the following documentation:
Group management functions
For client developers, basic management operations such as creating and dismissing group channels only require interaction with your app's business server. Your app server calls the corresponding server-side API (Server API) to complete these operations.
| Server API | Description |
|---|---|
| Create group, Dismiss group | Provide the creator user ID, group channel ID, and group name to request group creation from the server. When a group is dismissed, the member relationships no longer exist. |
| Join group, Quit group | After joining a group, users can view new messages generated after joining by default. After quitting a group, users no longer receive new messages from that group. |
| Refresh group info | Modify the group channel information used in the push service. |
| Query group members | Query the user IDs of all members in a specified group channel. |
| Query user's groups | Query all group channels that a user has joined based on user ID. Returns group channel IDs and group names. The platform does not store group profile information. Group profiles and member information must be maintained on your application server. If your application server's user-group relationship data is incomplete, you can use this interface to verify and reconcile data. |
| Sync user's groups | Synchronize all group channels that a specified user has joined to the server. This prevents inconsistency between the user-group information in your app and the user's group information on the server. If your app server already has group and member data before integrating the service, you can use this interface to synchronize the existing user-group relationships on first connection. |
| Mute specified group members | Mute one or more users in a specified single group channel or in all group channels. Muted users can receive and view messages from other users in the group, but cannot send messages through the client SDK. |
| Set group-wide mute | Mute all members of a group channel. All members of the muted group cannot send messages. When certain users need to be able to speak, you can add them to the group mute whitelist. |
| Add to group-wide mute whitelist | After a group is muted group-wide, users in the mute whitelist can send group messages. |