Merge branch 'html5-whiteboard-messages' of github.com:Klauswk/bigbluebutton into handle-messages

This commit is contained in:
Anton Georgiev 2017-06-28 13:37:57 -04:00
commit f9f50cddec
2 changed files with 8 additions and 8 deletions

View File

@ -4,14 +4,14 @@ import Users from './../../';
export default function handlePresenterAssigned({ body, header }) {
const { meetingId } = header;
const { intId } = body;
const { presenterId } = body;
check(meetingId, String);
check(intId, String);
check(presenterId, String);
const selector = {
meetingId,
userId: intId,
userId: presenterId,
};
const modifier = {
@ -26,18 +26,18 @@ export default function handlePresenterAssigned({ body, header }) {
}
if (numChanged) {
unassignCurrentPresenter(meetingId, intId);
return Logger.info(`Assigned user as presenter id=${intId} meeting=${meetingId}`);
unassignCurrentPresenter(meetingId, presenterId);
return Logger.info(`Assigned user as presenter id=${presenterId} meeting=${meetingId}`);
}
};
return Users.update(selector, modifier, cb);
}
const unassignCurrentPresenter = (meetingId, intId) => {
const unassignCurrentPresenter = (meetingId, presenterId) => {
const selector = {
meetingId,
userId: { $ne: intId },
userId: { $ne: presenterId },
'user.presenter': true,
};

View File

@ -1,4 +1,4 @@
import Users from '/imports/api/1.1/users';
import Users from '/imports/api/2.0/users';
import Chat from '/imports/api/1.1/chat';
import Auth from '/imports/ui/services/auth';
import UnreadMessages from '/imports/ui/services/unread-messages';