bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/waiting-users/container.jsx

52 lines
1.7 KiB
React
Raw Normal View History

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';
2021-09-11 04:48:52 +08:00
import { layoutDispatch } from '../layout/context';
2021-05-18 04:25:07 +08:00
const WaitingContainer = (props) => {
2021-09-11 04:48:52 +08:00
const layoutContextDispatch = layoutDispatch();
2021-08-05 19:03:24 +08:00
return <WaitingComponent {...{ layoutContextDispatch, ...props }} />;
2021-05-18 04:25:07 +08:00
};
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();
2021-05-18 04:25:07 +08:00
const meeting = Meetings.findOne({ meetingId: Auth.meetingID });
const { usersProp } = meeting;
const { authenticatedGuest } = usersProp;
return {
guestUsers,
authenticatedUsers,
2022-01-12 22:10:30 +08:00
privateMessageVisible: Service.privateMessageVisible,
guestUsersCall: Service.guestUsersCall,
2021-09-04 19:45:52 +08:00
isWaitingRoomEnabled: Service.isWaitingRoomEnabled(),
changeGuestPolicy: Service.changeGuestPolicy,
isGuestLobbyMessageEnabled: Service.isGuestLobbyMessageEnabled,
setGuestLobbyMessage: Service.setGuestLobbyMessage,
guestLobbyMessage: Service.getGuestLobbyMessage(),
2022-01-12 22:10:30 +08:00
privateGuestLobbyMessage: Service.getPrivateGuestLobbyMessage,
setPrivateGuestLobbyMessage: Service.setPrivateGuestLobbyMessage,
authenticatedGuest,
allowRememberChoice: Service.allowRememberChoice,
};
})(WaitingContainer);