bigbluebutton-Github/bigbluebutton-html5/imports/api/presentations/server/methods/removePresentation.js

22 lines
684 B
JavaScript

import RedisPubSub from '/imports/startup/server/redis';
import { check } from 'meteor/check';
import { extractCredentials } from '/imports/api/common/server/helpers';
export default function removePresentation(presentationId, podId) {
const REDIS_CONFIG = Meteor.settings.private.redis;
const CHANNEL = REDIS_CONFIG.channels.toAkkaApps;
const EVENT_NAME = 'RemovePresentationPubMsg';
const { meetingId, requesterUserId } = extractCredentials(this.userId);
check(presentationId, String);
check(podId, String);
const payload = {
presentationId,
podId,
};
return RedisPubSub.publishUserMessage(CHANNEL, EVENT_NAME, meetingId, requesterUserId, payload);
}