aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-10-01 22:21:14 +0200
committerdec05eba <dec05eba@protonmail.com>2020-10-01 22:21:14 +0200
commitef1dd33682ae26b4af1343aaecf443e7cd883674 (patch)
treecf3c959f1cf9f8b6b401d384537685191ae3e4ba /plugins
parent30dbaeb2b175c1e67f57aba748ced1a2280fb56d (diff)
Matrix: implement mention/reply notifications
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Matrix.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp
index 7df29e1..36b8072 100644
--- a/plugins/Matrix.hpp
+++ b/plugins/Matrix.hpp
@@ -26,6 +26,8 @@ namespace QuickMedia {
std::string url;
std::string thumbnail_url;
std::string replaces_event_id;
+ bool mentions_me = false;
+ time_t timestamp = 0;
MessageType type;
};
@@ -98,6 +100,8 @@ namespace QuickMedia {
PluginResult on_start_typing(const std::string &room_id);
PluginResult on_stop_typing(const std::string &room_id);
+ PluginResult set_read_marker(const std::string &room_id, const Message *message);
+
// |message| is from |BodyItem.userdata| and is of type |Message*|
bool was_message_posted_by_me(const std::string &room_id, void *message) const;
@@ -106,13 +110,14 @@ namespace QuickMedia {
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_messages(const Json::Value &events_json, RoomData *room_data, MessageDirection message_dir, RoomSyncMessages *room_messages);
+ 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);
std::shared_ptr<Message> get_edited_message_original_message(RoomData *room_data, std::shared_ptr<Message> message);
private:
std::unordered_map<std::string, std::unique_ptr<RoomData>> room_data_by_id;
std::string user_id;
+ std::string username;
std::string access_token;
std::string homeserver;
std::string next_batch;