diff options
author | Florent Le Coz <louiz@louiz.org> | 2013-11-12 23:43:43 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2013-11-12 23:48:10 +0100 |
commit | 5817a95b5ee89480788832be35679dfcd2ed833b (patch) | |
tree | b4db0db18a195b11f820247b78bfc4df5dba8c14 /src/xmpp | |
parent | b60cbda4f93bb83e36b29f5cba975b94b833663d (diff) | |
download | biboumi-5817a95b5ee89480788832be35679dfcd2ed833b.tar.gz biboumi-5817a95b5ee89480788832be35679dfcd2ed833b.tar.bz2 biboumi-5817a95b5ee89480788832be35679dfcd2ed833b.tar.xz biboumi-5817a95b5ee89480788832be35679dfcd2ed833b.zip |
Basic handling of modes, both ways
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/xmpp_component.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xmpp/xmpp_component.cpp b/src/xmpp/xmpp_component.cpp index e2063ba..c36a141 100644 --- a/src/xmpp/xmpp_component.cpp +++ b/src/xmpp/xmpp_component.cpp @@ -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); |