remove comment

This commit is contained in:
KDSBrowne 2021-02-21 06:12:38 +00:00
parent babaf1b578
commit e2156157f5

View File

@ -1,59 +1,3 @@
/*
import Logger from '/imports/startup/server/logger';
import Users from '/imports/api/users';
import Meetings from '/imports/api/meetings';
import { Slides } from '/imports/api/slides';
import stopWatchingExternalVideo from '/imports/api/external-videos/server/methods/stopWatchingExternalVideo';
import modifyWhiteboardAccess from '/imports/api/whiteboard-multi-user/server/modifiers/modifyWhiteboardAccess';
export default function changePresenter(presenter, userId, meetingId, changedBy) {
const selector = {
meetingId,
userId,
};
const modifier = {
$set: {
presenter,
whiteboardAccess: presenter,
},
};
const currentSlide = Slides.findOne({
podId: 'DEFAULT_PRESENTATION_POD',
meetingId,
current: true,
}, {
fields: {
id: 1,
},
});
if (currentSlide) {
modifyWhiteboardAccess(meetingId, currentSlide.id, false);
}
try {
const meeting = Meetings.findOne({ meetingId });
if (meeting && meeting.externalVideoUrl) {
Logger.info(`ChangePresenter:There is external video being shared. Stopping it due to presenter change, ${meeting.externalVideoUrl}`);
stopWatchingExternalVideo({ meetingId, requesterUserId: userId });
}
const numberAffected = Users.update(selector, modifier);
if (numberAffected) {
Logger.info(`Changed presenter=${presenter} id=${userId} meeting=${meetingId}`
+ `${changedBy ? ` changedBy=${changedBy}` : ''}`);
}
} catch (err) {
Logger.error(`Changed user role: ${err}`);
}
return Users.update(selector, modifier, cb);
}
*/
import Logger from '/imports/startup/server/logger';
import Users from '/imports/api/users';
import Meetings from '/imports/api/meetings';
@ -83,7 +27,7 @@ export default function changePresenter(presenter, userId, meetingId, changedBy)
id: 1,
},
});
if (currentSlide) modifyWhiteboardAccess(meetingId, currentSlide.id, false);
const meeting = Meetings.findOne({ meetingId });
@ -101,4 +45,4 @@ export default function changePresenter(presenter, userId, meetingId, changedBy)
} catch (err) {
Logger.error(`Changed user role: ${err}`);
}
}
}