diff options
-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); } |