bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/end-meeting-confirmation/service.js
2021-03-08 15:11:31 -03:00

26 lines
582 B
JavaScript

import Users from '/imports/api/users';
import Auth from '/imports/ui/services/auth';
import Meetings from '/imports/api/meetings';
const getMeetingTitle = () => {
const meeting = Meetings.findOne({
meetingId: Auth.meetingID,
}, { fields: { 'meetingProp.name': 1, 'breakoutProps.sequence': 1 } });
return meeting.meetingProp.name;
};
const getUsers = () => {
const numUsers = Users.find({
meetingId: Auth.meetingID,
userId: { $ne: Auth.userID },
}, { fields: { _id: 1 } }).count();
return numUsers;
};
export default {
getUsers,
getMeetingTitle,
};