summaryrefslogtreecommitdiff
path: root/louloulibs/xmpp/xmpp_component.cpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-10-07 23:28:40 +0200
committerlouiz’ <louiz@louiz.org>2016-10-07 23:28:40 +0200
commit8ac8d2b2425d19eb995a36efa808b664979e358f (patch)
treedaa167a45c9b104a4ef57a965f6aad73644ffb1c /louloulibs/xmpp/xmpp_component.cpp
parent8cf292fa446e26012cf4a8ff186105d8e762f79b (diff)
downloadbiboumi-8ac8d2b2425d19eb995a36efa808b664979e358f.tar.gz
biboumi-8ac8d2b2425d19eb995a36efa808b664979e358f.tar.bz2
biboumi-8ac8d2b2425d19eb995a36efa808b664979e358f.tar.xz
biboumi-8ac8d2b2425d19eb995a36efa808b664979e358f.zip
Correctly set status="110" in the presence for the target of a kick
Diffstat (limited to 'louloulibs/xmpp/xmpp_component.cpp')
-rw-r--r--louloulibs/xmpp/xmpp_component.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/louloulibs/xmpp/xmpp_component.cpp b/louloulibs/xmpp/xmpp_component.cpp
index b10479a..1cf3e85 100644
--- a/louloulibs/xmpp/xmpp_component.cpp
+++ b/louloulibs/xmpp/xmpp_component.cpp
@@ -509,11 +509,8 @@ void XmppComponent::send_nick_change(const std::string& muc_name,
this->send_user_join(muc_name, new_nick, "", affiliation, role, jid_to, self);
}
-void XmppComponent::kick_user(const std::string& muc_name,
- const std::string& target,
- const std::string& txt,
- const std::string& author,
- const std::string& jid_to)
+void XmppComponent::kick_user(const std::string& muc_name, const std::string& target, const std::string& txt,
+ const std::string& author, const std::string& jid_to, const bool self)
{
Stanza presence("presence");
presence["from"] = muc_name + "@" + this->served_hostname + "/" + target;
@@ -535,6 +532,12 @@ void XmppComponent::kick_user(const std::string& muc_name,
XmlNode status("status");
status["code"] = "307";
x.add_child(std::move(status));
+ if (self)
+ {
+ XmlNode status("status");
+ status["code"] = "110";
+ x.add_child(std::move(status));
+ }
presence.add_child(std::move(x));
this->send_stanza(presence);
}