diff --git a/src/components/structures/MatrixChat.tsx b/src/components/structures/MatrixChat.tsx index 40b13eef67..3383e8b039 100644 --- a/src/components/structures/MatrixChat.tsx +++ b/src/components/structures/MatrixChat.tsx @@ -1659,7 +1659,7 @@ export default class MatrixChat extends React.PureComponent { Modal.createDialog(KeySignatureUploadFailedDialog, { failures, source, continuation }); }); - cli.on(CryptoEvent.VerificationRequest, (request) => { + cli.on(CryptoEvent.VerificationRequestReceived, (request) => { if (request.verifier) { Modal.createDialog( IncomingSasDialog, diff --git a/src/components/views/dialogs/devtools/VerificationExplorer.tsx b/src/components/views/dialogs/devtools/VerificationExplorer.tsx index 1ae3030eae..aaaf02dea4 100644 --- a/src/components/views/dialogs/devtools/VerificationExplorer.tsx +++ b/src/components/views/dialogs/devtools/VerificationExplorer.tsx @@ -83,7 +83,7 @@ const VerificationExplorer: Tool = ({ onBack }: IDevtoolsProps) => { const cli = useContext(MatrixClientContext); const context = useContext(DevtoolsContext); - const requests = useTypedEventEmitterState(cli, CryptoEvent.VerificationRequest, () => { + const requests = useTypedEventEmitterState(cli, CryptoEvent.VerificationRequestReceived, () => { return ( cli.crypto?.inRoomVerificationRequests["requestsByRoomId"]?.get(context.room.roomId) ?? new Map() diff --git a/src/stores/SetupEncryptionStore.ts b/src/stores/SetupEncryptionStore.ts index aa37dcb755..707591dddd 100644 --- a/src/stores/SetupEncryptionStore.ts +++ b/src/stores/SetupEncryptionStore.ts @@ -64,7 +64,7 @@ export class SetupEncryptionStore extends EventEmitter { this.phase = Phase.Loading; const cli = MatrixClientPeg.safeGet(); - cli.on(CryptoEvent.VerificationRequest, this.onVerificationRequest); + cli.on(CryptoEvent.VerificationRequestReceived, this.onVerificationRequest); cli.on(CryptoEvent.UserTrustStatusChanged, this.onUserTrustStatusChanged); const requestsInProgress = cli.getCrypto()!.getVerificationRequestsToDeviceInProgress(cli.getUserId()!); @@ -87,7 +87,7 @@ export class SetupEncryptionStore extends EventEmitter { const cli = MatrixClientPeg.get(); if (!!cli) { - cli.removeListener(CryptoEvent.VerificationRequest, this.onVerificationRequest); + cli.removeListener(CryptoEvent.VerificationRequestReceived, this.onVerificationRequest); cli.removeListener(CryptoEvent.UserTrustStatusChanged, this.onUserTrustStatusChanged); } } diff --git a/src/stores/right-panel/RightPanelStore.ts b/src/stores/right-panel/RightPanelStore.ts index 7f782200a4..c004fbf44d 100644 --- a/src/stores/right-panel/RightPanelStore.ts +++ b/src/stores/right-panel/RightPanelStore.ts @@ -66,13 +66,13 @@ export default class RightPanelStore extends ReadyWatchingStore { protected async onReady(): Promise { this.viewedRoomId = SdkContextClass.instance.roomViewStore.getRoomId(); - this.matrixClient?.on(CryptoEvent.VerificationRequest, this.onVerificationRequestUpdate); + this.matrixClient?.on(CryptoEvent.VerificationRequestReceived, this.onVerificationRequestUpdate); this.loadCacheFromSettings(); this.emitAndUpdateSettings(); } protected async onNotReady(): Promise { - this.matrixClient?.off(CryptoEvent.VerificationRequest, this.onVerificationRequestUpdate); + this.matrixClient?.off(CryptoEvent.VerificationRequestReceived, this.onVerificationRequestUpdate); } protected onDispatcherAction(payload: ActionPayload): void {