bigbluebutton-Github/bigbluebutton-html5/imports/api/whiteboard-multi-user/server/methods/changeWhiteboardAccess.js

23 lines
707 B
JavaScript
Raw Normal View History

import RedisPubSub from '/imports/startup/server/redis';
import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
export default function changeWhiteboardAccess(credentials, multiUser) {
const REDIS_CONFIG = Meteor.settings.private.redis;
const CHANNEL = REDIS_CONFIG.channels.toAkkaApps;
const EVENT_NAME = 'ModifyWhiteboardAccessPubMsg';
const { meetingId, requesterUserId, requesterToken } = credentials;
check(meetingId, String);
check(requesterUserId, String);
check(requesterToken, String);
check(multiUser, Boolean);
const payload = {
multiUser,
};
2017-09-19 03:18:37 +08:00
return RedisPubSub.publishUserMessage(CHANNEL, EVENT_NAME, meetingId, requesterUserId, payload);
}