Show waiting room dependent on isGuestLobbyMessageEnabled key

This commit is contained in:
Philipp Memmel 2021-09-04 17:22:00 +00:00
parent 6ab064fa2e
commit f2cbca7437
3 changed files with 14 additions and 8 deletions

View File

@ -45,6 +45,7 @@ class UserContent extends PureComponent {
hasBreakoutRoom,
pendingUsers,
isWaitingRoomEnabled,
isGuestLobbyMessageEnabled,
requestUserInformation,
currentClosedChats,
sidebarContentPanel,
@ -52,6 +53,9 @@ class UserContent extends PureComponent {
startedChats,
} = this.props;
const showWaitingRoom = (isGuestLobbyMessageEnabled && isWaitingRoomEnabled)
|| pendingUsers.length > 0;
return (
<div
data-test="userListContent"
@ -83,7 +87,7 @@ class UserContent extends PureComponent {
intl,
}}
/>
{ (isWaitingRoomEnabled || pendingUsers.length > 0) && currentUser.role === ROLE_MODERATOR
{showWaitingRoom && currentUser.role === ROLE_MODERATOR
? (
<WaitingUsers
{...{

View File

@ -26,11 +26,14 @@ const UserContentContainer = (props) => {
locked: users[Auth.meetingID][Auth.userID].locked,
role: users[Auth.meetingID][Auth.userID].role,
};
const { isGuestLobbyMessageEnabled } = WaitingUsersService;
return (
<UserContent
{...{
layoutContextDispatch,
sidebarContentPanel,
isGuestLobbyMessageEnabled,
...props,
}}
currentUser={currentUser}

View File

@ -59,14 +59,13 @@ const WaitingUsers = ({
>
<Icon iconName="user" />
<span>{intl.formatMessage(intlMessages.title)}</span>
{ pendingUsers.length > 0
&& (
<div className={styles.unreadMessages}>
<div className={styles.unreadMessagesText}>
{pendingUsers.length}
</div>
{pendingUsers.length > 0 && (
<div className={styles.unreadMessages}>
<div className={styles.unreadMessagesText}>
{pendingUsers.length}
</div>
)}
</div>
)}
</div>
</div>
</div>