leaveRoom abstract method

Future<ZIMRoomLeftResult> leaveRoom(
  1. String roomID
)

Leave a room.

Available since: 2.1.5 or above.

Description: When users in the room need to leave the room, they can join this room through leaveRoom.

Use cases: In the multi-person chat scenario, when users in the room need to leave the room, they can leave the room through this interface.

When to call: After creating a ZIM instance via create, it can be called when the user is in the room.

Caution: If the current user is not in this room, the exit fails. When everyone leaves the room, the room will be automatically destroyed.

Related callbacks: The result of leaving the room can be obtained through the ZIMRoomLeftResult callback.

Related APIs: You can create a room through createRoom and join a room with joinRoom.

roomID ID of the room to leave.

Implementation

Future<ZIMRoomLeftResult> leaveRoom(String roomID);