diff --git a/src/components/views/messages/MessageActionBar.js b/src/components/views/messages/MessageActionBar.js
index c4b8c441bd..fe6c22ab1e 100644
--- a/src/components/views/messages/MessageActionBar.js
+++ b/src/components/views/messages/MessageActionBar.js
@@ -103,6 +103,10 @@ export default class MessageActionBar extends React.PureComponent {
return SettingsStore.isFeatureEnabled("feature_reactions");
}
+ isEditingEnabled() {
+ return SettingsStore.isFeatureEnabled("feature_message_editing");
+ }
+
renderAgreeDimension() {
if (!this.isReactionsEnabled()) {
return null;
@@ -144,10 +148,12 @@ export default class MessageActionBar extends React.PureComponent {
title={_t("Reply")}
onClick={this.onReplyClick}
/>;
- editButton = ;
+ if (this.isEditingEnabled()) {
+ editButton = ;
+ }
}
return
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index e407d92630..1d524cbcbc 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -300,6 +300,7 @@
"Show recent room avatars above the room list": "Show recent room avatars above the room list",
"Group & filter rooms by custom tags (refresh to apply changes)": "Group & filter rooms by custom tags (refresh to apply changes)",
"Render simple counters in room header": "Render simple counters in room header",
+ "Edit messages after they have been sent": "Edit messages after they have been sent",
"React to messages with emoji (refresh to apply changes)": "React to messages with emoji (refresh to apply changes)",
"Enable Emoji suggestions while typing": "Enable Emoji suggestions while typing",
"Use compact timeline layout": "Use compact timeline layout",
@@ -897,6 +898,7 @@
"Agree or Disagree": "Agree or Disagree",
"Like or Dislike": "Like or Dislike",
"Reply": "Reply",
+ "Edit": "Edit",
"Options": "Options",
"Attachment": "Attachment",
"Error decrypting attachment": "Error decrypting attachment",
@@ -973,7 +975,6 @@
"Reload widget": "Reload widget",
"Popout widget": "Popout widget",
"Picture": "Picture",
- "Edit": "Edit",
"Revoke widget access": "Revoke widget access",
"Create new room": "Create new room",
"Unblacklist": "Unblacklist",
diff --git a/src/settings/Settings.js b/src/settings/Settings.js
index 1c3ca4fd0f..76d220cf56 100644
--- a/src/settings/Settings.js
+++ b/src/settings/Settings.js
@@ -118,6 +118,12 @@ export const SETTINGS = {
supportedLevels: LEVELS_FEATURE,
default: false,
},
+ "feature_message_editing": {
+ isFeature: true,
+ displayName: _td("Edit messages after they have been sent"),
+ supportedLevels: LEVELS_FEATURE,
+ default: false,
+ },
"feature_reactions": {
isFeature: true,
displayName: _td("React to messages with emoji (refresh to apply changes)"),