Basic handling of modes, both ways

This commit is contained in:
Florent Le Coz
2013-11-12 23:48:10 +01:00
parent b60cbda4f9
commit 5817a95b5e
8 changed files with 85 additions and 22 deletions
+4 -1
View File
@@ -294,7 +294,10 @@ void XmppComponent::send_muc_message(const std::string& muc_name, const std::str
{
Stanza message("message");
message["to"] = jid_to;
message["from"] = muc_name + "@" + this->served_hostname + "/" + nick;
if (!nick.empty())
message["from"] = muc_name + "@" + this->served_hostname + "/" + nick;
else // Message from the room itself
message["from"] = muc_name + "@" + this->served_hostname;
message["type"] = "groupchat";
XmlNode body("body");
body.set_inner(body_str);