Skip to main content

status

Listen to Chatroom Status Changes​

  • This method is called back when the chatroom status changes.
  • Chatroom status changes include the chatroom being reset, users manually destroying the chatroom by calling the IM Server API, and the IM Server automatically destroying the chatroom.

Method​

setOnChatRoomStatusChangedListener(listener?: (targetId: string, status: RCIMIWChatRoomStatus) => void): void;

Parameter Description​

Parameter NameParameter TypeDescription
targetIdstringConversation ID
statusRCIMIWChatRoomStatusThe changed status of the chatroom

Code Example​


engine?.setOnChatRoomStatusChangedListener((targetId: string, status: RCIMIWChatRoomStatus) => {
//...
});

Chatroom Member Change Listener​

This method is called back when users join or leave the chatroom.

Activate Service​

You can activate this feature in the RC Console by navigating to Chat > Chat settings > Chatroom > Listening for member change in chatrooms. Once activated, the system will send callback notifications to other members of the chatroom when a user joins or leaves, which may increase the message volume.

Method​

setOnChatRoomMemberChangedListener(listener?: (targetId: string, actions: Array<RCIMIWChatRoomMemberAction>) => void): void;

Parameter Description​

Parameter NameParameter TypeDescription
targetIdstringConversation ID
actionsArray<RCIMIWChatRoomMemberAction>The events that occurred

Code Example​


engine?.setOnChatRoomMemberChangedListener((targetId: string, actions: Array<RCIMIWChatRoomMemberAction>) => {
//...
});