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/ 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; }