code: function() {
          clearInterval(this._checkConnectionTimer);
          this._checkConnectionTimer = undefined;
          this.muc.joinedRooms = {};
          this._isLogout = true;
          this.helpers.setUserCurrentJid('');
  
          if (Utils.getEnv().browser) {
              this.connection.flush();
              this.connection.disconnect();
          } else {
              this.Client.end();
          }
      }
docs: Logout from the Chat. {@link https://quickblox.com/developers/Web_XMPP_Chat_Sample#Logout_from_Chat More info.}
  @memberof QB.chat