1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

Revert "Always block sending keys to unverified devices of verified users (#2562)" (#2571)

This will be rolled out again later with more accompanying UI adjustments, including clearer error messages and possibly the option to disable it per-room.
This commit is contained in:
Faye Duxovni
2022-08-08 12:27:41 -04:00
committed by GitHub
parent c96f1ba22b
commit 3762c20aad
2 changed files with 2 additions and 127 deletions

View File

@@ -1156,16 +1156,10 @@ class MegolmEncryption extends EncryptionAlgorithm {
continue;
}
const userTrust = this.crypto.checkUserTrust(userId);
const deviceTrust = this.crypto.checkDeviceTrust(userId, deviceId);
if (userDevices[deviceId].isBlocked() ||
(!deviceTrust.isVerified() && isBlacklisting) ||
// Always withhold keys from unverified devices of verified users
(!deviceTrust.isVerified() &&
userTrust.isVerified() &&
this.crypto.getCryptoTrustCrossSignedDevices()
)
(!deviceTrust.isVerified() && isBlacklisting)
) {
if (!blocked[userId]) {
blocked[userId] = {};