From 8c3004c2ac3e6eb745b996efedf3002d1ca46d33 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 31 Jan 2020 12:20:11 +0100 Subject: [PATCH] to_device requests now can include .request so we might need send .ready --- src/components/structures/auth/CompleteSecurity.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/structures/auth/CompleteSecurity.js b/src/components/structures/auth/CompleteSecurity.js index 1443db0613..6bf3e7f07c 100644 --- a/src/components/structures/auth/CompleteSecurity.js +++ b/src/components/structures/auth/CompleteSecurity.js @@ -83,12 +83,13 @@ export default class CompleteSecurity extends React.Component { } } - onVerificationRequest = (request) => { + onVerificationRequest = async (request) => { if (request.otherUserId !== MatrixClientPeg.get().getUserId()) return; if (this.state.verificationRequest) { this.state.verificationRequest.off("change", this.onVerificationRequestChange); } + await request.accept(); request.on("change", this.onVerificationRequestChange); this.setState({ verificationRequest: request,