mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
Display name for lobby operations notifications are taken from the list of knocking participants which is available only to moderators. In case of not all moderators the notifications were broken.
24 lines
701 B
JavaScript
24 lines
701 B
JavaScript
// @flow
|
|
|
|
import { getCurrentConference } from '../base/conference';
|
|
|
|
/**
|
|
* Approves (lets in) or rejects a knocking participant.
|
|
*
|
|
* @param {Function} getState - Function to get the Redux state.
|
|
* @param {string} id - The id of the knocking participant.
|
|
* @param {boolean} approved - True if the participant is approved, false otherwise.
|
|
* @returns {Function}
|
|
*/
|
|
export function setKnockingParticipantApproval(getState: Function, id: string, approved: boolean) {
|
|
const conference = getCurrentConference(getState());
|
|
|
|
if (conference) {
|
|
if (approved) {
|
|
conference.lobbyApproveAccess(id);
|
|
} else {
|
|
conference.lobbyDenyAccess(id);
|
|
}
|
|
}
|
|
}
|