From 211c36666283e9dc48f551f909781c5f2fbc06d3 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Thu, 30 Jun 2022 15:33:20 +0200 Subject: [PATCH 1/2] refactor: Use tryGet in handleRoomEvents --- lib/src/client.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/src/client.dart b/lib/src/client.dart index e007ddb0..cc79c50c 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -1793,8 +1793,11 @@ class Client extends MatrixApi { // man-in-the-middle attacks! if ((event.type == EventTypes.Encryption && room.encrypted && - event.content['algorithm'] != - room.getState(EventTypes.Encryption)?.content['algorithm'])) { + event.content.tryGet('algorithm') != + room + .getState(EventTypes.Encryption) + ?.content + .tryGet('algorithm'))) { return; } From a6a33bede82cb7dc25989bdf79ddee2c958854ff Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Thu, 30 Jun 2022 15:34:05 +0200 Subject: [PATCH 2/2] chore: Add macOS libraries to gitignore To run tests locally on macOS the easiest way is to copy the dylib files to the sdk directory. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 50171198..bbf3282a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ *.pyc *.swp *.swo +*.dylib .DS_Store .atom/ .buildlog/