From 73723ba6ba666121a21e2ce43e70c405b7732790 Mon Sep 17 00:00:00 2001 From: Ajay Bura Date: Sat, 7 May 2022 09:50:29 +0530 Subject: [PATCH] Fix own cross siging trust before verification without key #514 --- .../emoji-verification/EmojiVerification.jsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/app/organisms/emoji-verification/EmojiVerification.jsx b/src/app/organisms/emoji-verification/EmojiVerification.jsx index 3d63b3c3..72b93639 100644 --- a/src/app/organisms/emoji-verification/EmojiVerification.jsx +++ b/src/app/organisms/emoji-verification/EmojiVerification.jsx @@ -28,12 +28,15 @@ function EmojiVerificationContent({ data, requestClose }) { const mountStore = useStore(); const beginVerification = async () => { - if (isCrossVerified(mx.deviceId) && !hasPrivateKey(getDefaultSSKey())) { - const keyData = await accessSecretStorage('Session verification'); - if (!keyData) { - request.cancel(); - return; + if (mx.getCrossSigningId() === null && isCrossVerified(mx.deviceId)) { + if (!hasPrivateKey(getDefaultSSKey())) { + const keyData = await accessSecretStorage('Emoji verification'); + if (!keyData) { + request.cancel(); + return; + } } + await mx.checkOwnCrossSigningTrust(); } setProcess(true); await request.accept();