Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat: private message interface config flag
Bettenbuk Zoltan53f01a39c9cf
diff --git a/react/features/base/config/interfaceConfigWhitelist.js b/react/features/base/config/interfaceConfigWhitelist.jsindex fed523ea96..f37762a2cc 100644--- a/react/features/base/config/interfaceConfigWhitelist.js+++ b/react/features/base/config/interfaceConfigWhitelist.js@@ -22,6 +22,7 @@ export default ['DEFAULT_REMOTE_DISPLAY_NAME','DISABLE_DOMINANT_SPEAKER_INDICATOR','DISABLE_FOCUS_INDICATOR',+ 'DISABLE_PRIVATE_MESSAGES','DISABLE_RINGING','DISABLE_TRANSCRIPTION_SUBTITLES','DISABLE_VIDEO_BACKGROUND',diff --git a/react/features/remote-video-menu/components/web/PrivateMessageMenuButton.js b/react/features/remote-video-menu/components/web/PrivateMessageMenuButton.jsindex 4819a2a627..c9f036b4e0 100644--- a/react/features/remote-video-menu/components/web/PrivateMessageMenuButton.js+++ b/react/features/remote-video-menu/components/web/PrivateMessageMenuButton.js@@ -5,10 +5,25 @@ import React, { Component } from 'react';import { translate } from '../../../base/i18n';import { IconMessage } from '../../../base/icons';import { connect } from '../../../base/redux';-import { _mapDispatchToProps, _mapStateToProps, type Props } from '../../../chat/components/PrivateMessageButton';+import {+ _mapDispatchToProps,+ _mapStateToProps as _abstractMapStateToProps,+ type Props as AbstractProps+} from '../../../chat/components/PrivateMessageButton';+import { isButtonEnabled } from '../../../toolbox';import RemoteVideoMenuButton from './RemoteVideoMenuButton';+declare var interfaceConfig: Object;++type Props = AbstractProps & {++ /**+ * True if the private chat functionality is disabled, hence the button is not visible.+ */+ _hidden: boolean+};+/*** A custom implementation of the PrivateMessageButton specialized for* the web version of the remote video menu. When the web platform starts to use@@ -34,7 +49,11 @@ class PrivateMessageMenuButton extends Component<Props> {* @returns {ReactElement}*/render() {- const { participantID, t } = this.props;+ const { participantID, t, _hidden } = this.props;++ if (_hidden) {+ return null;+ }return (<RemoteVideoMenuButton@@ -59,4 +78,19 @@ class PrivateMessageMenuButton extends Component<Props> {}}+/**+ * Maps part of the Redux store to the props of this component.+ *+ * @param {Object} state - The Redux state.+ * @param {Props} ownProps - The own props of the component.+ * @returns {Props}+ */+function _mapStateToProps(state: Object, ownProps: Props): $Shape<Props> {+ return {+ ..._abstractMapStateToProps(state, ownProps),+ _hidden: typeof interfaceConfig !== 'undefined'+ && (interfaceConfig.DISABLE_PRIVATE_MESSAGES || !isButtonEnabled('chat'))+ };+}+export default translate(connect(_mapStateToProps, _mapDispatchToProps)(PrivateMessageMenuButton));