bigbluebutton-Github/bigbluebutton-html5/imports/api/group-chat/server/methods/createGroupChat.js

32 lines
933 B
JavaScript
Raw Normal View History

import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import RedisPubSub from '/imports/startup/server/redis';
export default function createGroupChat(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 = 'CreateGroupChatReqMsg';
const payload = {
// TODO: Implement this together with #4988
// correlationId: String,
// name: String,
// access: String,
// users: Vector[String],
// msg: Vector[{
// correlationId: String,
// sender: GroupChatUser,
// color: String,
// message: String
// }],
};
return RedisPubSub.publishUserMessage(CHANNEL, eventName, meetingId, requesterUserId, payload);
}