fix: userOwnsEncryptionKeys returns true for empty device lists
This commit is contained in:
parent
5370e8cee8
commit
5b47a647b6
|
|
@ -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