Merge pull request #1556 from famedly/nico/fix-owns-encryption-keys
fix: userOwnsEncryptionKeys returns true for empty device lists
This commit is contained in:
commit
61c89ae45a
|
|
@ -743,7 +743,7 @@ class Client extends MatrixApi {
|
||||||
/// server to answer this.
|
/// server to answer this.
|
||||||
Future<bool> userOwnsEncryptionKeys(String userId) async {
|
Future<bool> userOwnsEncryptionKeys(String userId) async {
|
||||||
if (userId == userID) return encryptionEnabled;
|
if (userId == userID) return encryptionEnabled;
|
||||||
if (_userDeviceKeys.containsKey(userId)) {
|
if (_userDeviceKeys[userId]?.deviceKeys.isNotEmpty ?? false) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
final keys = await queryKeys({userId: []});
|
final keys = await queryKeys({userId: []});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue