Merge branch 'develop' into travis/communities/proto/userinfo
This commit is contained in:
commit
6d62d85ad2
2 changed files with 10 additions and 7 deletions
|
@ -220,7 +220,10 @@ export default class DeviceListener {
|
||||||
await cli.downloadKeys([cli.getUserId()]);
|
await cli.downloadKeys([cli.getUserId()]);
|
||||||
// cross signing isn't enabled - nag to enable it
|
// cross signing isn't enabled - nag to enable it
|
||||||
// There are 3 different toasts for:
|
// There are 3 different toasts for:
|
||||||
if (cli.getStoredCrossSigningForUser(cli.getUserId())) {
|
if (
|
||||||
|
!cli.getCrossSigningId() &&
|
||||||
|
cli.getStoredCrossSigningForUser(cli.getUserId())
|
||||||
|
) {
|
||||||
// Cross-signing on account but this device doesn't trust the master key (verify this session)
|
// Cross-signing on account but this device doesn't trust the master key (verify this session)
|
||||||
showSetupEncryptionToast(SetupKind.VERIFY_THIS_SESSION);
|
showSetupEncryptionToast(SetupKind.VERIFY_THIS_SESSION);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -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 a new issue