summaryrefslogtreecommitdiff
path: root/src/xmpp/xmpp_component.cpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2017-12-26 19:52:41 +0100
committerlouiz’ <louiz@louiz.org>2017-12-26 19:52:41 +0100
commit37340e593ffb61eaccc444a1efdb3aa6f784a14a (patch)
tree8ac71f9564d7c72a945d759d842697ce22873bfa /src/xmpp/xmpp_component.cpp
parent286aa58c7b42f78eb72d4f05170a8c25edeba504 (diff)
downloadbiboumi-37340e593ffb61eaccc444a1efdb3aa6f784a14a.tar.gz
biboumi-37340e593ffb61eaccc444a1efdb3aa6f784a14a.tar.bz2
biboumi-37340e593ffb61eaccc444a1efdb3aa6f784a14a.tar.xz
biboumi-37340e593ffb61eaccc444a1efdb3aa6f784a14a.zip
Add a <x muc#user> node on outgoing private MUC messages
See https://xmpp.org/extensions/xep-0045.html#privatemessage fix #3321
Diffstat (limited to 'src/xmpp/xmpp_component.cpp')
-rw-r--r--src/xmpp/xmpp_component.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/xmpp/xmpp_component.cpp b/src/xmpp/xmpp_component.cpp
index 24a85d7..c44b990 100644
--- a/src/xmpp/xmpp_component.cpp
+++ b/src/xmpp/xmpp_component.cpp
@@ -269,7 +269,8 @@ void* XmppComponent::get_receive_buffer(const size_t size) const
}
void XmppComponent::send_message(const std::string& from, Xmpp::body&& body, const std::string& to,
- const std::string& type, const bool fulljid, const bool nocopy)
+ const std::string& type, const bool fulljid, const bool nocopy,
+ const bool muc_private)
{
Stanza message("message");
{
@@ -301,6 +302,11 @@ void XmppComponent::send_message(const std::string& from, Xmpp::body&& body, con
XmlSubNode nocopy(message, "no-copy");
nocopy["xmlns"] = "urn:xmpp:hints";
}
+ if (muc_private)
+ {
+ XmlSubNode x(message, "x");
+ x["xmlns"] = MUC_USER_NS;
+ }
}
this->send_stanza(message);
}