summaryrefslogtreecommitdiff
path: root/src/bridge
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-04-19 02:43:26 +0200
committerlouiz’ <louiz@louiz.org>2016-04-22 10:49:07 +0200
commit04d28f968b227067e77e365d317fc251d3c965f7 (patch)
treef457b9167c1d91312a8ce341abe0559be2877be7 /src/bridge
parent64f341ee80b0d53f0a6e128a1ccc38205361c3bb (diff)
downloadbiboumi-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 'src/bridge')
-rw-r--r--src/bridge/bridge.cpp5
-rw-r--r--src/bridge/bridge.hpp2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp
index 4c97a91..2815da9 100644
--- a/src/bridge/bridge.cpp
+++ b/src/bridge/bridge.cpp
@@ -634,10 +634,11 @@ void Bridge::send_user_join(const std::string& hostname,
affiliation, role, this->user_jid, self);
}
-void Bridge::send_topic(const std::string& hostname, const std::string& chan_name, const std::string& topic)
+void Bridge::send_topic(const std::string& hostname, const std::string& chan_name, const std::string& topic, const std::string& who)
{
const auto encoding = in_encoding_for(*this, {chan_name + '%' + hostname});
- this->xmpp.send_topic(chan_name + utils::empty_if_fixed_server("%" + hostname), this->make_xmpp_body(topic, encoding), this->user_jid);
+ this->xmpp.send_topic(chan_name + utils::empty_if_fixed_server(
+ "%" + hostname), this->make_xmpp_body(topic, encoding), this->user_jid, who);
}
std::string Bridge::get_own_nick(const Iid& iid)
diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp
index c030ed8..6222ef0 100644
--- a/src/bridge/bridge.hpp
+++ b/src/bridge/bridge.hpp
@@ -122,7 +122,7 @@ public:
/**
* Send the topic of the MUC to the user
*/
- void send_topic(const std::string& hostname, const std::string& chan_name, const std::string& topic);
+ void send_topic(const std::string& hostname, const std::string& chan_name, const std::string& topic, const std::string& who);
/**
* Send a MUC message from some participant
*/