From c2429d4c7dd6edf3bb931bdf41de665beebe9c14 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Tue, 15 Nov 2022 20:06:50 +0100 Subject: Use matrix global account data for qm read marker to bypass synapse issue with /sync --- plugins/Matrix.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp index 671f718..e5c86e8 100644 --- a/plugins/Matrix.hpp +++ b/plugins/Matrix.hpp @@ -722,8 +722,7 @@ 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); + void load_qm_read_markers_from_account_data(); 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); @@ -734,7 +733,7 @@ namespace QuickMedia { PluginResult get_previous_room_messages(RoomData *room_data, bool latest_messages, size_t &num_new_messages, bool *reached_end = nullptr); void events_add_user_info(const rapidjson::Value &events_json, RoomData *room_data, int64_t timestamp); std::shared_ptr parse_user_info(const rapidjson::Value &json, const std::string &user_id, RoomData *room_data, int64_t timestamp); - void events_set_user_read_marker(const rapidjson::Value &events_json, RoomData *room_data, std::shared_ptr &me); + void events_set_user_read_marker(const rapidjson::Value &events_json, RoomData *room_data, std::shared_ptr &me, bool is_additional_messages_sync); // Returns the number of messages added size_t events_add_messages(const rapidjson::Value &events_json, RoomData *room_data, MessageDirection message_dir, bool has_unread_notifications); void events_set_room_info(const rapidjson::Value &events_json, RoomData *room_data, int64_t timestamp); -- cgit v1.2.3