~singpolyma/biboumi

88fe1783bfd58ea0dca9e9e507a046e5c982b779 — louiz’ 4 years ago 08085d8
Do not change our nick if we send a presence to a non-joined channel

fix #3378
1 files changed, 7 insertions(+), 2 deletions(-)

M src/xmpp/biboumi_component.cpp
M src/xmpp/biboumi_component.cpp => src/xmpp/biboumi_component.cpp +7 -2
@@ 185,8 185,13 @@ void BiboumiComponent::handle_presence(const Stanza& stanza)
            }
          bridge->join_irc_channel(iid, to.resource, password ? password->get_inner(): "",
                                   from.resource, history_limit, x != nullptr);
          if (!own_nick.empty() && own_nick != to.resource)
            bridge->send_irc_nick_change(iid, to.resource, from.resource);
          const IrcClient* irc = bridge->find_irc_client(iid.get_server());
          if (irc)
            {
              const auto chan = irc->find_channel(iid.get_local());
              if (chan->joined)
                bridge->send_irc_nick_change(iid, to.resource, from.resource);
            }
        }
      else if (type == "unavailable")
        {