Skip to content

Commit f0c6e93

Browse files
committed
feat(config):InsecureRoomNameWarning config option
1 parent 78b01d2 commit f0c6e93

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

react/features/conference/components/AbstractInsecureRoomNameLabel.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ export default class AbstractInsecureRoomNameLabel extends PureComponent<Props>
5050
*/
5151
export function _mapStateToProps(state: Object): $Shape<Props> {
5252
const { room } = state['features/base/conference'];
53+
const { enableInsecureRoomNameWarning = false } = state['features/base/config'];
5354

5455
return {
55-
_visible: room && isInsecureRoomName(room)
56+
_visible: enableInsecureRoomNameWarning && room && isInsecureRoomName(room)
5657
};
5758
}

react/features/welcome/components/AbstractWelcomePage.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ type Props = {
2020
*/
2121
_calendarEnabled: boolean,
2222

23+
/**
24+
* Whether the insecure room name functionality is enabled or not.
25+
*/
26+
_enableInsecureRoomNameWarning: boolean,
27+
2328
/**
2429
* Whether the recent list is enabled
2530
*/
@@ -214,7 +219,7 @@ export class AbstractWelcomePage extends Component<Props, *> {
214219
_onRoomChange(value: string) {
215220
this.setState({
216221
room: value,
217-
insecureRoomName: value && isInsecureRoomName(value)
222+
insecureRoomName: this.props._enableInsecureRoomNameWarning && value && isInsecureRoomName(value)
218223
});
219224
}
220225

@@ -226,7 +231,7 @@ export class AbstractWelcomePage extends Component<Props, *> {
226231
* @returns {ReactElement}
227232
*/
228233
_renderInsecureRoomNameWarning() {
229-
if (this.state.insecureRoomName) {
234+
if (this.props._enableInsecureRoomNameWarning && this.state.insecureRoomName) {
230235
return this._doRenderInsecureRoomNameWarning();
231236
}
232237

@@ -273,6 +278,7 @@ export class AbstractWelcomePage extends Component<Props, *> {
273278
export function _mapStateToProps(state: Object) {
274279
return {
275280
_calendarEnabled: isCalendarEnabled(state),
281+
_enableInsecureRoomNameWarning: state['features/base/config'].enableInsecureRoomNameWarning || false,
276282
_recentListEnabled: isRecentListEnabled(),
277283
_room: state['features/base/conference'].room,
278284
_settings: state['features/base/settings']

0 commit comments

Comments
 (0)