diff --git a/CHANGELOG.md b/CHANGELOG.md index 0851b4f8..a5b94d38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [0.5.1] - 13nd Sep 2021 +- fix: Room.notificationCount set to null sometimes + ## [0.5.0] - 13nd Sep 2021 - hotfix: Key sharing security vulnerability! -> Please upgrade as soon as possible to this version - feat: MSC2746: Improved Signalling for 1:1 VoIP diff --git a/lib/src/client.dart b/lib/src/client.dart index cea6e880..c33c08f0 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -1513,8 +1513,9 @@ class Client extends MatrixApi { chatUpdate.timeline?.prevBatch != null)) { rooms[j].membership = membership; rooms[j].notificationCount = - chatUpdate.unreadNotifications?.notificationCount; - rooms[j].highlightCount = chatUpdate.unreadNotifications?.highlightCount; + chatUpdate.unreadNotifications?.notificationCount ?? 0; + rooms[j].highlightCount = + chatUpdate.unreadNotifications?.highlightCount ?? 0; if (chatUpdate.timeline?.prevBatch != null) { rooms[j].prev_batch = chatUpdate.timeline?.prevBatch; } diff --git a/pubspec.yaml b/pubspec.yaml index 81b38b2f..5d3705db 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: matrix description: Matrix Dart SDK -version: 0.5.0 +version: 0.5.1 homepage: https://famedly.com environment: