aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-09-04 00:30:06 +0200
committerdec05eba <dec05eba@protonmail.com>2021-09-04 00:30:06 +0200
commitdd4573e05cdfa2d9b99ef7a49c99e27c201da3e9 (patch)
tree6499b368a168b7a61c33b3588696c253ce5c9a34 /plugins
parent3f0421bea6b37d81d2d66c001b0fac2df91dd702 (diff)
Matrix: fix messages that dont mention us being added to notifications list. Also fix read status for 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 1566212..341a534 100644
--- a/plugins/Matrix.hpp
+++ b/plugins/Matrix.hpp
@@ -309,6 +309,7 @@ namespace QuickMedia {
private:
std::map<RoomData*, std::shared_ptr<BodyItem>> room_body_item_by_room;
std::map<RoomData*, std::shared_ptr<Message>> last_message_by_room;
+ std::unordered_set<std::string> notifications_shown;
UsersByRoom users_by_room;
};
@@ -492,10 +493,14 @@ namespace QuickMedia {
void add_notification(MatrixNotification notification);
void set_room_as_read(RoomData *room);
private:
+ bool has_fetched = false;
Matrix *matrix;
Body *notifications_body;
MatrixRoomsPage *all_rooms_page;
- std::unordered_map<std::string, std::vector<std::shared_ptr<BodyItem>>> room_notifications;
+ // room id[event_id[]]
+ std::unordered_map<std::string, std::unordered_map<std::string, std::shared_ptr<BodyItem>>> room_notifications;
+ // Notifications are here until the notifications has been fetched, so that page handler doesn't the notifications
+ std::unordered_map<std::string, std::unordered_map<std::string, MatrixNotification>> pending_room_notifications;
};
class MatrixInviteUserPage : public Page {