diff options
author | Florent Le Coz <louiz@louiz.org> | 2014-04-10 20:11:17 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-04-10 20:11:17 +0200 |
commit | a20c60a0d84f2f22777e3831cac1315302b7a095 (patch) | |
tree | 633276b01684d5b4dcba0c3a629405572fd123d8 /src/xmpp/xmpp_component.cpp | |
parent | 65601a96d20d4ce010723df3a059ee5a9713fae7 (diff) | |
download | biboumi-a20c60a0d84f2f22777e3831cac1315302b7a095.tar.gz biboumi-a20c60a0d84f2f22777e3831cac1315302b7a095.tar.bz2 biboumi-a20c60a0d84f2f22777e3831cac1315302b7a095.tar.xz biboumi-a20c60a0d84f2f22777e3831cac1315302b7a095.zip |
Messages coming from the IRC server are of type "chat"
Diffstat (limited to 'src/xmpp/xmpp_component.cpp')
-rw-r--r-- | src/xmpp/xmpp_component.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xmpp/xmpp_component.cpp b/src/xmpp/xmpp_component.cpp index 2799a21..85a83de 100644 --- a/src/xmpp/xmpp_component.cpp +++ b/src/xmpp/xmpp_component.cpp @@ -457,11 +457,13 @@ void* XmppComponent::get_receive_buffer(const size_t size) const return this->parser.get_buffer(size); } -void XmppComponent::send_message(const std::string& from, Xmpp::body&& body, const std::string& to) +void XmppComponent::send_message(const std::string& from, Xmpp::body&& body, const std::string& to, const std::string& type) { XmlNode node("message"); node["to"] = to; node["from"] = from + "@" + this->served_hostname; + if (!type.empty()) + node["type"] = type; XmlNode body_node("body"); body_node.set_inner(std::get<0>(body)); body_node.close(); |