Do not change our nick if we send a presence to a non-joined channel
fix #3378
This commit is contained in:
@@ -185,8 +185,13 @@ void BiboumiComponent::handle_presence(const Stanza& stanza)
|
|||||||
}
|
}
|
||||||
bridge->join_irc_channel(iid, to.resource, password ? password->get_inner(): "",
|
bridge->join_irc_channel(iid, to.resource, password ? password->get_inner(): "",
|
||||||
from.resource, history_limit, x != nullptr);
|
from.resource, history_limit, x != nullptr);
|
||||||
if (!own_nick.empty() && own_nick != to.resource)
|
const IrcClient* irc = bridge->find_irc_client(iid.get_server());
|
||||||
bridge->send_irc_nick_change(iid, to.resource, from.resource);
|
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")
|
else if (type == "unavailable")
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user