From 5d8a82aefa0c745ed7bf2a5cbfe2f2f34fec722d Mon Sep 17 00:00:00 2001 From: Malin Errenst Date: Thu, 22 Jun 2023 18:05:04 +0200 Subject: [PATCH] fix: Fixed fake_matrix_api.dart signedOneTimeKeys upload --- lib/fake_matrix_api.dart | 11 ++++++----- pubspec.yaml | 5 +++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/fake_matrix_api.dart b/lib/fake_matrix_api.dart index 76e9da9c..006d0862 100644 --- a/lib/fake_matrix_api.dart +++ b/lib/fake_matrix_api.dart @@ -2006,11 +2006,12 @@ class FakeMatrixApi extends MockClient { '/client/v3/keys/upload': (var req) => { 'one_time_key_counts': { 'curve25519': 10, - 'signed_curve25519': tryCast>>( - decodeJson(req))?['one_time_keys'] - ?.keys - .length ?? - 0, + 'signed_curve25519': + tryCast>(decodeJson(req)) + ?.tryGetMap('one_time_keys') + ?.keys + .length ?? + 0, } }, '/client/v3/keys/query': (var req) => { diff --git a/pubspec.yaml b/pubspec.yaml index 91dc4a63..c9fe9212 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -19,3 +19,8 @@ dev_dependencies: import_sorter: ^4.6.0 lints: ^2.0.0 test: ^1.14.4 + +dependency_overrides: +# uncomment for local development +# matrix: +# path: '../famedlysdk'