Do not change the affiliation/role to "none"/"participant" when changing nick

fixes #2436
This commit is contained in:
Florent Le Coz
2014-01-13 20:14:12 +01:00
parent af2d232059
commit feb77bbdad
+3 -2
View File
@@ -312,9 +312,10 @@ void XmppComponent::send_user_join(const std::string& from,
XmlNode x("x"); XmlNode x("x");
x["xmlns"] = MUC_USER_NS; x["xmlns"] = MUC_USER_NS;
// TODO: put real values here
XmlNode item("item"); XmlNode item("item");
if (!affiliation.empty())
item["affiliation"] = affiliation; item["affiliation"] = affiliation;
if (!role.empty())
item["role"] = role; item["role"] = role;
if (!realjid.empty()) if (!realjid.empty())
{ {
@@ -427,7 +428,7 @@ void XmppComponent::send_nick_change(const std::string& muc_name, const std::str
presence.close(); presence.close();
this->send_stanza(presence); 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, void XmppComponent::kick_user(const std::string& muc_name,