summaryrefslogtreecommitdiff
path: root/src/xmpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-03-23 21:17:44 +0100
committerlouiz’ <louiz@louiz.org>2018-03-23 21:18:52 +0100
commitd81a9456ac33d7be8e494a6e7af01b45b8fa2478 (patch)
tree0a72eed2af858e91b91bab2ad9921b083e3d9724 /src/xmpp
parente2fc3cf68e1dc145e75fe67f2543765ff00ba839 (diff)
downloadbiboumi-d81a9456ac33d7be8e494a6e7af01b45b8fa2478.tar.gz
biboumi-d81a9456ac33d7be8e494a6e7af01b45b8fa2478.tar.bz2
biboumi-d81a9456ac33d7be8e494a6e7af01b45b8fa2478.tar.xz
biboumi-d81a9456ac33d7be8e494a6e7af01b45b8fa2478.zip
Change the nick of the joining user AFTER sending all the join stuff
fix #3305
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/biboumi_component.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xmpp/biboumi_component.cpp b/src/xmpp/biboumi_component.cpp
index 02383f6..26e8035 100644
--- a/src/xmpp/biboumi_component.cpp
+++ b/src/xmpp/biboumi_component.cpp
@@ -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")
{