aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-11-23 19:52:59 +0100
committerdec05eba <dec05eba@protonmail.com>2020-11-23 19:52:59 +0100
commitb9404b292b1ee8c5dd4868f4fef9629f1d66d39f (patch)
treecf4ef825ea93658f39aff3de566c0fe082d1ea41 /src
parentff0e832cb1f5b417eedcc7df016e3c5dae209d2b (diff)
Matrix: set unread notification count for initial sync
Diffstat (limited to 'src')
-rw-r--r--src/plugins/Matrix.cpp5
1 files 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;
}
}