From 3eb07465f7709612e1b35865de78d3ea5d496c18 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Thu, 13 Feb 2020 17:29:13 +0100 Subject: [PATCH] use canAccept in tile, which takes local echo into account --- src/components/views/messages/MKeyVerificationRequest.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/views/messages/MKeyVerificationRequest.js b/src/components/views/messages/MKeyVerificationRequest.js index 9a48858bc7..0f5f417dbc 100644 --- a/src/components/views/messages/MKeyVerificationRequest.js +++ b/src/components/views/messages/MKeyVerificationRequest.js @@ -59,7 +59,6 @@ export default class MKeyVerificationRequest extends React.Component { }; _onAcceptClicked = async () => { - this.setState({acceptOrCancelClicked: true}); const request = this.props.mxEvent.verificationRequest; if (request) { try { @@ -72,7 +71,6 @@ export default class MKeyVerificationRequest extends React.Component { }; _onRejectClicked = async () => { - this.setState({acceptOrCancelClicked: true}); const request = this.props.mxEvent.verificationRequest; if (request) { try { @@ -137,11 +135,10 @@ export default class MKeyVerificationRequest extends React.Component { _t("%(name)s wants to verify", {name})}); subtitle = (
{ userLabelForEventRoom(request.requestingUserId, mxEvent.getRoomId())}
); - if (request.requested && !request.observeOnly) { - const disabled = this.state.acceptOrCancelClicked; + if (request.canAccept) { stateNode = (
- - + +
); } } else { // request sent by us