fix allowedToMuteAudio and allowedToUnmuteAudio logic and created action

This commit is contained in:
Joao Siebel 2017-10-24 13:35:47 -02:00
parent eb9dd49b75
commit 8a534f14b1
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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),