diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-11-23 19:52:59 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-11-23 19:52:59 +0100 |
commit | b9404b292b1ee8c5dd4868f4fef9629f1d66d39f (patch) | |
tree | cf4ef825ea93658f39aff3de566c0fe082d1ea41 | |
parent | ff0e832cb1f5b417eedcc7df016e3c5dae209d2b (diff) |
Matrix: set unread notification count for initial sync
-rw-r--r-- | src/plugins/Matrix.cpp | 5 |
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; } } |