From 59c4a651ab9d795c0d1788a8ddf29949a56b1ab9 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 15 Nov 2022 19:36:10 +0100 Subject: Matrix: use a local cache of latest read marker timestamps to try and avoid many unread message notices --- plugins/Matrix.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'plugins') diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp index 77ef252..671f718 100644 --- a/plugins/Matrix.hpp +++ b/plugins/Matrix.hpp @@ -722,6 +722,8 @@ namespace QuickMedia { PluginResult set_pinned_events(RoomData *room, const std::vector &pinned_events, bool is_add); PluginResult set_qm_last_read_message_timestamp(RoomData *room, int64_t timestamp); + void load_qm_read_markers_from_cache(); + void update_room_qm_read_markers_in_cache(const std::string &room_id, int64_t timestamp); PluginResult parse_sync_response(const rapidjson::Document &root, bool is_additional_messages_sync, bool initial_sync); PluginResult parse_notifications(const rapidjson::Value ¬ifications_json, std::function callback_func); @@ -797,5 +799,6 @@ namespace QuickMedia { std::unordered_map custom_emoji_by_key; std::unordered_set silenced_invites; + std::unordered_map qm_read_markers_by_room_cache; }; } \ No newline at end of file -- cgit v1.2.3