From 5264aa613834df765bb78509ba80d0f46cbde6d9 Mon Sep 17 00:00:00 2001 From: Kerry Date: Fri, 9 Jun 2023 10:03:01 +1200 Subject: [PATCH] use matrixclientpeg in manual verification dialog (#11059) --- .../views/dialogs/ManualDeviceKeyVerificationDialog.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/views/dialogs/ManualDeviceKeyVerificationDialog.tsx b/src/components/views/dialogs/ManualDeviceKeyVerificationDialog.tsx index 2e71ff199e..d81d6e76ca 100644 --- a/src/components/views/dialogs/ManualDeviceKeyVerificationDialog.tsx +++ b/src/components/views/dialogs/ManualDeviceKeyVerificationDialog.tsx @@ -24,7 +24,7 @@ import { Device } from "matrix-js-sdk/src/models/device"; import * as FormattingUtils from "../../../utils/FormattingUtils"; import { _t } from "../../../languageHandler"; import QuestionDialog from "./QuestionDialog"; -import { useMatrixClientContext } from "../../../contexts/MatrixClientContext"; +import { MatrixClientPeg } from "../../../MatrixClientPeg"; interface IManualDeviceKeyVerificationDialogProps { userId: string; @@ -37,11 +37,11 @@ export function ManualDeviceKeyVerificationDialog({ device, onFinished, }: IManualDeviceKeyVerificationDialogProps): JSX.Element { - const mxClient = useMatrixClientContext(); + const mxClient = MatrixClientPeg.get(); const onLegacyFinished = useCallback( (confirm: boolean) => { - if (confirm && mxClient) { + if (confirm) { mxClient.setDeviceVerified(userId, device.deviceId, true); } onFinished(confirm);