diff --git a/src/crypto/index.js b/src/crypto/index.js index fa547c395..10b0a0e54 100644 --- a/src/crypto/index.js +++ b/src/crypto/index.js @@ -1068,6 +1068,7 @@ Crypto.prototype.isKeyBackupTrusted = async function(backupInfo) { ); if (device) { sigInfo.device = device; + sigInfo.deviceTrust = await this.checkDeviceTrust(this._userId, sigInfo.deviceId); try { await olmlib.verifySignature( this._olmDevice, @@ -1095,7 +1096,7 @@ Crypto.prototype.isKeyBackupTrusted = async function(backupInfo) { ret.usable = ret.sigs.some((s) => { return ( s.valid && ( - (s.device && s.device.isVerified()) || + (s.device && s.deviceTrust.isVerified()) || (s.crossSigningId) ) );