Chatroom Service Configuration
The chatroom service does not require a separate application to activate, but some chatroom services need to be enabled and configured in the Console, such as Chatroom Broadcast, Cloud Storage for Chatroom Messages, and callback addresses related to chatrooms.
The configuration of chatroom services is primarily managed in the Basic features and Chat pricing plans pages.
Basic Features
The following are the basic features provided by the chatroom service:
- Single user joining multiple chatrooms: By default, a user can only join one chatroom. After enabling this feature, a user can join multiple chatrooms simultaneously.
- Chatroom status synchronization: This is a server-side callback service provided by RC. A valid callback address must be provided. Once configured, any status changes in the chatroom under the application will be synchronized in real-time to the developer's application server. The supported synchronization statuses include: creation, destruction, member joining, and member leaving. For details, refer to the Chatroom Status Update Callback section in the IM server documentation under "Chatroom Management."
- Fetching specified messages when joining a chatroom: By default, when joining a chatroom, users can fetch up to the last 50 messages of all types. After enabling this feature, users can specify the message types to fetch.
- Chatroom destruction wait time:
- The inactive chatroom destruction wait time can be configured. The default wait time is 1 hour, meaning that an inactive chatroom will be destroyed after 1 hour. Customers can adjust this time as needed, up to a maximum of 24 hours.
- When a chatroom is destroyed, a chatroom destruction notification will be sent to the chatroom members, allowing customers to customize some actions after the chatroom is destroyed (requires version 5.1.1 or later).
- A session ID is added to the chatroom, which remains unchanged during the chatroom's lifecycle and is regenerated after the chatroom is recreated. This allows clients to distinguish between multiple broadcasts using the same chatroom ID.
- Custom chatroom attributes: Custom attributes can be set in specified chatrooms for scenarios like voice live chatroom venue synchronization or recording user roles and game states in card games like Werewolf. For details, refer to the Chatroom Custom Attributes (KV) documentation under "Chatroom Business." If the App's business server requires RC to synchronize chatroom attribute changes, a valid callback address must be provided. Once configured, RC's server-side callback service will be automatically enabled. For details, refer to the Chatroom Attribute Synchronization section in the IM server documentation under "Chatroom Management."
- SDK users cannot send messages if not in the chatroom: By default, users can send messages to a chatroom even if they are not in it. After enabling this feature, users who are not in the chatroom cannot send messages to it via the client SDK. Note: This configuration does not affect the server-side chatroom message sending interface.
- Multi-device simultaneous online: One device leaving the chatroom causes all devices to leave: When a user is online on multiple devices and has joined the same chatroom, by default, if one device leaves the chatroom, the other devices do not. After enabling this feature, if one device leaves the chatroom, all other devices will also leave the chatroom.
Modifying Service Configuration
Visit the Basic Features page in the Console to adjust the basic feature configurations related to chatroom services.
IM Premium/Ultimate Features
The following image shows the General Services configuration related to chatroom services on the Chat pricing plans page in the Console.
These services can be used for free in the development environment. In the production environment, IM Premium Plan or IM Ultimate Plan is required to use the following services.
- Chatroom Broadcast: Send a message to all chatrooms in the application. The maximum size of a single message is 128k. For details, refer to the Send Chatroom Broadcast Message section in the IM server documentation under "Message Management."
- Global Chatroom Mute: When you want to prevent a user from speaking in all chatrooms, you can add this user to the global chatroom mute list. The muted user can receive and view chat messages but cannot send messages. For details, refer to the Global Mute User section in the IM server documentation under "Chatroom User Management."
- Chatroom Message Priority Service: Set specified message types as low-priority messages in a specific chatroom. When the server is under high load, low-priority messages are discarded first, ensuring that important messages are not discarded. For details, refer to the Add Low-Priority Message Type section in the IM server documentation under "Chatroom Message Priority Service."
- Chatroom Allowlist Service: After enabling this service, the following Server API functions can be used:
- Chatroom User Allowlist: This can be used to protect important users in specified chatrooms, supporting allowlist user settings by chatroom. For example, administrators, hosts, or other key roles in the App's business.
- Chatroom Message Allowlist: This can be used to protect specified message types in all chatrooms under the App. For example, custom red packet messages in the App's business.
- Chatroom Keepalive Service: When no one speaks in a chatroom for 1 hour and no one joins the chatroom, the RC server will automatically kick all members out of the chatroom and destroy the chatroom. Chatrooms with keepalive enabled will not be automatically destroyed and can be destroyed by calling the API interface. For details, refer to the Keepalive Chatroom section in the IM server documentation under "Chatroom Management."
- Cloud Storage for Chatroom Messages: Chat messages are stored in the cloud. After joining a chatroom, users can view previous messages in the chatroom. Historical messages are stored for 2 months by default.
- Fetching specified messages when joining a chatroom: When joining a chatroom, only specified message types are returned, and other types of messages are not returned.
Modifying Service Configuration
Visit the Chat pricing plans page in the development backend, switch to the General Services tab, and enable the following chatroom service configuration switches.
You can also adjust specific configurations for some services under the Extended Services tab.