~singpolyma/biboumi

55f74349259fa0037de98d30d70b50396c4804f5 — louiz’ 7 years ago b7789fe
Do not remove our resources if the QUIT message doesn't come from us
1 files changed, 3 insertions(+), 2 deletions(-)

M src/bridge/bridge.cpp
M src/bridge/bridge.cpp => src/bridge/bridge.cpp +3 -2
@@ 881,11 881,12 @@ void Bridge::send_muc_leave(Iid&& iid, std::string&& nick, const std::string& me
      for (const auto &res: this->resources_in_chan[iid.to_tuple()])
        this->xmpp.send_muc_leave(std::to_string(iid), std::move(nick), this->make_xmpp_body(message),
                                  this->user_jid + "/" + res, self);
      this->remove_all_resources_from_chan(iid.to_tuple());
      if (self)
        this->remove_all_resources_from_chan(iid.to_tuple());

    }
  IrcClient* irc = this->find_irc_client(iid.get_server());
  if (irc && irc->number_of_joined_channels() == 0)
  if (self && irc && irc->number_of_joined_channels() == 0)
    this->quit_or_start_linger_timer(iid.get_server());
}