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
fix(external-api): dismiss lobby notification after handling the knocking participant (#11049)
Mihaela Dumitruc35473d5e4f7
diff --git a/modules/API/API.js b/modules/API/API.jsindex d7669cf4a9..55d460b0c9 100644--- a/modules/API/API.js+++ b/modules/API/API.js@@ -72,7 +72,7 @@ import {captureLargeVideoScreenshot,resizeLargeVideo} from '../../react/features/large-video/actions.web';-import { toggleLobbyMode, setKnockingParticipantApproval } from '../../react/features/lobby/actions';+import { toggleLobbyMode, answerKnockingParticipant } from '../../react/features/lobby/actions';import {close as closeParticipantsPane,open as openParticipantsPane@@ -140,7 +140,7 @@ function initCommands() {APP.store.dispatch(createBreakoutRoom(name));},'answer-knocking-participant': (id, approved) => {- APP.store.dispatch(setKnockingParticipantApproval(id, approved));+ APP.store.dispatch(answerKnockingParticipant(id, approved));},'approve-video': participantId => {if (!isLocalParticipantModerator(APP.store.getState())) {diff --git a/react/features/lobby/actions.any.js b/react/features/lobby/actions.any.jsindex e7ae64ccff..57dafa94de 100644--- a/react/features/lobby/actions.any.js+++ b/react/features/lobby/actions.any.js@@ -9,6 +9,7 @@ import {setPassword} from '../base/conference';import { getLocalParticipant } from '../base/participants';+import { hideNotification, LOBBY_NOTIFICATION_ID } from '../notifications';import {KNOCKING_PARTICIPANT_ARRIVED_OR_UPDATED,@@ -65,6 +66,20 @@ export function participantIsKnockingOrUpdated(participant: Object) {};}+/**+ * Handles a knocking participant and dismisses the notification.+ *+ * @param {string} id - The id of the knocking participant.+ * @param {boolean} approved - True if the participant is approved, false otherwise.+ * @returns {Function}+ */+export function answerKnockingParticipant(id: string, approved: boolean) {+ return async (dispatch: Dispatch<any>) => {+ dispatch(setKnockingParticipantApproval(id, approved));+ dispatch(hideNotification(LOBBY_NOTIFICATION_ID));+ };+}+/*** Approves (lets in) or rejects a knocking participant.*