diff --git a/src/Cache.cpp b/src/Cache.cpp index 7b688ac..9bf3b5b 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp @@ -1972,7 +1972,6 @@ Cache::saveTimelineMentions(lmdb::txn &txn, using namespace mtx::events::state; for (const auto &n : res.notifications) { - const auto event_id = utils::event_id(n.event); // double check that we have the correct room_id... @@ -1981,10 +1980,7 @@ Cache::saveTimelineMentions(lmdb::txn &txn, json obj = json::object(); - lmdb::dbi_put(txn, - db, - lmdb::val(event_id), - lmdb::val(obj.dump())); + lmdb::dbi_put(txn, db, lmdb::val(event_id), lmdb::val(obj.dump())); } txn.commit(); diff --git a/src/Cache.h b/src/Cache.h index 4d67572..5971df6 100644 --- a/src/Cache.h +++ b/src/Cache.h @@ -407,7 +407,8 @@ public: const std::string &room_id, const mtx::responses::Notifications &res); //! Get timeline items that a user was mentions in - mtx::responses::Notifications getTimelineMentions(lmdb::txn &txn, const std::string &room_id); + mtx::responses::Notifications getTimelineMentions(lmdb::txn &txn, + const std::string &room_id); //! Remove old unused data. void deleteOldMessages();