From f8ef5bb6a58a95969dfd181a6e997f882ce28514 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 6 Mar 2020 17:20:08 +0100 Subject: [PATCH] check .started first as it can be both .started and pending --- src/components/structures/MatrixChat.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index e4af503b46..87b0f6773f 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -1503,7 +1503,12 @@ export default createReactClass({ return; } - if (request.pending) { + if (request.started) { + const VerificationRequestDialog = sdk.getComponent("views.dialogs.VerificationRequestDialog"); + Modal.createTrackedDialog('Incoming Verification', '', VerificationRequestDialog, { + verificationRequest: request, + }, null, /* priority = */ false, /* static = */ true); + } else if (request.pending) { ToastStore.sharedInstance().addOrReplaceToast({ key: 'verifreq_' + request.channel.transactionId, title: _t("Verification Request"), @@ -1511,11 +1516,6 @@ export default createReactClass({ props: {request}, component: sdk.getComponent("toasts.VerificationRequestToast"), }); - } else if (request.started) { - const VerificationRequestDialog = sdk.getComponent("views.dialogs.VerificationRequestDialog"); - Modal.createTrackedDialog('Incoming Verification', '', VerificationRequestDialog, { - verificationRequest: request, - }, null, /* priority = */ false, /* static = */ true); } }); // Fire the tinter right on startup to ensure the default theme is applied