diff options
author | Florent Le Coz <louiz@louiz.org> | 2014-04-25 00:53:59 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-04-25 00:53:59 +0200 |
commit | ae41c5dee424e910e6e4d6a145493845a2c831c3 (patch) | |
tree | 93b7c196946fc42f8bf96836c57622b72416ab3a /src | |
parent | 4e61b0d57e4e0a127b8b8db2dab6452695ff425c (diff) | |
download | biboumi-ae41c5dee424e910e6e4d6a145493845a2c831c3.tar.gz biboumi-ae41c5dee424e910e6e4d6a145493845a2c831c3.tar.bz2 biboumi-ae41c5dee424e910e6e4d6a145493845a2c831c3.tar.xz biboumi-ae41c5dee424e910e6e4d6a145493845a2c831c3.zip |
Include the xhtml-im element in private messages too
Diffstat (limited to 'src')
-rw-r--r-- | src/xmpp/xmpp_component.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/xmpp/xmpp_component.cpp b/src/xmpp/xmpp_component.cpp index 1eacf7c..9ad2c61 100644 --- a/src/xmpp/xmpp_component.cpp +++ b/src/xmpp/xmpp_component.cpp @@ -479,6 +479,15 @@ void XmppComponent::send_message(const std::string& from, Xmpp::body&& body, con body_node.set_inner(std::get<0>(body)); body_node.close(); node.add_child(std::move(body_node)); + if (std::get<1>(body)) + { + XmlNode html("html"); + html["xmlns"] = XHTMLIM_NS; + // Pass the ownership of the pointer to this xmlnode + html.add_child(std::get<1>(body).release()); + html.close(); + node.add_child(std::move(html)); + } node.close(); this->send_stanza(node); } |