From 512bd4b0b2afb62d50cf6bb179b6bc8b619887c2 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 24 Jan 2020 11:59:17 +0100 Subject: [PATCH] show to_device verification in dialog, not right panel this also makes it work again, as the VerificationPanel doens't know how to deal with requests that are already in PHASE_STARTED, which was breaking verifying your own devices. --- src/components/views/toasts/VerificationRequestToast.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/views/toasts/VerificationRequestToast.js b/src/components/views/toasts/VerificationRequestToast.js index 274085c0fd..f912984486 100644 --- a/src/components/views/toasts/VerificationRequestToast.js +++ b/src/components/views/toasts/VerificationRequestToast.js @@ -23,6 +23,7 @@ import {RIGHT_PANEL_PHASES} from "../../../stores/RightPanelStorePhases"; import {userLabelForEventRoom} from "../../../utils/KeyVerificationStateObserver"; import dis from "../../../dispatcher"; import ToastStore from "../../../stores/ToastStore"; +import Modal from "../../../Modal"; export default class VerificationRequestToast extends React.PureComponent { constructor(props) { @@ -79,6 +80,12 @@ export default class VerificationRequestToast extends React.PureComponent { phase: RIGHT_PANEL_PHASES.EncryptionPanel, refireParams: {verificationRequest: request}, }); + } else if (request.channel.deviceId && request.verifier) { + // show to_device verifications in dialog still + const IncomingSasDialog = sdk.getComponent("views.dialogs.IncomingSasDialog"); + Modal.createTrackedDialog('Incoming Verification', '', IncomingSasDialog, { + verifier: request.verifier, + }, null, /* priority = */ false, /* static = */ true); } } catch (err) { console.error(err.message);