summaryrefslogtreecommitdiff
path: root/src/xmpp/xmpp_component.cpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-03-12 00:04:26 +0100
committerlouiz’ <louiz@louiz.org>2018-03-12 00:13:59 +0100
commitbb596582bd2d8b9aab3fe08e76a7d24d82bf614a (patch)
tree9ebe416dfb7b9b2dd6c6a4ba4b56a69b7c455456 /src/xmpp/xmpp_component.cpp
parent158d743bf539399e48c64044639b90e5c1705ac1 (diff)
downloadbiboumi-bb596582bd2d8b9aab3fe08e76a7d24d82bf614a.tar.gz
biboumi-bb596582bd2d8b9aab3fe08e76a7d24d82bf614a.tar.bz2
biboumi-bb596582bd2d8b9aab3fe08e76a7d24d82bf614a.tar.xz
biboumi-bb596582bd2d8b9aab3fe08e76a7d24d82bf614a.zip
Add a <item/> node in the presence of a leaving participant
fix #3339
Diffstat (limited to 'src/xmpp/xmpp_component.cpp')
-rw-r--r--src/xmpp/xmpp_component.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/xmpp/xmpp_component.cpp b/src/xmpp/xmpp_component.cpp
index 9be9e34..a71d810 100644
--- a/src/xmpp/xmpp_component.cpp
+++ b/src/xmpp/xmpp_component.cpp
@@ -425,7 +425,8 @@ void XmppComponent::send_history_message(const std::string& muc_name, const std:
#endif
void XmppComponent::send_muc_leave(const std::string& muc_name, const std::string& nick, Xmpp::body&& message,
- const std::string& jid_to, const bool self, const bool user_requested)
+ const std::string& jid_to, const bool self, const bool user_requested,
+ const std::string& affiliation, const std::string& role)
{
Stanza presence("presence");
{
@@ -447,6 +448,9 @@ void XmppComponent::send_muc_leave(const std::string& muc_name, const std::strin
status["code"] = "332";
}
}
+ XmlSubNode item(x, "item");
+ item["affiliation"] = affiliation;
+ item["role"] = role;
if (!message_str.empty())
{
XmlSubNode status(presence, "status");