bigbluebutton-Github/bigbluebutton-html5/imports/api/users/server/methods/userJoin.js

27 lines
857 B
JavaScript
Raw Normal View History

import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import RedisPubSub from '/imports/startup/server/redis';
import Logger from '/imports/startup/server/logger';
export default function userJoin(meetingId, userId, authToken) {
const REDIS_CONFIG = Meteor.settings.private.redis;
const CHANNEL = REDIS_CONFIG.channels.toAkkaApps;
const EVENT_NAME = 'UserJoinMeetingReqMsg';
2018-03-17 02:57:27 +08:00
Logger.info(`User='${userId}' is joining meeting='${meetingId}' authToken='${authToken}' pt1`);
check(meetingId, String);
check(userId, String);
check(authToken, String);
const payload = {
userId,
authToken,
clientType: 'HTML5',
};
2018-03-17 02:57:27 +08:00
Logger.info(`User='${userId}' is joining meeting='${meetingId}' authToken='${authToken}' pt2`);
2017-09-12 23:52:02 +08:00
return RedisPubSub.publishUserMessage(CHANNEL, EVENT_NAME, meetingId, userId, payload);
2017-09-08 00:47:20 +08:00
}