unsafe-room: hide unsafe room label if a password or lobby are set

This commit is contained in:
Saúl Ibarra Corretgé 2020-06-11 10:22:33 +02:00 committed by Saúl Ibarra Corretgé
parent a49f04f25b
commit 8efd0f0829
1 changed files with 5 additions and 2 deletions

View File

@ -49,10 +49,13 @@ export default class AbstractInsecureRoomNameLabel extends PureComponent<Props>
* @returns {Props}
*/
export function _mapStateToProps(state: Object): $Shape<Props> {
const { room } = state['features/base/conference'];
const { locked, room } = state['features/base/conference'];
const { lobbyEnabled } = state['features/lobby'];
const { enableInsecureRoomNameWarning = false } = state['features/base/config'];
return {
_visible: enableInsecureRoomNameWarning && room && isInsecureRoomName(room)
_visible: enableInsecureRoomNameWarning
&& room && isInsecureRoomName(room)
&& !(lobbyEnabled || Boolean(locked))
};
}