fix: minor stuff
This commit is contained in:
parent
10cf979877
commit
8f37466295
|
|
@ -643,11 +643,13 @@ class KeyVerification {
|
|||
.map((device) => device.deviceId)
|
||||
.toList()
|
||||
.contains(key));
|
||||
await client.sendToDeviceEncrypted(
|
||||
deviceKeys!.values.toList(),
|
||||
type,
|
||||
payload,
|
||||
);
|
||||
if (deviceKeys != null && deviceKeys.isNotEmpty) {
|
||||
await client.sendToDeviceEncrypted(
|
||||
deviceKeys.values.toList(),
|
||||
type,
|
||||
payload,
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Logs().e(
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ abstract class SignableKey extends MatrixSignableKey {
|
|||
Set<String>? onlyValidateUserIds,
|
||||
|
||||
/// Only check if this key is verified by any Master key.
|
||||
bool verifiedByAnyMasterKey = false,
|
||||
bool verifiedByTheirMasterKey = false,
|
||||
}) {
|
||||
if (!client.encryptionEnabled) {
|
||||
return false;
|
||||
|
|
@ -307,16 +307,16 @@ abstract class SignableKey extends MatrixSignableKey {
|
|||
if ((verifiedOnly && key.directVerified) ||
|
||||
(key is CrossSigningKey &&
|
||||
key.usage.contains('master') &&
|
||||
(verifiedByAnyMasterKey ||
|
||||
(verifiedByTheirMasterKey ||
|
||||
(key.directVerified && key.userId == client.userID)))) {
|
||||
return true; // we verified this key and it is valid...all checks out!
|
||||
}
|
||||
// or else we just recurse into that key and chack if it works out
|
||||
// or else we just recurse into that key and check if it works out
|
||||
final haveChain = key.hasValidSignatureChain(
|
||||
verifiedOnly: verifiedOnly,
|
||||
visited: visited_,
|
||||
onlyValidateUserIds: onlyValidateUserIds,
|
||||
verifiedByAnyMasterKey: verifiedByAnyMasterKey);
|
||||
verifiedByTheirMasterKey: verifiedByTheirMasterKey);
|
||||
if (haveChain) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue