bigbluebutton-Github/bigbluebutton-html5/imports/api/video/server/modifiers/unsharedWebcam.js
prlanzarin f43b77c19f Merge branch 'node-bbb-apps-packaging' into bbb-webrtc-sfu
Conflicts:
	bigbluebutton-html5/imports/startup/client/base.jsx
	bigbluebutton-html5/imports/ui/components/actions-bar/actions-dropdown/component.jsx
	bigbluebutton-html5/imports/ui/components/actions-bar/component.jsx
	bigbluebutton-html5/imports/ui/components/app/container.jsx
	bigbluebutton-html5/imports/ui/components/screenshare/service.js
	bigbluebutton-html5/imports/ui/components/video-dock/component.jsx
	bigbluebutton-html5/imports/ui/components/video-dock/container.jsx
	bigbluebutton-html5/private/locales/en.json bigbluebutton-html5/server/main.js
2017-11-11 03:41:37 +00:00

33 lines
646 B
JavaScript

import Logger from '/imports/startup/server/logger';
import Users from '/imports/api/users';
export default function unsharedWebcam(meetingId, userId) {
check(meetingId, String);
check(userId, String);
const selector = {
meetingId,
userId,
};
const modifier = {
$set: {
meetingId,
userId,
has_stream: false,
},
};
const cb = (err, numChanged) => {
if (err) {
return Logger.error(`Adding user to collection: ${err}`);
}
if (numChanged) {
return Logger.info(`Upserted user id=${userId} meeting=${meetingId}`);
}
};
return Users.upsert(selector, modifier, cb);
}