mirror of https://github.com/vector-im/riot-web
During verification, only check user trust status
As part of new device verification, we were waiting for "cross-signing ready" which means _both_ the public keys are trusted by this device _and_ private keys are available. There's no guarantee that the private keys will ever arrive, so it's too strict to wait for this as a blocking flow. This relaxes things to wait only for the current device to trust public keys. Fixes https://github.com/vector-im/element-web/issues/14970pull/21833/head
parent
0d290c9bd2
commit
dd87e9a2f1
|
@ -137,10 +137,10 @@ export class SetupEncryptionStore extends EventEmitter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
_onUserTrustStatusChanged = async (userId) => {
|
_onUserTrustStatusChanged = (userId) => {
|
||||||
if (userId !== MatrixClientPeg.get().getUserId()) return;
|
if (userId !== MatrixClientPeg.get().getUserId()) return;
|
||||||
const crossSigningReady = await MatrixClientPeg.get().isCrossSigningReady();
|
const publicKeysTrusted = MatrixClientPeg.get().getCrossSigningId();
|
||||||
if (crossSigningReady) {
|
if (publicKeysTrusted) {
|
||||||
this.phase = PHASE_DONE;
|
this.phase = PHASE_DONE;
|
||||||
this.emit("update");
|
this.emit("update");
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,7 @@ export class SetupEncryptionStore extends EventEmitter {
|
||||||
this._setActiveVerificationRequest(request);
|
this._setActiveVerificationRequest(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
onVerificationRequestChange = async () => {
|
onVerificationRequestChange = () => {
|
||||||
if (this.verificationRequest.cancelled) {
|
if (this.verificationRequest.cancelled) {
|
||||||
this.verificationRequest.off("change", this.onVerificationRequestChange);
|
this.verificationRequest.off("change", this.onVerificationRequestChange);
|
||||||
this.verificationRequest = null;
|
this.verificationRequest = null;
|
||||||
|
@ -161,8 +161,8 @@ export class SetupEncryptionStore extends EventEmitter {
|
||||||
// At this point, the verification has finished, we just need to wait for
|
// At this point, the verification has finished, we just need to wait for
|
||||||
// cross signing to be ready to use, so wait for the user trust status to
|
// cross signing to be ready to use, so wait for the user trust status to
|
||||||
// change (or change to DONE if it's already ready).
|
// change (or change to DONE if it's already ready).
|
||||||
const crossSigningReady = await MatrixClientPeg.get().isCrossSigningReady();
|
const publicKeysTrusted = MatrixClientPeg.get().getCrossSigningId();
|
||||||
this.phase = crossSigningReady ? PHASE_DONE : PHASE_BUSY;
|
this.phase = publicKeysTrusted ? PHASE_DONE : PHASE_BUSY;
|
||||||
this.emit("update");
|
this.emit("update");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue