bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/end-meeting-confirmation/service.js

26 lines
653 B
JavaScript
Raw Normal View History

import Users from '/imports/ui/local-collections/users-collection/users';
import Auth from '/imports/ui/services/auth';
import Meetings from '/imports/ui/local-collections/meetings-collection/meetings';
2021-01-21 04:49:07 +08:00
const getMeetingTitle = () => {
const meeting = Meetings.findOne({
meetingId: Auth.meetingID,
}, { fields: { 'meetingProp.name': 1, 'breakoutProps.sequence': 1 } });
return meeting.meetingProp.name;
};
const getUsers = () => {
2021-01-23 03:48:50 +08:00
const numUsers = Users.find({
meetingId: Auth.meetingID,
userId: { $ne: Auth.userID },
2021-01-23 03:48:50 +08:00
}, { fields: { _id: 1 } }).count();
2021-01-23 03:48:50 +08:00
return numUsers;
};
export default {
getUsers,
2021-01-21 04:49:07 +08:00
getMeetingTitle,
2021-01-23 03:48:50 +08:00
};