From ae41c5dee424e910e6e4d6a145493845a2c831c3 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 25 Apr 2014 00:53:59 +0200 Subject: Include the xhtml-im element in private messages too --- src/xmpp/xmpp_component.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) 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); } -- cgit v1.2.3