fix(external-api): dismiss lobby notification after handling the knocking participant (#11049)
This commit is contained in:
parent
c69fdd766c
commit
c35473d5e4
|
@ -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())) {
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue