bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/waiting-users/container.jsx
Anton Georgiev 835f1a8dc9
Merge pull request #13156 from PhMemmel/waiting-room-without-users
feat: Activate waiting room permanently
2021-09-21 09:16:02 -04:00

49 lines
1.5 KiB
JavaScript

import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import Auth from '/imports/ui/services/auth';
import GuestUsers from '/imports/api/guest-users/';
import Meetings from '/imports/api/meetings';
import Service from './service';
import WaitingComponent from './component';
import { layoutDispatch } from '../layout/context';
const WaitingContainer = (props) => {
const layoutContextDispatch = layoutDispatch();
return <WaitingComponent {...{ layoutContextDispatch, ...props }} />;
};
export default withTracker(() => {
const guestUsers = GuestUsers.find({
meetingId: Auth.meetingID,
guest: true,
approved: false,
denied: false,
}).fetch();
const authenticatedUsers = GuestUsers.find({
meetingId: Auth.meetingID,
authenticated: true,
guest: false,
approved: false,
denied: false,
}).fetch();
const meeting = Meetings.findOne({ meetingId: Auth.meetingID });
const { usersProp } = meeting;
const { authenticatedGuest } = usersProp;
return {
guestUsers,
authenticatedUsers,
guestUsersCall: Service.guestUsersCall,
isWaitingRoomEnabled: Service.isWaitingRoomEnabled(),
changeGuestPolicy: Service.changeGuestPolicy,
isGuestLobbyMessageEnabled: Service.isGuestLobbyMessageEnabled,
setGuestLobbyMessage: Service.setGuestLobbyMessage,
guestLobbyMessage: Service.getGuestLobbyMessage(),
authenticatedGuest,
allowRememberChoice: Service.allowRememberChoice,
};
})(WaitingContainer);