bigbluebutton-Github/bigbluebutton-html5/imports/api/breakouts/server/methods/endAllBreakouts.js
2018-10-23 14:18:09 -03:00

22 lines
623 B
JavaScript

import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import RedisPubSub from '/imports/startup/server/redis';
export default function endAllBreakouts(credentials) {
const REDIS_CONFIG = Meteor.settings.private.redis;
const CHANNEL = REDIS_CONFIG.channels.toAkkaApps;
const {
meetingId,
requesterUserId,
requesterToken,
} = credentials;
check(meetingId, String);
check(requesterUserId, String);
check(requesterToken, String);
const eventName = 'EndAllBreakoutRoomsMsg';
return RedisPubSub.publishUserMessage(CHANNEL, eventName, meetingId, requesterUserId, null);
}