From 30718e7fdeabf94c9f4eb916e9e1b1d4bb42b275 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 14 Feb 2020 13:48:38 +0100 Subject: [PATCH] unsent could potentially also happen here although should not happen in practice --- src/components/views/right_panel/EncryptionPanel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/right_panel/EncryptionPanel.js b/src/components/views/right_panel/EncryptionPanel.js index 2e9365fca3..669e50d4ca 100644 --- a/src/components/views/right_panel/EncryptionPanel.js +++ b/src/components/views/right_panel/EncryptionPanel.js @@ -23,7 +23,7 @@ import {MatrixClientPeg} from "../../../MatrixClientPeg"; import {ensureDMExists} from "../../../createRoom"; import {useEventEmitter} from "../../../hooks/useEventEmitter"; import Modal from "../../../Modal"; -import {PHASE_REQUESTED} from "matrix-js-sdk/src/crypto/verification/request/VerificationRequest"; +import {PHASE_REQUESTED, PHASE_UNSENT} from "matrix-js-sdk/src/crypto/verification/request/VerificationRequest"; import * as sdk from "../../../index"; import {_t} from "../../../languageHandler"; @@ -71,7 +71,7 @@ const EncryptionPanel = ({verificationRequest, member, onClose, layout}) => { setRequest(verificationRequest); }, [member.userId]); - const requested = request && (phase === PHASE_REQUESTED || phase === undefined); + const requested = request && (phase === PHASE_REQUESTED || phase === PHASE_UNSENT || phase === undefined); if (!request || requested) { return ; } else {