Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat(external-api) Add grantModerator command (#11199)
Robert Pintilii9a78011daf35
diff --git a/modules/API/API.js b/modules/API/API.jsindex 55d460b0c9..e95730a7cb 100644--- a/modules/API/API.js+++ b/modules/API/API.js@@ -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);diff --git a/modules/API/external/external_api.js b/modules/API/external/external_api.jsindex 88d7d09e06..cce51a5732 100644--- a/modules/API/external/external_api.js+++ b/modules/API/external/external_api.js@@ -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',