Merge pull request #5116 from MaximKhlobystov/attendee-mute-from-userlist

[HTML5 Client] Self mute/unmute from userlist for attendees.
This commit is contained in:
Anton Georgiev 2018-02-09 10:09:37 -05:00 committed by GitHub
commit 6db4a91846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -309,7 +309,7 @@ const removeUser = (userId) => {
} }
}; };
const toggleVoice = (userId) => { makeCall('toggleVoice', userId); }; const toggleVoice = (userId) => { userId === Auth.userID ? makeCall('toggleSelfVoice') : makeCall('toggleVoice', userId); };
const changeRole = (userId, role) => { makeCall('changeRole', userId, role); }; const changeRole = (userId, role) => { makeCall('changeRole', userId, role); };

View File

@ -168,12 +168,12 @@ class UserParticipants extends Component {
}, },
mute: { mute: {
label: () => intl.formatMessage(intlMessages.MuteUserAudioLabel), label: () => intl.formatMessage(intlMessages.MuteUserAudioLabel),
handler: user => toggleVoice(user.id), handler: (user) => toggleVoice(user.id),
icon: 'audio_off', icon: 'audio_off',
}, },
unmute: { unmute: {
label: () => intl.formatMessage(intlMessages.UnmuteUserAudioLabel), label: () => intl.formatMessage(intlMessages.UnmuteUserAudioLabel),
handler: user => toggleVoice(user.id), handler: (user) => toggleVoice(user.id),
icon: 'audio_on', icon: 'audio_on',
}, },
promote: { promote: {