diff options
author | louiz’ <louiz@louiz.org> | 2016-04-19 02:43:26 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2016-04-22 10:49:07 +0200 |
commit | 04d28f968b227067e77e365d317fc251d3c965f7 (patch) | |
tree | f457b9167c1d91312a8ce341abe0559be2877be7 /louloulibs/xmpp/xmpp_component.cpp | |
parent | 64f341ee80b0d53f0a6e128a1ccc38205361c3bb (diff) | |
download | biboumi-04d28f968b227067e77e365d317fc251d3c965f7.tar.gz biboumi-04d28f968b227067e77e365d317fc251d3c965f7.tar.bz2 biboumi-04d28f968b227067e77e365d317fc251d3c965f7.tar.xz biboumi-04d28f968b227067e77e365d317fc251d3c965f7.zip |
Forward the topic authors, handle the author from 333 messages
fix #2
Diffstat (limited to 'louloulibs/xmpp/xmpp_component.cpp')
-rw-r--r-- | louloulibs/xmpp/xmpp_component.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/louloulibs/xmpp/xmpp_component.cpp b/louloulibs/xmpp/xmpp_component.cpp index c5906e5..8a0ca52 100644 --- a/louloulibs/xmpp/xmpp_component.cpp +++ b/louloulibs/xmpp/xmpp_component.cpp @@ -388,11 +388,14 @@ void XmppComponent::send_invalid_user_error(const std::string& user_name, const this->send_stanza(message); } -void XmppComponent::send_topic(const std::string& from, Xmpp::body&& topic, const std::string& to) +void XmppComponent::send_topic(const std::string& from, Xmpp::body&& topic, const std::string& to, const std::string& who) { XmlNode message("message"); message["to"] = to; - message["from"] = from + "@" + this->served_hostname; + if (who.empty()) + message["from"] = from + "@" + this->served_hostname; + else + message["from"] = from + "@" + this->served_hostname + "/" + who; message["type"] = "groupchat"; XmlNode subject("subject"); subject.set_inner(std::get<0>(topic)); |