summaryrefslogtreecommitdiff
path: root/src/xmpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-01-13 20:14:12 +0100
committerFlorent Le Coz <louiz@louiz.org>2014-01-13 20:14:12 +0100
commitfeb77bbdadf6658e9dfdd7c7eac05850ea5fa7b8 (patch)
treed99be281380a0206e07c2cf1a58c9152c19a2395 /src/xmpp
parentaf2d232059cd1ede246019f951ee9de89ea4b767 (diff)
downloadbiboumi-feb77bbdadf6658e9dfdd7c7eac05850ea5fa7b8.tar.gz
biboumi-feb77bbdadf6658e9dfdd7c7eac05850ea5fa7b8.tar.bz2
biboumi-feb77bbdadf6658e9dfdd7c7eac05850ea5fa7b8.tar.xz
biboumi-feb77bbdadf6658e9dfdd7c7eac05850ea5fa7b8.zip
Do not change the affiliation/role to "none"/"participant" when changing nick
fixes #2436
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/xmpp_component.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/xmpp/xmpp_component.cpp b/src/xmpp/xmpp_component.cpp
index 1ef2f37..6fec72c 100644
--- a/src/xmpp/xmpp_component.cpp
+++ b/src/xmpp/xmpp_component.cpp
@@ -312,10 +312,11 @@ void XmppComponent::send_user_join(const std::string& from,
XmlNode x("x");
x["xmlns"] = MUC_USER_NS;
- // TODO: put real values here
XmlNode item("item");
- item["affiliation"] = affiliation;
- item["role"] = role;
+ if (!affiliation.empty())
+ item["affiliation"] = affiliation;
+ if (!role.empty())
+ item["role"] = role;
if (!realjid.empty())
{
const std::string preped_jid = jidprep(realjid);
@@ -427,7 +428,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, "", "participant", "none", jid_to, self);
+ this->send_user_join(muc_name, new_nick, "", "", "", jid_to, self);
}
void XmppComponent::kick_user(const std::string& muc_name,