feat(external-api) Add grantModerator command (#11199)
This commit is contained in:
parent
35d0fefa1e
commit
9a78011daf
|
@ -39,7 +39,8 @@ import {
|
|||
raiseHand,
|
||||
isParticipantModerator,
|
||||
isLocalParticipantModerator,
|
||||
hasRaisedHand
|
||||
hasRaisedHand,
|
||||
grantModerator
|
||||
} from '../../react/features/base/participants';
|
||||
import { updateSettings } from '../../react/features/base/settings';
|
||||
import { isToggleCameraEnabled, toggleCamera } from '../../react/features/base/tracks';
|
||||
|
@ -164,6 +165,14 @@ function initCommands() {
|
|||
}
|
||||
APP.store.dispatch(autoAssignToBreakoutRooms());
|
||||
},
|
||||
'grant-moderator': participantId => {
|
||||
if (!isLocalParticipantModerator(APP.store.getState())) {
|
||||
logger.error('Missing moderator rights to grant moderator right to another participant');
|
||||
|
||||
return;
|
||||
}
|
||||
APP.store.dispatch(grantModerator(participantId));
|
||||
},
|
||||
'display-name': displayName => {
|
||||
sendAnalytics(createApiEvent('display.name.changed'));
|
||||
APP.conference.changeLocalDisplayName(displayName);
|
||||
|
|
|
@ -38,7 +38,7 @@ const commands = {
|
|||
displayName: 'display-name',
|
||||
e2eeKey: 'e2ee-key',
|
||||
email: 'email',
|
||||
toggleLobby: 'toggle-lobby',
|
||||
grantModerator: 'grant-moderator',
|
||||
hangup: 'video-hangup',
|
||||
initiatePrivateChat: 'initiate-private-chat',
|
||||
joinBreakoutRoom: 'join-breakout-room',
|
||||
|
@ -73,6 +73,7 @@ const commands = {
|
|||
toggleChat: 'toggle-chat',
|
||||
toggleE2EE: 'toggle-e2ee',
|
||||
toggleFilmStrip: 'toggle-film-strip',
|
||||
toggleLobby: 'toggle-lobby',
|
||||
toggleModeration: 'toggle-moderation',
|
||||
toggleParticipantsPane: 'toggle-participants-pane',
|
||||
toggleRaiseHand: 'toggle-raise-hand',
|
||||
|
|
Loading…
Reference in New Issue