Messages coming from the IRC server are of type "chat"

This commit is contained in:
Florent Le Coz
2014-04-10 20:11:17 +02:00
parent 65601a96d2
commit a20c60a0d8
3 changed files with 7 additions and 4 deletions
+3 -1
View File
@@ -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();
+2 -1
View File
@@ -81,7 +81,8 @@ public:
/**
* Send a message from from@served_hostname, with the given body
*/
void send_message(const std::string& from, Xmpp::body&& body, const std::string& to);
void send_message(const std::string& from, Xmpp::body&& body,
const std::string& to, const std::string& type);
/**
* Send a join from a new participant
*/