From 70d3c00e74f806ac9fd482b19e7e6531a8e64f9a Mon Sep 17 00:00:00 2001 From: Anton Georgiev Date: Fri, 24 Apr 2015 21:21:10 +0000 Subject: [PATCH] include permissions info in the reply for GetAllMeetingsRequest --- .../service/whiteboard/WhiteboardListener.java | 3 +-- .../bigbluebutton/core/BigBlueButtonActor.scala | 3 +++ .../org/bigbluebutton/core/MeetingActor.scala | 2 +- .../bigbluebutton/core/apps/users/UsersApp.scala | 16 ++++++---------- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/whiteboard/WhiteboardListener.java b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/whiteboard/WhiteboardListener.java index 47bc7b68c6..8f80bdb8bd 100644 --- a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/whiteboard/WhiteboardListener.java +++ b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/whiteboard/WhiteboardListener.java @@ -20,7 +20,6 @@ public class WhiteboardListener implements MessageHandler{ @Override public void handleMessage(String pattern, String channel, String message) { if (channel.equalsIgnoreCase(MessagingConstants.TO_WHITEBOARD_CHANNEL)) { - System.out.println("AntonChannel=(whiteboard)" + channel); JsonParser parser = new JsonParser(); JsonObject obj = (JsonObject) parser.parse(message); @@ -44,7 +43,7 @@ public class WhiteboardListener implements MessageHandler{ else { System.out.println("\n DID NOT FIND A whiteboardID \n"); } - System.out.println("\n\n\n user<" + requesterID + "> requested the shapes.\n\n"); + System.out.println("\n user<" + requesterID + "> requested the shapes.\n"); } } } diff --git a/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonActor.scala b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonActor.scala index 9980fda2e5..3b3702d983 100755 --- a/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonActor.scala +++ b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/BigBlueButtonActor.scala @@ -158,6 +158,9 @@ class BigBlueButtonActor(outGW: MessageOutGateway) extends Actor with LogHelper //send chat history this ! (new GetChatHistoryRequest(id, "nodeJSapp", "nodeJSapp")) + + //send lock settings + this ! (new GetLockSettings(id, "nodeJSapp")) } outGW.send(new GetAllMeetingsReply(resultArray)) diff --git a/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/MeetingActor.scala b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/MeetingActor.scala index 1782c557bb..139bacded8 100755 --- a/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/MeetingActor.scala +++ b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/MeetingActor.scala @@ -2,7 +2,6 @@ package org.bigbluebutton.core import scala.actors.Actor import scala.actors.Actor._ -import org.bigbluebutton.core.apps.poll.PollApp import org.bigbluebutton.core.apps.poll.Poll import org.bigbluebutton.core.apps.poll.PollApp import org.bigbluebutton.core.apps.users.UsersApp @@ -90,6 +89,7 @@ class MeetingActor(val meetingID: String, val externalMeetingID: String, val mee case msg: MuteUserRequest => handleMuteUserRequest(msg) case msg: EjectUserFromVoiceRequest => handleEjectUserRequest(msg) case msg: SetLockSettings => handleSetLockSettings(msg) + case msg: GetLockSettings => handleGetLockSettings(msg) case msg: LockUserRequest => handleLockUserRequest(msg) case msg: InitLockSettings => handleInitLockSettings(msg) case msg: InitAudioSettings => handleInitAudioSettings(msg) diff --git a/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/users/UsersApp.scala b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/users/UsersApp.scala index 481275a855..00a8b336b2 100755 --- a/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/users/UsersApp.scala +++ b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/users/UsersApp.scala @@ -81,18 +81,11 @@ trait UsersApp { //send the reply outGW.send(new ValidateAuthTokenReply(meetingID, msg.userId, msg.token, true, msg.correlationId, msg.sessionId)) - //send the list of users in the meeting - outGW.send(new GetUsersReply(meetingID, msg.userId, users.getUsers, msg.sessionId)) - - //send chat history - this ! (new GetChatHistoryRequest(meetingID, msg.userId, msg.userId)) - //join the user handleUserJoin(new UserJoining(meetingID, msg.userId, msg.token)) //send the presentation logger.info("ValidateToken success: mid=[" + meetingID + "] uid=[" + msg.userId + "]") - this ! (new GetPresentationInfo(meetingID, msg.userId, msg.userId)) } case None => { logger.info("ValidateToken failed: mid=[" + meetingID + "] uid=[" + msg.userId + "]") @@ -153,11 +146,14 @@ trait UsersApp { case None => // do nothing } } - + def handleGetLockSettings(msg: GetLockSettings) { - logger.info("Not implemented: handleGetLockSettings") + //println("*************** Reply with current lock settings ********************") + + //reusing the existing handle for NewPermissionsSettings to reply to the GetLockSettings request + outGW.send(new NewPermissionsSetting(meetingID, msg.userId, permissions, users.getUsers)) } - + def handleSetLockSettings(msg: SetLockSettings) { // println("*************** Received new lock settings ********************") if (!permissionsEqual(msg.settings)) {