Change the nick of the joining user AFTER sending all the join stuff
fix #3305
This commit is contained in:
@@ -152,8 +152,6 @@ void BiboumiComponent::handle_presence(const Stanza& stanza)
|
||||
if (type.empty())
|
||||
{
|
||||
const std::string own_nick = bridge->get_own_nick(iid);
|
||||
if (!own_nick.empty() && own_nick != to.resource)
|
||||
bridge->send_irc_nick_change(iid, to.resource, from.resource);
|
||||
const XmlNode* x = stanza.get_child("x", MUC_NS);
|
||||
const XmlNode* password = x ? x->get_child("password", MUC_NS): nullptr;
|
||||
const XmlNode* history = x ? x->get_child("history", MUC_NS): nullptr;
|
||||
@@ -182,6 +180,8 @@ 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);
|
||||
}
|
||||
else if (type == "unavailable")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user