2021-05-27 03:09:25 +08:00
|
|
|
import { check } from 'meteor/check';
|
|
|
|
import Logger from '/imports/startup/server/logger';
|
|
|
|
import { ExternalVideoMeetings } from '/imports/api/meetings';
|
|
|
|
|
|
|
|
export default function stopExternalVideo(userId, meetingId) {
|
2021-06-07 00:13:16 +08:00
|
|
|
try {
|
|
|
|
check(meetingId, String);
|
|
|
|
check(userId, String);
|
2021-05-27 03:09:25 +08:00
|
|
|
|
2021-06-07 00:13:16 +08:00
|
|
|
const selector = { meetingId };
|
|
|
|
const modifier = { $set: { externalVideoUrl: null } };
|
2021-05-27 03:09:25 +08:00
|
|
|
|
|
|
|
Logger.info(`External video stop sharing was initiated by:[${userId}] for meeting ${meetingId}`);
|
|
|
|
ExternalVideoMeetings.update(selector, modifier);
|
|
|
|
} catch (err) {
|
|
|
|
Logger.error(`Error on setting shared external video stop in Meetings collection: ${err}`);
|
|
|
|
}
|
|
|
|
}
|