fix allowedToMuteAudio and allowedToUnmuteAudio logic and created action
This commit is contained in:
parent
eb9dd49b75
commit
8a534f14b1
@ -211,8 +211,8 @@ const getOpenChats = (chatID) => {
|
||||
const getAvailableActions = (currentUser, user, router, isBreakoutRoom) => {
|
||||
const hasAuthority = currentUser.isModerator || user.isCurrent;
|
||||
const allowedToChatPrivately = !user.isCurrent;
|
||||
const allowedToMuteAudio = hasAuthority && user.isVoiceUser && user.isMuted;
|
||||
const allowedToUnmuteAudio = hasAuthority && user.isVoiceUser && !user.isMuted;
|
||||
const allowedToMuteAudio = hasAuthority && user.isVoiceUser && !user.isMuted;
|
||||
const allowedToUnmuteAudio = hasAuthority && user.isVoiceUser && user.isMuted;
|
||||
const allowedToResetStatus = hasAuthority && user.emoji.status !== EMOJI_STATUSES.none;
|
||||
|
||||
// if currentUser is a moderator, allow kicking other users
|
||||
|
@ -88,8 +88,8 @@ class UserListItem extends Component {
|
||||
|
||||
return _.compact([
|
||||
(allowedToChatPrivately ? UserListItem.createAction(openChat, router, user) : null),
|
||||
(allowedToMuteAudio ? UserListItem.createAction(unmute, user) : null),
|
||||
(allowedToUnmuteAudio ? UserListItem.createAction(mute, user) : null),
|
||||
(allowedToMuteAudio ? UserListItem.createAction(mute, user) : null),
|
||||
(allowedToUnmuteAudio ? UserListItem.createAction(unmute, user) : null),
|
||||
(allowedToResetStatus ? UserListItem.createAction(clearStatus, user) : null),
|
||||
(allowedToSetPresenter ? UserListItem.createAction(setPresenter, user) : null),
|
||||
(allowedToKick ? UserListItem.createAction(kick, user) : null),
|
||||
|
Loading…
Reference in New Issue
Block a user