From dd4573e05cdfa2d9b99ef7a49c99e27c201da3e9 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 4 Sep 2021 00:30:06 +0200 Subject: Matrix: fix messages that dont mention us being added to notifications list. Also fix read status for notifications --- plugins/Matrix.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'plugins/Matrix.hpp') 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> room_body_item_by_room; std::map> last_message_by_room; + std::unordered_set 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>> room_notifications; + // room id[event_id[]] + std::unordered_map>> room_notifications; + // Notifications are here until the notifications has been fetched, so that page handler doesn't the notifications + std::unordered_map> pending_room_notifications; }; class MatrixInviteUserPage : public Page { -- cgit v1.2.3