1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-26 17:03:12 +03:00

update comments

This commit is contained in:
Bruno Windels
2020-03-31 18:39:47 +02:00
parent b6708871d3
commit c2a0504980

View File

@@ -64,6 +64,7 @@ export class ReciprocateQRCode extends Base {
this.emit("show_reciprocate_qr", this.reciprocateQREvent); this.emit("show_reciprocate_qr", this.reciprocateQREvent);
}); });
// 3. determine key to sign
const keys = {}; const keys = {};
if (qrCodeData.mode === MODE_VERIFY_OTHER_USER) { if (qrCodeData.mode === MODE_VERIFY_OTHER_USER) {
// add master key to keys to be signed, only if we're not doing self-verification // add master key to keys to be signed, only if we're not doing self-verification
@@ -76,7 +77,9 @@ export class ReciprocateQRCode extends Base {
// TODO: not sure if MODE_VERIFY_SELF_UNTRUSTED makes sense to sign anything here? // TODO: not sure if MODE_VERIFY_SELF_UNTRUSTED makes sense to sign anything here?
} }
// 4. sign the key
await this._verifyKeys(this.userId, keys, (keyId, device, keyInfo) => { await this._verifyKeys(this.userId, keys, (keyId, device, keyInfo) => {
// make sure the device has the expected keys
const targetKey = keys[keyId]; const targetKey = keys[keyId];
if (!targetKey) throw newKeyMismatchError(); if (!targetKey) throw newKeyMismatchError();
@@ -93,8 +96,6 @@ export class ReciprocateQRCode extends Base {
throw newKeyMismatchError(); throw newKeyMismatchError();
} }
} }
// Otherwise it is probably fine
}); });
} }
} }