summaryrefslogtreecommitdiff
path: root/src/bridge
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-03-31 02:10:39 +0200
committerlouiz’ <louiz@louiz.org>2018-03-31 02:10:39 +0200
commit0cd848e532c8c60ed4f3a5d1e6a3850929f2765b (patch)
treefa0b9bd8906657df58c13096394b042f862105a3 /src/bridge
parent99c364892a30c59dfe5c41ef7009fa85ad071c12 (diff)
downloadbiboumi-0cd848e532c8c60ed4f3a5d1e6a3850929f2765b.tar.gz
biboumi-0cd848e532c8c60ed4f3a5d1e6a3850929f2765b.tar.bz2
biboumi-0cd848e532c8c60ed4f3a5d1e6a3850929f2765b.tar.xz
biboumi-0cd848e532c8c60ed4f3a5d1e6a3850929f2765b.zip
Send the stanza-id for messages received by other users
fix #3347
Diffstat (limited to 'src/bridge')
-rw-r--r--src/bridge/bridge.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp
index 90caac1..569574a 100644
--- a/src/bridge/bridge.cpp
+++ b/src/bridge/bridge.cpp
@@ -819,19 +819,19 @@ void Bridge::send_irc_version_request(const std::string& irc_hostname, const std
void Bridge::send_message(const Iid& iid, const std::string& nick, const std::string& body, const bool muc)
{
const auto encoding = in_encoding_for(*this, iid);
+ std::string uuid{};
if (muc)
{
#ifdef USE_DATABASE
const auto xmpp_body = this->make_xmpp_body(body, encoding);
if (!nick.empty() && this->record_history)
- Database::store_muc_message(this->get_bare_jid(), iid.get_local(), iid.get_server(), std::chrono::system_clock::now(),
- std::get<0>(xmpp_body), nick);
+ uuid = Database::store_muc_message(this->get_bare_jid(), iid.get_local(), iid.get_server(), std::chrono::system_clock::now(),
+ std::get<0>(xmpp_body), nick);
#endif
for (const auto& resource: this->resources_in_chan[iid.to_tuple()])
{
this->xmpp.send_muc_message(std::to_string(iid), nick, this->make_xmpp_body(body, encoding),
- this->user_jid + "/" + resource, {}, utils::gen_uuid());
-
+ this->user_jid + "/" + resource, uuid, utils::gen_uuid());
}
}
else