- start fixing breakout rooms
This commit is contained in:
parent
d1cc692791
commit
47f012f08f
@ -22,11 +22,51 @@ case class KeepAliveMessage(aliveID: String) extends InMessage
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
case class MonitorNumberOfUsersInternalMsg(meetingID: String) extends InMessage
|
||||
case class SendTimeRemainingUpdate(meetingId: String) extends InMessage
|
||||
|
||||
/**
|
||||
* Audit message sent to meeting to trigger updating clients of meeting time remaining.
|
||||
* @param meetingId
|
||||
*/
|
||||
case class SendTimeRemainingAuditInternalMsg(meetingId: String) extends InMessage
|
||||
|
||||
case class ExtendMeetingDuration(meetingId: String, userId: String) extends InMessage
|
||||
case class DestroyMeetingInternalMsg(meetingId: String) extends InMessage
|
||||
|
||||
/**
|
||||
* Sent by breakout room to parent meeting the breakout had ended.
|
||||
* @param meetingId
|
||||
*/
|
||||
case class BreakoutRoomEndedInternalMsg(meetingId: String) extends InMessage
|
||||
|
||||
/**
|
||||
* Sent by breakout room to parent meeting that breakout room has been created.
|
||||
* @param parentId
|
||||
* @param breakoutId
|
||||
*/
|
||||
case class BreakoutRoomCreatedInternalMsg(parentId: String, breakoutId: String) extends InMessage
|
||||
|
||||
/**
|
||||
* Audit message to trigger breakout room to update parent meeting of list of users.
|
||||
* @param parentId
|
||||
* @param breakoutId
|
||||
*/
|
||||
case class SendBreakoutUsersAuditInternalMsg(parentId: String, breakoutId: String) extends InMessage
|
||||
|
||||
/**
|
||||
* Send by breakout room to parent meeting with list of users in breakout room.
|
||||
* @param parentId
|
||||
* @param breakoutId
|
||||
* @param users
|
||||
*/
|
||||
case class BreakoutRoomUsersUpdateInternalMsg(parentId: String, breakoutId: String, users: Vector[BreakoutUserVO]) extends InMessage
|
||||
|
||||
/**
|
||||
* Sent by parent meeting to breakout room to end breakout room.
|
||||
* @param parentId
|
||||
* @param breakoutId
|
||||
*/
|
||||
case class EndBreakoutRoomInternalMsg(parentId: String, breakoutId: String) extends InMessage
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// Meeting
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -8,14 +8,15 @@ import scala.collection.mutable
|
||||
import org.apache.commons.codec.digest.DigestUtils
|
||||
|
||||
trait BreakoutApp2x extends BreakoutRoomCreatedMsgHdlr
|
||||
with BreakoutRoomEndedMsgHdlr
|
||||
with BreakoutRoomsListMsgHdlr
|
||||
with BreakoutRoomUsersUpdateMsgHdlr
|
||||
with CreateBreakoutRoomsCmdMsgHdlr
|
||||
with EndAllBreakoutRoomsMsgHdlr
|
||||
with RequestBreakoutJoinURLReqMsgHdlr
|
||||
with SendBreakoutUsersUpdateMsgHdlr
|
||||
with TransferUserToMeetingRequestHdlr {
|
||||
with TransferUserToMeetingRequestHdlr
|
||||
with EndBreakoutRoomInternalMsgHdlr
|
||||
with BreakoutRoomEndedInternalMsgHdlr {
|
||||
|
||||
this: MeetingActor =>
|
||||
|
||||
|
@ -3,6 +3,7 @@ package org.bigbluebutton.core.apps.breakout
|
||||
import org.bigbluebutton.SystemConfiguration
|
||||
import org.bigbluebutton.common2.msgs._
|
||||
import org.bigbluebutton.core.OutMessageGateway
|
||||
import org.bigbluebutton.core.api.BreakoutRoomCreatedInternalMsg
|
||||
import org.bigbluebutton.core.models.{ BreakoutRooms, Users2x }
|
||||
import org.bigbluebutton.core.running.{ BaseMeetingActor, LiveMeeting, MeetingActor }
|
||||
|
||||
@ -12,10 +13,10 @@ trait BreakoutRoomCreatedMsgHdlr extends SystemConfiguration {
|
||||
val liveMeeting: LiveMeeting
|
||||
val outGW: OutMessageGateway
|
||||
|
||||
def handleBreakoutRoomCreatedMsg(msg: BreakoutRoomCreatedMsg): Unit = {
|
||||
def handleBreakoutRoomCreatedInternalMsg(msg: BreakoutRoomCreatedInternalMsg): Unit = {
|
||||
|
||||
liveMeeting.breakoutRooms.pendingRoomsNumber -= 1
|
||||
val room = BreakoutRooms.getBreakoutRoom(liveMeeting.breakoutRooms, msg.body.breakoutRoomId)
|
||||
val room = BreakoutRooms.getBreakoutRoom(liveMeeting.breakoutRooms, msg.breakoutId)
|
||||
room foreach { room =>
|
||||
sendBreakoutRoomStarted(room.parentRoomId, room.name, room.externalMeetingId, room.id, room.sequence, room.voiceConfId)
|
||||
}
|
||||
|
@ -1,22 +1,21 @@
|
||||
package org.bigbluebutton.core.apps.breakout
|
||||
|
||||
import org.bigbluebutton.common2.msgs._
|
||||
import org.bigbluebutton.core.OutMessageGateway
|
||||
import org.bigbluebutton.core.api.BreakoutRoomEndedInternalMsg
|
||||
import org.bigbluebutton.core.models.BreakoutRooms
|
||||
import org.bigbluebutton.core.running.MeetingActor
|
||||
import org.bigbluebutton.core2.message.senders.MsgBuilder
|
||||
|
||||
trait BreakoutRoomEndedMsgHdlr {
|
||||
trait BreakoutRoomEndedInternalMsgHdlr {
|
||||
this: MeetingActor =>
|
||||
|
||||
val outGW: OutMessageGateway
|
||||
|
||||
def handleBreakoutRoomEndedMsg(msg: BreakoutRoomEndedMsg): Unit = {
|
||||
|
||||
def handleBreakoutRoomEndedInternalMsg(msg: BreakoutRoomEndedInternalMsg): Unit = {
|
||||
// send out BreakoutRoomEndedEvtMsg to inform clients the breakout has ended
|
||||
outGW.send(MsgBuilder.buildBreakoutRoomEndedEvtMsg(liveMeeting.props.meetingProp.intId, msg.header.userId,
|
||||
msg.body.breakoutRoomId))
|
||||
outGW.send(MsgBuilder.buildBreakoutRoomEndedEvtMsg(liveMeeting.props.meetingProp.intId, "not-used",
|
||||
msg.meetingId))
|
||||
|
||||
BreakoutRooms.removeRoom(liveMeeting.breakoutRooms, msg.body.breakoutRoomId)
|
||||
BreakoutRooms.removeRoom(liveMeeting.breakoutRooms, msg.meetingId)
|
||||
}
|
||||
}
|
@ -2,6 +2,7 @@ package org.bigbluebutton.core.apps.breakout
|
||||
|
||||
import org.bigbluebutton.common2.msgs._
|
||||
import org.bigbluebutton.core.OutMessageGateway
|
||||
import org.bigbluebutton.core.api.BreakoutRoomUsersUpdateInternalMsg
|
||||
import org.bigbluebutton.core.models.BreakoutRooms
|
||||
import org.bigbluebutton.core.running.MeetingActor
|
||||
|
||||
@ -10,16 +11,16 @@ trait BreakoutRoomUsersUpdateMsgHdlr {
|
||||
|
||||
val outGW: OutMessageGateway
|
||||
|
||||
def handleBreakoutRoomUsersUpdateMsg(msg: BreakoutRoomUsersUpdateMsg): Unit = {
|
||||
def handleBreakoutRoomUsersUpdateInternalMsg(msg: BreakoutRoomUsersUpdateInternalMsg): Unit = {
|
||||
|
||||
def broadcastEvent(msg: BreakoutRoomUsersUpdateMsg): Unit = {
|
||||
BreakoutRooms.updateBreakoutUsers(liveMeeting.breakoutRooms, msg.body.breakoutMeetingId, msg.body.users) foreach { room =>
|
||||
def broadcastEvent(msg: BreakoutRoomUsersUpdateInternalMsg): Unit = {
|
||||
BreakoutRooms.updateBreakoutUsers(liveMeeting.breakoutRooms, msg.breakoutId, msg.users) foreach { room =>
|
||||
|
||||
val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, props.meetingProp.intId, msg.header.userId)
|
||||
val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, props.meetingProp.intId, "not-used")
|
||||
val envelope = BbbCoreEnvelope(UpdateBreakoutUsersEvtMsg.NAME, routing)
|
||||
val header = BbbClientMsgHeader(UpdateBreakoutUsersEvtMsg.NAME, props.meetingProp.intId, msg.header.userId)
|
||||
val header = BbbClientMsgHeader(UpdateBreakoutUsersEvtMsg.NAME, props.meetingProp.intId, "not-used")
|
||||
|
||||
val body = UpdateBreakoutUsersEvtMsgBody(props.meetingProp.intId, msg.body.breakoutMeetingId, room.users)
|
||||
val body = UpdateBreakoutUsersEvtMsgBody(props.meetingProp.intId, msg.breakoutId, room.users)
|
||||
val event = UpdateBreakoutUsersEvtMsg(header, body)
|
||||
val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
|
||||
outGW.send(msgEvent)
|
||||
|
@ -2,6 +2,8 @@ package org.bigbluebutton.core.apps.breakout
|
||||
|
||||
import org.bigbluebutton.common2.msgs._
|
||||
import org.bigbluebutton.core.OutMessageGateway
|
||||
import org.bigbluebutton.core.api.EndBreakoutRoomInternalMsg
|
||||
import org.bigbluebutton.core.bus.BigBlueButtonEvent
|
||||
import org.bigbluebutton.core.models.BreakoutRooms
|
||||
import org.bigbluebutton.core.running.MeetingActor
|
||||
|
||||
@ -11,23 +13,11 @@ trait EndAllBreakoutRoomsMsgHdlr {
|
||||
val outGW: OutMessageGateway
|
||||
|
||||
def handleEndAllBreakoutRoomsMsg(msg: EndAllBreakoutRoomsMsg): Unit = {
|
||||
|
||||
def broadcastEvent(msg: EndAllBreakoutRoomsMsg): Unit = {
|
||||
|
||||
log.info("EndAllBreakoutRooms event received for meetingId={}", props.meetingProp.intId)
|
||||
|
||||
val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, props.meetingProp.intId, msg.header.userId)
|
||||
val envelope = BbbCoreEnvelope(EndBreakoutRoomEvtMsg.NAME, routing)
|
||||
val header = BbbClientMsgHeader(EndBreakoutRoomEvtMsg.NAME, props.meetingProp.intId, msg.header.userId)
|
||||
|
||||
BreakoutRooms.getRooms(liveMeeting.breakoutRooms).foreach { room =>
|
||||
val body = EndBreakoutRoomEvtMsgBody(room.id)
|
||||
val event = EndBreakoutRoomEvtMsg(header, body)
|
||||
val msgEvent = BbbCommonEnvCoreMsg(envelope, event)
|
||||
outGW.send(msgEvent)
|
||||
}
|
||||
BreakoutRooms.getRooms(liveMeeting.breakoutRooms).foreach { room =>
|
||||
eventBus.publish(BigBlueButtonEvent(
|
||||
room.id,
|
||||
EndBreakoutRoomInternalMsg(props.breakoutProps.parentId, room.id)
|
||||
))
|
||||
}
|
||||
|
||||
broadcastEvent(msg)
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,19 @@
|
||||
package org.bigbluebutton.core.apps.breakout
|
||||
|
||||
import org.bigbluebutton.core.OutMessageGateway
|
||||
import org.bigbluebutton.core.api.EndBreakoutRoomInternalMsg
|
||||
import org.bigbluebutton.core.bus.IncomingEventBus
|
||||
import org.bigbluebutton.core.domain.MeetingEndReason
|
||||
import org.bigbluebutton.core.running.{ BaseMeetingActor, HandlerHelpers, LiveMeeting }
|
||||
|
||||
trait EndBreakoutRoomInternalMsgHdlr extends HandlerHelpers {
|
||||
this: BaseMeetingActor =>
|
||||
|
||||
val liveMeeting: LiveMeeting
|
||||
val outGW: OutMessageGateway
|
||||
val eventBus: IncomingEventBus
|
||||
|
||||
def handleEndBreakoutRoomInternalMsg(msg: EndBreakoutRoomInternalMsg): Unit = {
|
||||
sendEndMeetingDueToExpiry(MeetingEndReason.ENDED_BY_PARENT, eventBus, outGW, liveMeeting)
|
||||
}
|
||||
}
|
@ -1,7 +1,9 @@
|
||||
package org.bigbluebutton.core.apps.breakout
|
||||
|
||||
import org.bigbluebutton.common2.msgs.{ BreakoutUserVO, SendBreakoutUsersUpdateMsg }
|
||||
import org.bigbluebutton.common2.msgs.BreakoutUserVO
|
||||
import org.bigbluebutton.core.OutMessageGateway
|
||||
import org.bigbluebutton.core.api.{ BreakoutRoomUsersUpdateInternalMsg, SendBreakoutUsersAuditInternalMsg }
|
||||
import org.bigbluebutton.core.bus.BigBlueButtonEvent
|
||||
import org.bigbluebutton.core.models.Users2x
|
||||
import org.bigbluebutton.core.running.MeetingActor
|
||||
|
||||
@ -10,13 +12,14 @@ trait SendBreakoutUsersUpdateMsgHdlr {
|
||||
|
||||
val outGW: OutMessageGateway
|
||||
|
||||
def handleSendBreakoutUsersUpdateMsg(msg: SendBreakoutUsersUpdateMsg): Unit = {
|
||||
def handleSendBreakoutUsersUpdateInternalMsg(msg: SendBreakoutUsersAuditInternalMsg): Unit = {
|
||||
|
||||
val users = Users2x.findAll(liveMeeting.users2x)
|
||||
val breakoutUsers = users map { u => new BreakoutUserVO(u.extId, u.name) }
|
||||
/** TODO Need to figure out how to do this in a 2.0 way */
|
||||
log.error("**** SendBreakoutUsersUpdateMsgHdlr isn't finished and needs a new part *****")
|
||||
//eventBus.publish(BigBlueButtonEvent(props.breakoutProps.parentId,
|
||||
// new BreakoutRoomUsersUpdate(props.breakoutProps.parentId, props.meetingProp.intId, breakoutUsers)))
|
||||
|
||||
eventBus.publish(BigBlueButtonEvent(
|
||||
props.breakoutProps.parentId,
|
||||
new BreakoutRoomUsersUpdateInternalMsg(props.breakoutProps.parentId, props.meetingProp.intId, breakoutUsers)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
@ -16,4 +16,5 @@ object MeetingEndReason {
|
||||
val ENDED_WHEN_LAST_USER_LEFT = "ENDED_WHEN_LAST_USER_LEFT"
|
||||
val ENDED_AFTER_USER_LOGGED_OUT = "ENDED_AFTER_USER_LOGGED_OUT"
|
||||
val ENDED_AFTER_EXCEEDING_DURATION = "ENDED_AFTER_USER_LOGGED_OUT"
|
||||
val ENDED_BY_PARENT = "ENDED_BY_PARENT"
|
||||
}
|
@ -130,59 +130,15 @@ class ReceivedJsonMsgHandlerActor(
|
||||
|
||||
// Breakout rooms
|
||||
case BreakoutRoomsListMsg.NAME =>
|
||||
for {
|
||||
m <- deserialize[BreakoutRoomsListMsg](jsonNode)
|
||||
} yield {
|
||||
send(m.header.meetingId, envelope, m)
|
||||
}
|
||||
routeGenericMsg[BreakoutRoomsListMsg](envelope, jsonNode)
|
||||
case CreateBreakoutRoomsCmdMsg.NAME =>
|
||||
for {
|
||||
m <- deserialize[CreateBreakoutRoomsCmdMsg](jsonNode)
|
||||
} yield {
|
||||
send(m.header.meetingId, envelope, m)
|
||||
}
|
||||
routeGenericMsg[CreateBreakoutRoomsCmdMsg](envelope, jsonNode)
|
||||
case RequestBreakoutJoinURLReqMsg.NAME =>
|
||||
for {
|
||||
m <- deserialize[RequestBreakoutJoinURLReqMsg](jsonNode)
|
||||
} yield {
|
||||
send(m.header.meetingId, envelope, m)
|
||||
}
|
||||
case BreakoutRoomCreatedMsg.NAME =>
|
||||
for {
|
||||
m <- deserialize[BreakoutRoomCreatedMsg](jsonNode)
|
||||
} yield {
|
||||
send(m.header.meetingId, envelope, m)
|
||||
}
|
||||
case BreakoutRoomUsersUpdateMsg.NAME =>
|
||||
for {
|
||||
m <- deserialize[BreakoutRoomUsersUpdateMsg](jsonNode)
|
||||
} yield {
|
||||
send(m.header.meetingId, envelope, m)
|
||||
}
|
||||
case SendBreakoutUsersUpdateMsg.NAME =>
|
||||
for {
|
||||
m <- deserialize[SendBreakoutUsersUpdateMsg](jsonNode)
|
||||
} yield {
|
||||
send(m.header.meetingId, envelope, m)
|
||||
}
|
||||
routeGenericMsg[RequestBreakoutJoinURLReqMsg](envelope, jsonNode)
|
||||
case EndAllBreakoutRoomsMsg.NAME =>
|
||||
for {
|
||||
m <- deserialize[EndAllBreakoutRoomsMsg](jsonNode)
|
||||
} yield {
|
||||
send(m.header.meetingId, envelope, m)
|
||||
}
|
||||
case BreakoutRoomEndedMsg.NAME =>
|
||||
for {
|
||||
m <- deserialize[BreakoutRoomEndedMsg](jsonNode)
|
||||
} yield {
|
||||
send(m.header.meetingId, envelope, m)
|
||||
}
|
||||
routeGenericMsg[EndAllBreakoutRoomsMsg](envelope, jsonNode)
|
||||
case TransferUserToMeetingRequestMsg.NAME =>
|
||||
for {
|
||||
m <- deserialize[TransferUserToMeetingRequestMsg](jsonNode)
|
||||
} yield {
|
||||
send(m.header.meetingId, envelope, m)
|
||||
}
|
||||
routeGenericMsg[TransferUserToMeetingRequestMsg](envelope, jsonNode)
|
||||
|
||||
// Layout
|
||||
case GetCurrentLayoutReqMsg.NAME =>
|
||||
|
@ -133,30 +133,35 @@ class MeetingActor(
|
||||
def receive = {
|
||||
//=============================
|
||||
// 2x messages
|
||||
case msg: BbbCommonEnvCoreMsg => handleBbbCommonEnvCoreMsg(msg)
|
||||
case msg: BbbCommonEnvCoreMsg => handleBbbCommonEnvCoreMsg(msg)
|
||||
|
||||
// Handling RegisterUserReqMsg as it is forwarded from BBBActor and
|
||||
// its type is not BbbCommonEnvCoreMsg
|
||||
case m: RegisterUserReqMsg => usersApp.handleRegisterUserReqMsg(m)
|
||||
case m: GetAllMeetingsReqMsg => handleGetAllMeetingsReqMsg(m)
|
||||
case m: RegisterUserReqMsg => usersApp.handleRegisterUserReqMsg(m)
|
||||
case m: GetAllMeetingsReqMsg => handleGetAllMeetingsReqMsg(m)
|
||||
|
||||
// Meeting
|
||||
case m: DestroyMeetingSysCmdMsg => handleDestroyMeetingSysCmdMsg(m)
|
||||
case m: DestroyMeetingSysCmdMsg => handleDestroyMeetingSysCmdMsg(m)
|
||||
|
||||
//======================================
|
||||
|
||||
//=======================================
|
||||
// old messages
|
||||
case msg: MonitorNumberOfUsersInternalMsg => handleMonitorNumberOfUsers(msg)
|
||||
// internal messages
|
||||
case msg: MonitorNumberOfUsersInternalMsg => handleMonitorNumberOfUsers(msg)
|
||||
|
||||
case msg: AllowUserToShareDesktop => handleAllowUserToShareDesktop(msg)
|
||||
case msg: ExtendMeetingDuration => handleExtendMeetingDuration(msg)
|
||||
case msg: SendTimeRemainingUpdate => state = handleSendTimeRemainingUpdate(msg, state)
|
||||
case msg: AllowUserToShareDesktop => handleAllowUserToShareDesktop(msg)
|
||||
case msg: ExtendMeetingDuration => handleExtendMeetingDuration(msg)
|
||||
case msg: SendTimeRemainingAuditInternalMsg => state = handleSendTimeRemainingUpdate(msg, state)
|
||||
case msg: BreakoutRoomCreatedInternalMsg => handleBreakoutRoomCreatedInternalMsg(msg)
|
||||
case msg: SendBreakoutUsersAuditInternalMsg => handleSendBreakoutUsersUpdateInternalMsg(msg)
|
||||
case msg: BreakoutRoomUsersUpdateInternalMsg => handleBreakoutRoomUsersUpdateInternalMsg(msg)
|
||||
case msg: EndBreakoutRoomInternalMsg => handleEndBreakoutRoomInternalMsg(msg)
|
||||
case msg: BreakoutRoomEndedInternalMsg => handleBreakoutRoomEndedInternalMsg(msg)
|
||||
|
||||
// Screenshare
|
||||
case msg: DeskShareGetDeskShareInfoRequest => handleDeskShareGetDeskShareInfoRequest(msg)
|
||||
case msg: DeskShareGetDeskShareInfoRequest => handleDeskShareGetDeskShareInfoRequest(msg)
|
||||
|
||||
case _ => // do nothing
|
||||
case _ => // do nothing
|
||||
}
|
||||
|
||||
private def handleBbbCommonEnvCoreMsg(msg: BbbCommonEnvCoreMsg): Unit = {
|
||||
@ -205,10 +210,7 @@ class MeetingActor(
|
||||
case m: CreateBreakoutRoomsCmdMsg => handleCreateBreakoutRoomsCmdMsg(m)
|
||||
case m: EndAllBreakoutRoomsMsg => handleEndAllBreakoutRoomsMsg(m)
|
||||
case m: RequestBreakoutJoinURLReqMsg => handleRequestBreakoutJoinURLReqMsg(m)
|
||||
case m: BreakoutRoomCreatedMsg => handleBreakoutRoomCreatedMsg(m)
|
||||
case m: BreakoutRoomEndedMsg => handleBreakoutRoomEndedMsg(m)
|
||||
case m: BreakoutRoomUsersUpdateMsg => handleBreakoutRoomUsersUpdateMsg(m)
|
||||
case m: SendBreakoutUsersUpdateMsg => handleSendBreakoutUsersUpdateMsg(m)
|
||||
|
||||
case m: TransferUserToMeetingRequestMsg => handleTransferUserToMeetingRequestMsg(m)
|
||||
|
||||
// Voice
|
||||
|
@ -55,12 +55,11 @@ class MeetingActorAudit(
|
||||
|
||||
if (props.meetingProp.isBreakout) {
|
||||
// This is a breakout room. Inform our parent meeting that we have been successfully created.
|
||||
/**TODO Need to add a 2.0 notification somehow */
|
||||
log.error("****** MeetingActorInternal still needs to be fixed with 2.0 breakout messages ******")
|
||||
/*eventBus.publish(BigBlueButtonEvent(
|
||||
eventBus.publish(BigBlueButtonEvent(
|
||||
props.breakoutProps.parentId,
|
||||
BreakoutRoomCreated(props.breakoutProps.parentId, props.meetingProp.intId)))
|
||||
*/
|
||||
BreakoutRoomCreatedInternalMsg(props.breakoutProps.parentId, props.meetingProp.intId)
|
||||
))
|
||||
|
||||
}
|
||||
|
||||
def receive = {
|
||||
@ -75,15 +74,15 @@ class MeetingActorAudit(
|
||||
eventBus.publish(BigBlueButtonEvent(props.meetingProp.intId, MonitorNumberOfUsersInternalMsg(props.meetingProp.intId)))
|
||||
|
||||
// Trigger updating users of time remaining on meeting.
|
||||
eventBus.publish(BigBlueButtonEvent(props.meetingProp.intId, SendTimeRemainingUpdate(props.meetingProp.intId)))
|
||||
eventBus.publish(BigBlueButtonEvent(props.meetingProp.intId, SendTimeRemainingAuditInternalMsg(props.meetingProp.intId)))
|
||||
|
||||
if (props.meetingProp.isBreakout) {
|
||||
/**TODO Need to add a 2.0 notification somehow */
|
||||
log.error("******* MeetingActorInternal still needs to be fixed with 2.0 breakout messages *******")
|
||||
// This is a breakout room. Update the main meeting with list of users in this breakout room.
|
||||
//eventBus.publish(BigBlueButtonEvent(props.meetingProp.intId, SendBreakoutUsersUpdate(props.meetingProp.intId)))
|
||||
eventBus.publish(BigBlueButtonEvent(
|
||||
props.meetingProp.intId,
|
||||
SendBreakoutUsersAuditInternalMsg(props.breakoutProps.parentId, props.meetingProp.intId)
|
||||
))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ package org.bigbluebutton.core2.message.handlers
|
||||
|
||||
import org.bigbluebutton.common2.msgs._
|
||||
import org.bigbluebutton.core.OutMessageGateway
|
||||
import org.bigbluebutton.core.api.SendTimeRemainingUpdate
|
||||
import org.bigbluebutton.core.api.SendTimeRemainingAuditInternalMsg
|
||||
import org.bigbluebutton.core.domain.{ MeetingExpiryTracker, MeetingState2x }
|
||||
import org.bigbluebutton.core.models.BreakoutRooms
|
||||
import org.bigbluebutton.core.running.{ BaseMeetingActor, LiveMeeting }
|
||||
@ -14,7 +14,7 @@ trait SendTimeRemainingUpdateHdlr {
|
||||
val liveMeeting: LiveMeeting
|
||||
val outGW: OutMessageGateway
|
||||
|
||||
def handleSendTimeRemainingUpdate(msg: SendTimeRemainingUpdate, state: MeetingState2x): MeetingState2x = {
|
||||
def handleSendTimeRemainingUpdate(msg: SendTimeRemainingAuditInternalMsg, state: MeetingState2x): MeetingState2x = {
|
||||
|
||||
if (liveMeeting.props.durationProps.duration > 0) {
|
||||
val endMeetingTime = MeetingExpiryTracker.endMeetingTime(state)
|
||||
|
@ -1,18 +1,10 @@
|
||||
package org.bigbluebutton.common2.msgs
|
||||
|
||||
object BreakoutRoomCreatedMsg { val NAME = "BreakoutRoomCreatedMsg" }
|
||||
case class BreakoutRoomCreatedMsg(header: BbbClientMsgHeader, body: BreakoutRoomCreatedMsgBody) extends BbbCoreMsg
|
||||
case class BreakoutRoomCreatedMsgBody(meetingId: String, breakoutRoomId: String)
|
||||
|
||||
object BreakoutRoomEndedEvtMsg { val NAME = "BreakoutRoomEndedEvtMsg" }
|
||||
case class BreakoutRoomEndedEvtMsg(header: BbbClientMsgHeader, body: BreakoutRoomEndedEvtMsgBody) extends BbbCoreMsg
|
||||
case class BreakoutRoomEndedEvtMsgBody(parentMeetingId: String, meetingId: String)
|
||||
|
||||
// Sent by breakout actor to tell meeting actor that breakout room has been ended
|
||||
object BreakoutRoomEndedMsg { val NAME = "BreakoutRoomEndedMsg" }
|
||||
case class BreakoutRoomEndedMsg(header: BbbClientMsgHeader, body: BreakoutRoomEndedMsgBody) extends BbbCoreMsg
|
||||
case class BreakoutRoomEndedMsgBody(meetingId: String, breakoutRoomId: String)
|
||||
|
||||
object BreakoutRoomJoinURLEvtMsg { val NAME = "BreakoutRoomJoinURLEvtMsg" }
|
||||
case class BreakoutRoomJoinURLEvtMsg(header: BbbClientMsgHeader, body: BreakoutRoomJoinURLEvtMsgBody) extends BbbCoreMsg
|
||||
case class BreakoutRoomJoinURLEvtMsgBody(parentMeetingId: String, breakoutMeetingId: String,
|
||||
@ -25,7 +17,7 @@ package org.bigbluebutton.common2.msgs
|
||||
case class BreakoutRoomInfo(name: String, externalMeetingId: String, meetingId: String, sequence: Int)
|
||||
|
||||
object BreakoutRoomsListMsg { val NAME = "BreakoutRoomsListMsg" }
|
||||
case class BreakoutRoomsListMsg(header: BbbClientMsgHeader, body: BreakoutRoomsListMsgBody) extends BbbCoreMsg
|
||||
case class BreakoutRoomsListMsg(header: BbbClientMsgHeader, body: BreakoutRoomsListMsgBody) extends StandardMsg
|
||||
case class BreakoutRoomsListMsgBody(meetingId: String)
|
||||
|
||||
/**
|
||||
@ -40,12 +32,6 @@ package org.bigbluebutton.common2.msgs
|
||||
body: BreakoutRoomsTimeRemainingUpdateEvtMsgBody) extends BbbCoreMsg
|
||||
case class BreakoutRoomsTimeRemainingUpdateEvtMsgBody(timeRemaining: Long)
|
||||
|
||||
|
||||
// Sent by breakout actor to tell meeting actor the list of users in the breakout room.
|
||||
object BreakoutRoomUsersUpdateMsg { val NAME = "BreakoutRoomUsersUpdateMsg" }
|
||||
case class BreakoutRoomUsersUpdateMsg(header: BbbClientMsgHeader, body: BreakoutRoomUsersUpdateMsgBody) extends BbbCoreMsg
|
||||
case class BreakoutRoomUsersUpdateMsgBody(meetingId: String, breakoutMeetingId: String, users: Vector[BreakoutUserVO])
|
||||
|
||||
/**
|
||||
* Sent to bbb-web to create breakout rooms.
|
||||
*/
|
||||
@ -61,24 +47,20 @@ package org.bigbluebutton.common2.msgs
|
||||
* Sent by client to request to create breakout rooms.
|
||||
*/
|
||||
object CreateBreakoutRoomsCmdMsg { val NAME = "CreateBreakoutRoomsCmdMsg" }
|
||||
case class CreateBreakoutRoomsCmdMsg(header: BbbClientMsgHeader, body: CreateBreakoutRoomsCmdMsgBody) extends BbbCoreMsg
|
||||
case class CreateBreakoutRoomsCmdMsg(header: BbbClientMsgHeader, body: CreateBreakoutRoomsCmdMsgBody) extends StandardMsg
|
||||
case class CreateBreakoutRoomsCmdMsgBody(meetingId: String, durationInMinutes: Int, record: Boolean, rooms: Vector[BreakoutRoomMsgBody])
|
||||
case class BreakoutRoomMsgBody(name: String, sequence: Int, users: Vector[String])
|
||||
|
||||
// Sent by user to request ending all the breakout rooms
|
||||
object EndAllBreakoutRoomsMsg { val NAME = "EndAllBreakoutRoomsMsg" }
|
||||
case class EndAllBreakoutRoomsMsg(header: BbbClientMsgHeader, body: EndAllBreakoutRoomsMsgBody) extends BbbCoreMsg
|
||||
case class EndAllBreakoutRoomsMsg(header: BbbClientMsgHeader, body: EndAllBreakoutRoomsMsgBody) extends StandardMsg
|
||||
case class EndAllBreakoutRoomsMsgBody(meetingId: String)
|
||||
|
||||
object EndBreakoutRoomEvtMsg { val NAME = "EndBreakoutRoomEvtMsg" }
|
||||
case class EndBreakoutRoomEvtMsg(header: BbbClientMsgHeader, body: EndBreakoutRoomEvtMsgBody) extends BbbCoreMsg
|
||||
case class EndBreakoutRoomEvtMsgBody(breakoutMeetingId: String)
|
||||
|
||||
/**
|
||||
* Sent by client to request a join URL for the breakout room.
|
||||
*/
|
||||
object RequestBreakoutJoinURLReqMsg { val NAME = "RequestBreakoutJoinURLReqMsg" }
|
||||
case class RequestBreakoutJoinURLReqMsg(header: BbbClientMsgHeader, body: RequestBreakoutJoinURLReqMsgBody) extends BbbCoreMsg
|
||||
case class RequestBreakoutJoinURLReqMsg(header: BbbClientMsgHeader, body: RequestBreakoutJoinURLReqMsgBody) extends StandardMsg
|
||||
case class RequestBreakoutJoinURLReqMsgBody(meetingId: String, breakoutMeetingId: String, userId: String)
|
||||
|
||||
/**
|
||||
@ -89,10 +71,6 @@ case class RequestBreakoutJoinURLRespMsg(header: BbbClientMsgHeader, body: Reque
|
||||
case class RequestBreakoutJoinURLRespMsgBody(parentMeetingId: String, breakoutMeetingId: String,
|
||||
userId: String, redirectJoinURL: String, noRedirectJoinURL: String)
|
||||
|
||||
// Send by internal actor to tell the breakout actor to send it's list of users to the main meeting actor.
|
||||
object SendBreakoutUsersUpdateMsg { val NAME = "SendBreakoutUsersUpdateMsg" }
|
||||
case class SendBreakoutUsersUpdateMsg(header: BbbClientMsgHeader, body: SendBreakoutUsersUpdateMsgBody) extends BbbCoreMsg
|
||||
case class SendBreakoutUsersUpdateMsgBody(meetingId: String)
|
||||
|
||||
object TransferUserToMeetingEvtMsg { val NAME = "TransferUserToMeetingEvtMsg" }
|
||||
case class TransferUserToMeetingEvtMsg(header: BbbClientMsgHeader, body: TransferUserToMeetingEvtMsgBody) extends BbbCoreMsg
|
||||
@ -100,7 +78,7 @@ case class RequestBreakoutJoinURLRespMsgBody(parentMeetingId: String, breakoutMe
|
||||
|
||||
// Sent by user actor to ask for voice conference transfer
|
||||
object TransferUserToMeetingRequestMsg { val NAME = "TransferUserToMeetingRequestMsg" }
|
||||
case class TransferUserToMeetingRequestMsg(header: BbbClientMsgHeader, body: TransferUserToMeetingRequestMsgBody) extends BbbCoreMsg
|
||||
case class TransferUserToMeetingRequestMsg(header: BbbClientMsgHeader, body: TransferUserToMeetingRequestMsgBody) extends StandardMsg
|
||||
case class TransferUserToMeetingRequestMsgBody(meetingId: String, targetMeetingId: String, userId: String)
|
||||
|
||||
object UpdateBreakoutUsersEvtMsg { val NAME = "UpdateBreakoutUsersEvtMsg" }
|
||||
|
@ -884,8 +884,6 @@ public class MeetingService implements MessageListener {
|
||||
processStunTurnInfoRequested((StunTurnInfoRequested) message);
|
||||
} else if (message instanceof CreateBreakoutRoom) {
|
||||
processCreateBreakoutRoom((CreateBreakoutRoom) message);
|
||||
} else if (message instanceof EndBreakoutRoom) {
|
||||
processEndBreakoutRoom((EndBreakoutRoom) message);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -83,8 +83,6 @@ class ReceivedJsonMsgHdlrActor(val msgFromAkkaAppsEventBus: MsgFromAkkaAppsEvent
|
||||
route[UserBroadcastCamStoppedEvtMsg](envelope, jsonNode)
|
||||
case CreateBreakoutRoomSysCmdMsg.NAME =>
|
||||
route[CreateBreakoutRoomSysCmdMsg](envelope, jsonNode)
|
||||
case EndBreakoutRoomEvtMsg.NAME =>
|
||||
route[EndBreakoutRoomEvtMsg](envelope, jsonNode)
|
||||
|
||||
|
||||
case _ =>
|
||||
|
@ -33,7 +33,6 @@ class OldMeetingMsgHdlrActor(val olgMsgGW: OldMessageReceivedGW)
|
||||
case m: UserBroadcastCamStartedEvtMsg => handleUserBroadcastCamStartedEvtMsg(m)
|
||||
case m: UserBroadcastCamStoppedEvtMsg => handleUserBroadcastCamStoppedEvtMsg(m)
|
||||
case m: CreateBreakoutRoomSysCmdMsg => handleCreateBreakoutRoomSysCmdMsg(m)
|
||||
case m: EndBreakoutRoomEvtMsg => handleEndBreakoutRoomEvtMsg(m)
|
||||
case _ => log.error("***** Cannot handle " + msg.envelope.name)
|
||||
}
|
||||
}
|
||||
@ -67,10 +66,6 @@ class OldMeetingMsgHdlrActor(val olgMsgGW: OldMessageReceivedGW)
|
||||
|
||||
}
|
||||
|
||||
def handleEndBreakoutRoomEvtMsg(msg: EndBreakoutRoomEvtMsg): Unit = {
|
||||
olgMsgGW.handle(new EndBreakoutRoom(msg.body.breakoutMeetingId))
|
||||
}
|
||||
|
||||
def handlePubSubPongSysRespMsg(msg: PubSubPongSysRespMsg): Unit = {
|
||||
olgMsgGW.handle(new org.bigbluebutton.api.messaging.messages.KeepAliveReply(msg.body.system, msg.body.timestamp))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user