aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-10-03 17:24:51 +0200
committerdec05eba <dec05eba@protonmail.com>2020-10-03 17:24:51 +0200
commit8f6803c25a46fd95e6e65858f4aaa9131e54c6c5 (patch)
tree4604007d2da9bddcff8fad313e400c53e7fd4a69 /plugins
parent4907c5cc952e94e32cb0f95ea6f3be361b55d389 (diff)
Matrix: show unread marker from previous session (fetch m.read marker from server)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Matrix.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp
index fae6f28..be4a59c 100644
--- a/plugins/Matrix.hpp
+++ b/plugins/Matrix.hpp
@@ -11,6 +11,7 @@ namespace QuickMedia {
std::string display_name;
std::string avatar_url;
sf::Color display_name_color;
+ std::string read_marker_event_id;
};
enum class MessageType {
@@ -111,10 +112,14 @@ namespace QuickMedia {
// Cached
PluginResult get_config(int *upload_size);
+
+ // Note: the returned UserInfo is o
+ const UserInfo* get_me(const std::string &room_id) const;
private:
PluginResult sync_response_to_body_items(const Json::Value &root, RoomSyncMessages &room_messages);
PluginResult get_previous_room_messages(const std::string &room_id, RoomData *room_data);
void events_add_user_info(const Json::Value &events_json, RoomData *room_data);
+ void events_add_user_read_markers(const Json::Value &events_json, RoomData *room_data);
void events_add_messages(const Json::Value &events_json, RoomData *room_data, MessageDirection message_dir, RoomSyncMessages *room_messages, bool has_unread_notifications);
void events_set_room_name(const Json::Value &events_json, RoomData *room_data);
PluginResult upload_file(const std::string &room_id, const std::string &filepath, UploadInfo &file_info, UploadInfo &thumbnail_info, std::string &err_msg);