diff options
author | louiz’ <louiz@louiz.org> | 2018-03-18 19:41:52 +0100 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2018-03-18 19:41:52 +0100 |
commit | 1320dc6db48ebde28f5c0791cfc87cfe392d106e (patch) | |
tree | 78e6cf293734d53adc2dcb9473564558cd87fe75 /src/bridge | |
parent | 0de282a177baa0ed2d38a68715e78344172894ca (diff) | |
download | biboumi-1320dc6db48ebde28f5c0791cfc87cfe392d106e.tar.gz biboumi-1320dc6db48ebde28f5c0791cfc87cfe392d106e.tar.bz2 biboumi-1320dc6db48ebde28f5c0791cfc87cfe392d106e.tar.xz biboumi-1320dc6db48ebde28f5c0791cfc87cfe392d106e.zip |
Don’t reflect an empty id if it was not included
Instead, generate a uuid for that message
Diffstat (limited to 'src/bridge')
-rw-r--r-- | src/bridge/bridge.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp index 9a0358c..aba2f05 100644 --- a/src/bridge/bridge.cpp +++ b/src/bridge/bridge.cpp @@ -233,7 +233,7 @@ void Bridge::send_channel_message(const Iid& iid, const std::string& body, std:: 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), irc->get_own_nick()); #endif - if (!first) + if (!first || id.empty()) id = utils::gen_uuid(); for (const auto& resource: this->resources_in_chan[iid.to_tuple()]) this->xmpp.send_muc_message(std::to_string(iid), irc->get_own_nick(), this->make_xmpp_body(line), |