From b7e0d10b5abaac96b844b214db4058aa5b5580c0 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Thu, 14 Apr 2022 19:44:19 +0200 Subject: [PATCH 1/2] fix: Wait for keys in pusher --- lib/src/client.dart | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/src/client.dart b/lib/src/client.dart index 429fb083..a5df3035 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -1088,11 +1088,13 @@ class Client extends MatrixApi { final encryption = this.encryption; if (event.type == EventTypes.Encrypted && encryption != null) { - event = await encryption.decryptRoomEvent(roomId, event); - if (event.type == EventTypes.Encrypted && _currentSync != null) { - await _currentSync; - event = await encryption.decryptRoomEvent(roomId, event); + var decrypted = await encryption.decryptRoomEvent(roomId, event); + if (decrypted.messageType == MessageTypes.BadEncrypted && + prevBatch != null) { + await oneShotSync(); + decrypted = await encryption.decryptRoomEvent(roomId, event); } + event = decrypted; } if (storeInDatabase) { From ae7472e013e34975cbe1599c80bd452a2ad2e2d6 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Thu, 14 Apr 2022 19:45:06 +0200 Subject: [PATCH 2/2] chore: Bump version --- CHANGELOG.md | 3 +++ pubspec.yaml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e01fa683..25e48a04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [0.8.20] - 14th Apr 2022 +- fix: Wait for keys in push helper + ## [0.8.19] - 14th Apr 2022 - feat: Get event from push notification - feat: Add more localization strings and add default matrix localizations diff --git a/pubspec.yaml b/pubspec.yaml index efa63e15..18b116c6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: matrix description: Matrix Dart SDK -version: 0.8.19 +version: 0.8.20 homepage: https://famedly.com repository: https://gitlab.com/famedly/company/frontend/famedlysdk.git