aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-11-15 19:36:10 +0100
committerdec05eba <dec05eba@protonmail.com>2022-11-15 19:36:10 +0100
commit59c4a651ab9d795c0d1788a8ddf29949a56b1ab9 (patch)
tree63e025ebb51a7f9f844a1fa88ee1348cee0a43a9 /plugins
parent7b25a28366be259dc9a165ba13e0be0512e19d78 (diff)
Matrix: use a local cache of latest read marker timestamps to try and avoid many unread message notices
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Matrix.hpp3
1 files changed, 3 insertions, 0 deletions
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<std::string> &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 &notifications_json, std::function<void(const MatrixNotification&)> callback_func);
@@ -797,5 +799,6 @@ namespace QuickMedia {
std::unordered_map<std::string, CustomEmoji> custom_emoji_by_key;
std::unordered_set<std::string> silenced_invites;
+ std::unordered_map<std::string, int64_t> qm_read_markers_by_room_cache;
};
} \ No newline at end of file