Make sure stopWatchingExternalVideo works when called as a method and when called from the server

This commit is contained in:
Lucas Zawacki 2020-02-27 17:30:35 -03:00
parent 92a1fba0ae
commit b48e474e84

View File

@ -9,7 +9,11 @@ export default function stopWatchingExternalVideo(options) {
const CHANNEL = REDIS_CONFIG.channels.toAkkaApps;
const EVENT_NAME = 'StopExternalVideoMsg';
const { meetingId, requesterUserId } = extractCredentials(this.userId);
if (this.userId) {
options = extractCredentials(this.userId);
}
const { meetingId, requesterUserId } = options;
const meeting = Meetings.findOne({ meetingId });
if (!meeting || meeting.externalVideoUrl === null) return;