From b9404b292b1ee8c5dd4868f4fef9629f1d66d39f Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 23 Nov 2020 19:52:59 +0100 Subject: Matrix: set unread notification count for initial sync --- src/plugins/Matrix.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp index ffe28c2..291787f 100644 --- a/src/plugins/Matrix.cpp +++ b/src/plugins/Matrix.cpp @@ -1405,9 +1405,10 @@ namespace QuickMedia { const rapidjson::Value &unread_notification_json = GetMember(it.value, "unread_notifications"); if(unread_notification_json.IsObject() && !is_additional_messages_sync) { const rapidjson::Value &highlight_count_json = GetMember(unread_notification_json, "highlight_count"); - if(highlight_count_json.IsNumber() && highlight_count_json.GetInt64() > 0) { + if(highlight_count_json.IsNumber() && (highlight_count_json.GetInt64() > 0 || initial_sync)) { room->unread_notification_count = highlight_count_json.GetInt64(); - has_unread_notifications = true; + if(highlight_count_json.GetInt64() > 0) + has_unread_notifications = true; } } -- cgit v1.2.3