fix: userOwnsEncryptionKeys always returns true

Actually the homeserver sends an
empty object in the deviceKeys map
so we need to check if this object
is there but is empty.
This commit is contained in:
Krille Fear 2021-11-28 10:37:56 +01:00
parent 7d57c0ca86
commit fe2d184faf
1 changed files with 1 additions and 1 deletions

View File

@ -650,7 +650,7 @@ class Client extends MatrixApi {
return true; return true;
} }
final keys = await queryKeys({userId: []}); final keys = await queryKeys({userId: []});
return keys.deviceKeys?.isNotEmpty ?? false; return keys.deviceKeys?[userId]?.isNotEmpty ?? false;
} }
/// Creates a new space and returns the Room ID. The parameters are mostly /// Creates a new space and returns the Room ID. The parameters are mostly