leaveRoom method

  1. @override
void leaveRoom(
  1. String bareRoom
)
override

Implementation

@override
void leaveRoom(String bareRoom) {
  /*
   * By joining a room we join to:
   * Messages topic (for chat messages)
   * Events topic (for events like typing, chatmarker..)
   *
   */
  String messagesTopic = bareRoom.toChattingTopic;
  String eventsTopic = bareRoom.toRoomEventsTopic;

  if (_client == null) {
    return;
  }
  _client!.unsubscribe(messagesTopic);
  _client!.unsubscribe(eventsTopic);
}