diff --git a/bigbluebutton-html5/imports/api/breakouts/server/eventHandlers.js b/bigbluebutton-html5/imports/api/breakouts/server/eventHandlers.js old mode 100644 new mode 100755 index 40df1e7d3dbc334345121c25d891abd14a910015..48d54c7de9d826cdd0e1d7bbda8e9308eafba1f0 --- a/bigbluebutton-html5/imports/api/breakouts/server/eventHandlers.js +++ b/bigbluebutton-html5/imports/api/breakouts/server/eventHandlers.js @@ -6,5 +6,6 @@ import handleBreakoutClosed from './handlers/breakoutClosed'; RedisPubSub.on('BreakoutRoomStartedEvtMsg', handleBreakoutStarted); RedisPubSub.on('BreakoutRoomJoinURLEvtMsg', handleBreakoutJoinURL); +RedisPubSub.on('RequestBreakoutJoinURLRespMsg', handleBreakoutJoinURL); RedisPubSub.on('BreakoutRoomsTimeRemainingUpdateEvtMsg', handleUpdateTimeRemaining); RedisPubSub.on('BreakoutRoomEndedEvtMsg', handleBreakoutClosed); diff --git a/bigbluebutton-html5/imports/api/breakouts/server/methods.js b/bigbluebutton-html5/imports/api/breakouts/server/methods.js old mode 100644 new mode 100755 index 6ce8893022abca29a65e3c1d79edb2c6aaac9f6b..9958a42d5ef9c9e43c4eb10732b7e5baea7350f3 --- a/bigbluebutton-html5/imports/api/breakouts/server/methods.js +++ b/bigbluebutton-html5/imports/api/breakouts/server/methods.js @@ -1,3 +1,6 @@ import { Meteor } from 'meteor/meteor'; +import requestJoinURL from './methods/requestJoinURL'; -Meteor.methods({}); +Meteor.methods({ + requestJoinURL, +}); diff --git a/bigbluebutton-html5/imports/api/breakouts/server/methods/requestJoinURL.js b/bigbluebutton-html5/imports/api/breakouts/server/methods/requestJoinURL.js new file mode 100755 index 0000000000000000000000000000000000000000..a2a5c197892f717498bc21722da7ce7a39800ec2 --- /dev/null +++ b/bigbluebutton-html5/imports/api/breakouts/server/methods/requestJoinURL.js @@ -0,0 +1,25 @@ +import { Meteor } from 'meteor/meteor'; +import { check } from 'meteor/check'; +import RedisPubSub from '/imports/startup/server/redis'; + + +export default function requestJoinURL(credentials, { breakoutId }) { + 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 = 'RequestBreakoutJoinURLReqMsg'; + return RedisPubSub.publishUserMessage( + CHANNEL, eventName, meetingId, requesterUserId, + { + meetingId, + breakoutId, + userId: requesterUserId, + }, + ); +}