From 1bb55d4fa10247aef3444d9d022c3599e7174dec Mon Sep 17 00:00:00 2001
From: Aaron Raimist <aaron@raim.ist>
Date: Wed, 27 Nov 2019 22:30:30 -0600
Subject: [PATCH] Hide Remove button in message editing history if you don't
 have permission to redact

Signed-off-by: Aaron Raimist <aaron@raim.ist>
---
 src/components/views/messages/EditHistoryMessage.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/components/views/messages/EditHistoryMessage.js b/src/components/views/messages/EditHistoryMessage.js
index 70f3d207e0..92b8cb3e39 100644
--- a/src/components/views/messages/EditHistoryMessage.js
+++ b/src/components/views/messages/EditHistoryMessage.js
@@ -102,9 +102,9 @@ export default class EditHistoryMessage extends React.PureComponent {
         const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
         // hide the button when already redacted
         let redactButton;
-        if (!this.props.mxEvent.isRedacted() && !this.props.isBaseEvent) {
+        if (!this.props.mxEvent.isRedacted() && !this.props.isBaseEvent && this.state.canRedact) {
             redactButton = (
-                <AccessibleButton onClick={this._onRedactClick} disabled={!this.state.canRedact}>
+                <AccessibleButton onClick={this._onRedactClick}>
                     {_t("Remove")}
                 </AccessibleButton>
             );