aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-11-15 20:06:50 +0100
committerdec05eba <dec05eba@protonmail.com>2022-11-15 20:06:50 +0100
commitc2429d4c7dd6edf3bb931bdf41de665beebe9c14 (patch)
treef895e07bcbbf79f86df5a917062b9d721edf3150 /plugins
parent59c4a651ab9d795c0d1788a8ddf29949a56b1ab9 (diff)
Use matrix global account data for qm read marker to bypass synapse issue with /sync
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Matrix.hpp5
1 files changed, 2 insertions, 3 deletions
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<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);
+ 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 &notifications_json, std::function<void(const MatrixNotification&)> 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<UserInfo> 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<UserInfo> &me);
+ void events_set_user_read_marker(const rapidjson::Value &events_json, RoomData *room_data, std::shared_ptr<UserInfo> &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);