From 0e3cc6b8f45856f467485b8404815099c3b7866f Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 21 Jul 2021 18:09:35 -0600 Subject: [PATCH 1/3] Remove voice messages labs flag Fixes https://github.com/vector-im/element-web/issues/17151 --- src/components/views/messages/MVoiceOrAudioBody.tsx | 3 +-- src/components/views/rooms/MessageComposer.tsx | 10 ++++------ src/settings/Settings.tsx | 6 ------ 3 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/components/views/messages/MVoiceOrAudioBody.tsx b/src/components/views/messages/MVoiceOrAudioBody.tsx index adfd102e19..8a9f39400e 100644 --- a/src/components/views/messages/MVoiceOrAudioBody.tsx +++ b/src/components/views/messages/MVoiceOrAudioBody.tsx @@ -27,8 +27,7 @@ export default class MVoiceOrAudioBody extends React.PureComponent { // MSC2516 is a legacy identifier. See https://github.com/matrix-org/matrix-doc/pull/3245 const isVoiceMessage = !!this.props.mxEvent.getContent()['org.matrix.msc2516.voice'] || !!this.props.mxEvent.getContent()['org.matrix.msc3245.voice']; - const voiceMessagesEnabled = SettingsStore.getValue("feature_voice_messages"); - if (isVoiceMessage && voiceMessagesEnabled) { + if (isVoiceMessage) { return ; } else { return ; diff --git a/src/components/views/rooms/MessageComposer.tsx b/src/components/views/rooms/MessageComposer.tsx index b16d22b416..863d401442 100644 --- a/src/components/views/rooms/MessageComposer.tsx +++ b/src/components/views/rooms/MessageComposer.tsx @@ -391,12 +391,10 @@ export default class MessageComposer extends React.Component { controls.push(); } - if (SettingsStore.getValue("feature_voice_messages")) { - controls.push( this.voiceRecordingButton = c} - room={this.props.room} />); - } + controls.push( this.voiceRecordingButton = c} + room={this.props.room} />); if (!this.state.isComposerEmpty || this.state.haveRecording) { controls.push( diff --git a/src/settings/Settings.tsx b/src/settings/Settings.tsx index f0bdb2e0e5..bff16403e6 100644 --- a/src/settings/Settings.tsx +++ b/src/settings/Settings.tsx @@ -212,12 +212,6 @@ export const SETTINGS: {[setting: string]: ISetting} = { supportedLevels: LEVELS_FEATURE, default: false, }, - "feature_voice_messages": { - isFeature: true, - displayName: _td("Send and receive voice messages"), - supportedLevels: LEVELS_FEATURE, - default: false, - }, "feature_latex_maths": { isFeature: true, displayName: _td("Render LaTeX maths in messages"), From 11773fb0f476ac224bfdc75f58494e48d19c30be Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 21 Jul 2021 18:12:32 -0600 Subject: [PATCH 2/3] Clean up imports --- src/components/views/messages/MVoiceOrAudioBody.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/views/messages/MVoiceOrAudioBody.tsx b/src/components/views/messages/MVoiceOrAudioBody.tsx index 8a9f39400e..2d78ea192e 100644 --- a/src/components/views/messages/MVoiceOrAudioBody.tsx +++ b/src/components/views/messages/MVoiceOrAudioBody.tsx @@ -17,7 +17,6 @@ limitations under the License. import React from "react"; import MAudioBody from "./MAudioBody"; import { replaceableComponent } from "../../../utils/replaceableComponent"; -import SettingsStore from "../../../settings/SettingsStore"; import MVoiceMessageBody from "./MVoiceMessageBody"; import { IBodyProps } from "./IBodyProps"; From 363175e9a64f2a9f1276fb228d1e1297a9df0f6f Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Wed, 21 Jul 2021 18:13:01 -0600 Subject: [PATCH 3/3] Clean up i18n --- src/i18n/strings/en_EN.json | 1 - 1 file changed, 1 deletion(-) diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 1116e4cdc1..85aabae46a 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -795,7 +795,6 @@ "If disabled, you can still add Direct Messages to Personal Spaces. If enabled, you'll automatically see everyone who is a member of the Space.": "If disabled, you can still add Direct Messages to Personal Spaces. If enabled, you'll automatically see everyone who is a member of the Space.", "Show notification badges for People in Spaces": "Show notification badges for People in Spaces", "Show options to enable 'Do not disturb' mode": "Show options to enable 'Do not disturb' mode", - "Send and receive voice messages": "Send and receive voice messages", "Render LaTeX maths in messages": "Render LaTeX maths in messages", "Communities v2 prototypes. Requires compatible homeserver. Highly experimental - use with caution.": "Communities v2 prototypes. Requires compatible homeserver. Highly experimental - use with caution.", "Message Pinning": "Message Pinning",