From 1a789130a3b0d3ab99628405c13792ea58bda09e Mon Sep 17 00:00:00 2001 From: hmuresan Date: Thu, 11 Feb 2021 11:04:36 +0200 Subject: [PATCH] feat (external_api) add command for kick participant --- modules/API/API.js | 5 ++++- modules/API/external/external_api.js | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/API/API.js b/modules/API/API.js index 5bd918aa3..8d5a2d4a8 100644 --- a/modules/API/API.js +++ b/modules/API/API.js @@ -14,7 +14,7 @@ import { } from '../../react/features/base/conference'; import { parseJWTFromURLParams } from '../../react/features/base/jwt'; import JitsiMeetJS, { JitsiRecordingConstants } from '../../react/features/base/lib-jitsi-meet'; -import { pinParticipant, getParticipantById } from '../../react/features/base/participants'; +import { pinParticipant, getParticipantById, kickParticipant } from '../../react/features/base/participants'; import { setPrivateMessageRecipient } from '../../react/features/chat/actions'; import { processExternalDeviceRequest @@ -349,6 +349,9 @@ function initCommands() { }, 'cancel-private-chat': () => { APP.store.dispatch(setPrivateMessageRecipient()); + }, + 'kick-participant': participantId => { + APP.store.dispatch(kickParticipant(participantId)); } }; transport.on('event', ({ data, name }) => { diff --git a/modules/API/external/external_api.js b/modules/API/external/external_api.js index 4ede252df..a728afae5 100644 --- a/modules/API/external/external_api.js +++ b/modules/API/external/external_api.js @@ -35,6 +35,7 @@ const commands = { toggleLobby: 'toggle-lobby', hangup: 'video-hangup', intiatePrivateChat: 'initiate-private-chat', + kickParticipant: 'kick-participant', muteEveryone: 'mute-everyone', password: 'password', pinParticipant: 'pin-participant',