summaryrefslogtreecommitdiff
path: root/src/xmpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-02-17 01:43:58 +0100
committerFlorent Le Coz <louiz@louiz.org>2014-02-17 01:43:58 +0100
commitcf9f3a1f2855b358aa9bbc31f234801e9e1efc28 (patch)
treea89ac719df9cd7cbd4fa02e1994ce7eb34180f43 /src/xmpp
parentabcf16bc28a5f72d9e7f964a5f2b432f55dfe5b6 (diff)
downloadbiboumi-cf9f3a1f2855b358aa9bbc31f234801e9e1efc28.tar.gz
biboumi-cf9f3a1f2855b358aa9bbc31f234801e9e1efc28.tar.bz2
biboumi-cf9f3a1f2855b358aa9bbc31f234801e9e1efc28.tar.xz
biboumi-cf9f3a1f2855b358aa9bbc31f234801e9e1efc28.zip
Include role and affiliation in the join presence of the nick change process
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/xmpp_component.cpp10
-rw-r--r--src/xmpp/xmpp_component.hpp8
2 files changed, 15 insertions, 3 deletions
diff --git a/src/xmpp/xmpp_component.cpp b/src/xmpp/xmpp_component.cpp
index bf06101..facdbd4 100644
--- a/src/xmpp/xmpp_component.cpp
+++ b/src/xmpp/xmpp_component.cpp
@@ -413,7 +413,13 @@ void XmppComponent::send_muc_leave(std::string&& muc_name, std::string&& nick, X
this->send_stanza(presence);
}
-void XmppComponent::send_nick_change(const std::string& muc_name, const std::string& old_nick, const std::string& new_nick, const std::string& jid_to, const bool self)
+void XmppComponent::send_nick_change(const std::string& muc_name,
+ const std::string& old_nick,
+ const std::string& new_nick,
+ const std::string& affiliation,
+ const std::string& role,
+ const std::string& jid_to,
+ const bool self)
{
Stanza presence("presence");
presence["to"] = jid_to;
@@ -441,7 +447,7 @@ void XmppComponent::send_nick_change(const std::string& muc_name, const std::str
presence.close();
this->send_stanza(presence);
- this->send_user_join(muc_name, new_nick, "", "", "", jid_to, self);
+ this->send_user_join(muc_name, new_nick, "", affiliation, role, jid_to, self);
}
void XmppComponent::kick_user(const std::string& muc_name,
diff --git a/src/xmpp/xmpp_component.hpp b/src/xmpp/xmpp_component.hpp
index fb9282b..27a735a 100644
--- a/src/xmpp/xmpp_component.hpp
+++ b/src/xmpp/xmpp_component.hpp
@@ -97,7 +97,13 @@ public:
/**
* Indicate that a participant changed his nick
*/
- void send_nick_change(const std::string& muc_name, const std::string& old_nick, const std::string& new_nick, const std::string& jid_to, const bool self);
+ void send_nick_change(const std::string& muc_name,
+ const std::string& old_nick,
+ const std::string& new_nick,
+ const std::string& affiliation,
+ const std::string& role,
+ const std::string& jid_to,
+ const bool self);
/**
* An user is kicked from a room
*/