You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

functions.js 887B

12345678910111213141516171819202122232425262728293031323334
  1. // @flow
  2. import { getCurrentConference } from '../base/conference';
  3. /**
  4. * Approves (lets in) or rejects a knocking participant.
  5. *
  6. * @param {Function} getState - Function to get the Redux state.
  7. * @param {string} id - The id of the knocking participant.
  8. * @param {boolean} approved - True if the participant is approved, false otherwise.
  9. * @returns {Function}
  10. */
  11. export function setKnockingParticipantApproval(getState: Function, id: string, approved: boolean) {
  12. const conference = getCurrentConference(getState());
  13. if (conference) {
  14. if (approved) {
  15. conference.lobbyApproveAccess(id);
  16. } else {
  17. conference.lobbyDenyAccess(id);
  18. }
  19. }
  20. }
  21. /**
  22. * Selector to return lobby state.
  23. *
  24. * @param {any} state - State object.
  25. * @returns {any}
  26. */
  27. export function getLobbyState(state: any) {
  28. return state['features/lobby'];
  29. }