joinRoom method

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

Implementation

@override
void joinRoom(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;

  _client!.subscribe(messagesTopic, MqttQos.atLeastOnce);
  _client!.subscribe(eventsTopic, MqttQos.atLeastOnce);
}