- Android
- iOS
- JavaScript
- Flutter
- ReactNative
- HarmonyOS
Leave a chatroom. When a user is signed in on multiple devices and leaves from one device, all devices leave and the chatroom listener is triggered.
Example
//the quit result is delivered through the chatroom listener callback
String chatroomId = "chatroomId1";
JIM.getInstance().getChatroomManager().quitChatroom(chatroomId);
Leave a chatroom. When a user is signed in on multiple devices and leaves from one device, all devices leave and the chatroom listener is triggered.
Example
//the quit result is delivered through the chatroom listener callback
NSString *chatroomId = @"chatroomId1";
[JIM.shared.chatroomManager quitChatroom:chatroomId];
Leave a chatroom. When a user is signed in on multiple devices and leaves from one device, all devices leave and the chatroom member-change listener is triggered.
Parameters
| Name | Type | Required | Default | Description | Version |
|---|---|---|---|---|---|
| chatroom | Object | Yes | None | Chatroom object. | 1.6.0 |
| chatroom.id | String | Yes | None | Chatroom ID. | 1.6.0 |
Example
let chatroom = {
id: 'chatroom1001',
};
jim.quitChatroom(chatroom).then(() => {
console.log('quit chatroom successfully');
}, (error) => {
console.log('error', error);
});
Leave a chatroom. When a user is signed in on multiple devices and leaves from one device, all devices leave and the chatroom listener is triggered.
Example
String chatroomId = "chatroomId1";
await JuggleIm.instance.getChatroomManager().quitChatroom(chatroomId);
Leave a chatroom. When a user is signed in on multiple devices and leaves from one device, all devices leave and the chatroom listener is triggered.
Example
import JuggleIM from 'juggleim-rnsdk';
const chatroomId = "chatroomId1";
await JuggleIM.quitChatroom(chatroomId);
Leave a chatroom. When a user is signed in on multiple devices and leaves from one device, all devices leave and the chatroom listener is triggered.
Example
let chatroomId = "chatroomId1";
JuggleIm.instance.getChatroomManager().quitChatroom(chatroomId);