From b61fe6faaf6df687a448610af60465b863a6786c Mon Sep 17 00:00:00 2001 From: Anton Georgiev Date: Fri, 16 Jun 2017 14:54:38 -0400 Subject: [PATCH] send events straight to meeting eventBus --- .../senders/ReceivedJsonMsgHandlerActor.scala | 14 +++++++------- .../bigbluebutton/core/running/MeetingActor.scala | 8 +++++++- .../handlers/GetCurrentPollReqMsgHdlr.scala | 2 +- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/ReceivedJsonMsgHandlerActor.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/ReceivedJsonMsgHandlerActor.scala index 672a576482..2e2b48d871 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/ReceivedJsonMsgHandlerActor.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/pubsub/senders/ReceivedJsonMsgHandlerActor.scala @@ -72,43 +72,43 @@ class ReceivedJsonMsgHandlerActor( for { m <- deserialize[StartCustomPollReqMsg](jsonNode) } yield { - send(meetingManagerChannel, envelope, m) + send(m.header.meetingId, envelope, m) } case StartPollReqMsg.NAME => for { m <- deserialize[StartPollReqMsg](jsonNode) } yield { - send(meetingManagerChannel, envelope, m) + send(m.header.meetingId, envelope, m) } case StopPollReqMsg.NAME => for { m <- deserialize[StopPollReqMsg](jsonNode) } yield { - send(meetingManagerChannel, envelope, m) + send(m.header.meetingId, envelope, m) } case ShowPollResultReqMsg.NAME => for { m <- deserialize[ShowPollResultReqMsg](jsonNode) } yield { - send(meetingManagerChannel, envelope, m) + send(m.header.meetingId, envelope, m) } case HidePollResultReqMsg.NAME => for { m <- deserialize[HidePollResultReqMsg](jsonNode) } yield { - send(meetingManagerChannel, envelope, m) + send(m.header.meetingId, envelope, m) } case GetCurrentPollReqMsg.NAME => for { m <- deserialize[GetCurrentPollReqMsg](jsonNode) } yield { - send(meetingManagerChannel, envelope, m) + send(m.header.meetingId, envelope, m) } case RespondToPollReqMsg.NAME => for { m <- deserialize[RespondToPollReqMsg](jsonNode) } yield { - send(meetingManagerChannel, envelope, m) + send(m.header.meetingId, envelope, m) } case UserBroadcastCamStartMsg.NAME => for { diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala index a529fcf8d6..955d97876f 100755 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core/running/MeetingActor.scala @@ -74,7 +74,6 @@ class MeetingActor(val props: DefaultProps, // 2x messages case msg: BbbCommonEnvCoreMsg => handleBbbCommonEnvCoreMsg(msg) case msg: RegisterUserReqMsg => handleRegisterUserReqMsg(msg) - case msg: StartPollReqMsg => handleStartPollReqMsg(msg) //====================================== //======================================= @@ -200,6 +199,13 @@ class MeetingActor(val props: DefaultProps, case m: UserBroadcastCamStopMsg => handleUserBroadcastCamStopMsg(m) case m: UserJoinedVoiceConfEvtMsg => handle(m) case m: StartPollReqMsg => handleStartPollReqMsg(m) + case m: StartCustomPollReqMsg => handleStartCustomPollReqMsg(m) + case m: StopPollReqMsg => handleStopPollReqMsg(m) + case m: ShowPollResultReqMsg => handleShowPollResultReqMsg(m) + case m: HidePollResultReqMsg => handleHidePollResultReqMsg(m) + case m: GetCurrentPollReqMsg => handleGetCurrentPollReqMsg(m) + case m: RespondToPollReqMsg => handleRespondToPollReqMsg(m) + case _ => println("***** Cannot handle " + msg.envelope.name) } } diff --git a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/GetCurrentPollReqMsgHdlr.scala b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/GetCurrentPollReqMsgHdlr.scala index dc7c32ddb5..f037342e72 100644 --- a/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/GetCurrentPollReqMsgHdlr.scala +++ b/akka-bbb-apps/src/main/scala/org/bigbluebutton/core2/message/handlers/GetCurrentPollReqMsgHdlr.scala @@ -12,7 +12,7 @@ trait GetCurrentPollReqMsgHdlr { val outGW: OutMessageGateway - def handleGetCurrentPollRespMsg(msg: GetCurrentPollReqMsg): Unit = { + def handleGetCurrentPollReqMsg(msg: GetCurrentPollReqMsg): Unit = { def broadcastEvent(msg: GetCurrentPollReqMsg, hasPoll: Boolean, pvo: PollVO): Unit = { val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, props.meetingProp.intId, msg.header.userId)