summaryrefslogtreecommitdiff
path: root/src/xmpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2013-11-12 23:43:43 +0100
committerFlorent Le Coz <louiz@louiz.org>2013-11-12 23:48:10 +0100
commit5817a95b5ee89480788832be35679dfcd2ed833b (patch)
treeb4db0db18a195b11f820247b78bfc4df5dba8c14 /src/xmpp
parentb60cbda4f93bb83e36b29f5cba975b94b833663d (diff)
downloadbiboumi-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.cpp5
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);