Skip to content

Commit

Permalink
fix querry for existing meetings
Browse files Browse the repository at this point in the history
  • Loading branch information
antobinary committed Jun 13, 2016
1 parent da65320 commit 7fb2184
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,17 +168,19 @@ class BigBlueButtonActor(val system: ActorSystem,

private def handleGetAllMeetingsRequest(msg: GetAllMeetingsRequest) {
val len = meetings.keys.size
val resultArray: Array[MeetingInfo] = new Array[MeetingInfo](len)
var currPosition = len - 1
var resultArray: Array[MeetingInfo] = new Array[MeetingInfo](len)

meetings.foreach(m => {
val id = m._1
val duration = m._2.mProps.duration
val name = m._2.mProps.meetingName
val recorded = m._2.mProps.recorded
val voiceBridge = m._2.mProps.voiceBridge
meetings.values.foreach(m => {
val id = m.mProps.meetingID
val duration = m.mProps.duration
val name = m.mProps.meetingName
val recorded = m.mProps.recorded
val voiceBridge = m.mProps.voiceBridge

val info = new MeetingInfo(id, name, recorded, voiceBridge, duration)
resultArray :+ info
resultArray(currPosition) = info
currPosition = currPosition - 1

val html5clientRequesterID = "nodeJSapp"

Expand All @@ -201,7 +203,9 @@ class BigBlueButtonActor(val system: ActorSystem,
eventBus.publish(BigBlueButtonEvent(id, new SendCaptionHistoryRequest(id, html5clientRequesterID)))
})

outGW.send(new GetAllMeetingsReply(resultArray))
if (len > 0) {
outGW.send(new GetAllMeetingsReply(resultArray))
}
}

private def handleDeskShareStartedRequest(msg: DeskShareStartedRequest) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ eventEmitter.on('meeting_created_message', function (arg) {
voiceConf, duration, arg.callback);
});

eventEmitter.on('get_all_meetings_reply', function (arg) {
eventEmitter.on('get_all_meetings_reply_message', function (arg) {
logger.info('Let\'s store some data for the running meetings so that when an' +
' HTML5 client joins everything is ready!');
logger.info(JSON.stringify(arg.payload));
Expand Down
3 changes: 2 additions & 1 deletion bigbluebutton-html5/imports/startup/server/EventQueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const logRedisMessage = function (eventName, json) {
// Avoid cluttering the log with json messages carrying little or repetitive
// information. Comment out a message type in the array to be able to see it
// in the log upon restarting of the Meteor process.
notLoggedEventTypes = [
let notLoggedEventTypes = [
'keep_alive_reply',
'page_resized_message',
'presentation_page_resized_message',
Expand Down Expand Up @@ -141,4 +141,5 @@ const handledMessageTypes = [
'poll_started_message',
'poll_stopped_message',
'user_voted_poll_message',
'get_all_meetings_reply_message',
];

0 comments on commit 7fb2184

Please sign in to comment.