- not transfer works but user isn't removed from users list in breakout room
This commit is contained in:
parent
30503d9c5d
commit
279d3797ef
@ -1,7 +1,7 @@
|
||||
package org.bigbluebutton.core.api
|
||||
|
||||
import org.bigbluebutton.common2.msgs.BreakoutUserVO
|
||||
import org.bigbluebutton.core.domain.BreakoutUser
|
||||
import org.bigbluebutton.core.domain.{ BreakoutUser, BreakoutVoiceUser }
|
||||
import spray.json.JsObject
|
||||
case class InMessageHeader(name: String)
|
||||
case class InHeaderAndJsonPayload(header: InMessageHeader, payload: JsObject)
|
||||
@ -58,7 +58,9 @@ case class SendBreakoutUsersAuditInternalMsg(parentId: String, breakoutId: Strin
|
||||
* @param breakoutId
|
||||
* @param users
|
||||
*/
|
||||
case class BreakoutRoomUsersUpdateInternalMsg(parentId: String, breakoutId: String, users: Vector[BreakoutUser]) extends InMessage
|
||||
case class BreakoutRoomUsersUpdateInternalMsg(parentId: String, breakoutId: String,
|
||||
users: Vector[BreakoutUser],
|
||||
voiceUsers: Vector[BreakoutVoiceUser]) extends InMessage
|
||||
|
||||
/**
|
||||
* Sent by parent meeting to breakout room to end breakout room.
|
||||
|
@ -12,7 +12,7 @@ object BreakoutModel {
|
||||
voiceConf: String,
|
||||
assignedUsers: Vector[String]
|
||||
): BreakoutRoom2x = {
|
||||
new BreakoutRoom2x(id, externalId, name, parentId, sequence, voiceConf, assignedUsers, Vector(), None, false)
|
||||
new BreakoutRoom2x(id, externalId, name, parentId, sequence, voiceConf, assignedUsers, Vector(), Vector(), None, false)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ trait BreakoutRoomUsersUpdateMsgHdlr {
|
||||
model <- state.breakout
|
||||
room <- model.find(msg.breakoutId)
|
||||
} yield {
|
||||
val updatedRoom = room.copy(users = msg.users)
|
||||
val updatedRoom = room.copy(users = msg.users, voiceUsers = msg.voiceUsers)
|
||||
val msgEvent = broadcastEvent(updatedRoom)
|
||||
outGW.send(msgEvent)
|
||||
model.update(updatedRoom)
|
||||
|
@ -2,8 +2,8 @@ package org.bigbluebutton.core.apps.breakout
|
||||
|
||||
import org.bigbluebutton.core.api.{ BreakoutRoomUsersUpdateInternalMsg, SendBreakoutUsersAuditInternalMsg }
|
||||
import org.bigbluebutton.core.bus.BigBlueButtonEvent
|
||||
import org.bigbluebutton.core.domain.BreakoutUser
|
||||
import org.bigbluebutton.core.models.Users2x
|
||||
import org.bigbluebutton.core.domain.{ BreakoutUser, BreakoutVoiceUser }
|
||||
import org.bigbluebutton.core.models.{ Users2x, VoiceUser2x, VoiceUsers }
|
||||
import org.bigbluebutton.core.running.{ MeetingActor, OutMsgRouter }
|
||||
|
||||
trait SendBreakoutUsersUpdateMsgHdlr {
|
||||
@ -16,9 +16,13 @@ trait SendBreakoutUsersUpdateMsgHdlr {
|
||||
val users = Users2x.findAll(liveMeeting.users2x)
|
||||
val breakoutUsers = users map { u => new BreakoutUser(u.extId, u.name) }
|
||||
|
||||
val voiceUsers = VoiceUsers.findAll(liveMeeting.voiceUsers)
|
||||
val breakoutVoiceUsers = voiceUsers map { vu => BreakoutVoiceUser(vu.intId, vu.intId, vu.voiceUserId) }
|
||||
|
||||
eventBus.publish(BigBlueButtonEvent(
|
||||
props.breakoutProps.parentId,
|
||||
new BreakoutRoomUsersUpdateInternalMsg(props.breakoutProps.parentId, props.meetingProp.intId, breakoutUsers)
|
||||
new BreakoutRoomUsersUpdateInternalMsg(props.breakoutProps.parentId, props.meetingProp.intId,
|
||||
breakoutUsers, breakoutVoiceUsers)
|
||||
))
|
||||
}
|
||||
}
|
||||
|
@ -13,14 +13,38 @@ trait TransferUserToMeetingRequestHdlr {
|
||||
|
||||
def handleTransferUserToMeetingRequestMsg(msg: TransferUserToMeetingRequestMsg, state: MeetingState2x): MeetingState2x = {
|
||||
|
||||
for {
|
||||
model <- state.breakout
|
||||
to <- getVoiceConf(msg.body.toMeetingId, model)
|
||||
from <- getVoiceConf(msg.body.fromMeetingId, model)
|
||||
voiceUser <- VoiceUsers.findWithIntId(liveMeeting.voiceUsers, msg.body.userId)
|
||||
} yield {
|
||||
val event = buildTransferUserToVoiceConfSysMsg(from, to, voiceUser.voiceUserId)
|
||||
outGW.send(event)
|
||||
if (msg.body.fromMeetingId == liveMeeting.props.meetingProp.intId) {
|
||||
// want to transfer from parent meeting to breakout
|
||||
for {
|
||||
model <- state.breakout
|
||||
to <- getVoiceConf(msg.body.toMeetingId, model)
|
||||
from <- getVoiceConf(msg.body.fromMeetingId, model)
|
||||
voiceUser <- VoiceUsers.findWithIntId(liveMeeting.voiceUsers, msg.body.userId)
|
||||
} yield {
|
||||
val event = buildTransferUserToVoiceConfSysMsg(from, to, voiceUser.voiceUserId)
|
||||
outGW.send(event)
|
||||
}
|
||||
} else {
|
||||
|
||||
for {
|
||||
model <- state.breakout
|
||||
room <- model.find(msg.body.fromMeetingId)
|
||||
} yield {
|
||||
room.voiceUsers.foreach { vu =>
|
||||
log.info(" ***** Breakout voice user={} userId={}", vu, msg.body.userId)
|
||||
}
|
||||
}
|
||||
|
||||
for {
|
||||
model <- state.breakout
|
||||
to <- getVoiceConf(msg.body.toMeetingId, model)
|
||||
from <- getVoiceConf(msg.body.fromMeetingId, model)
|
||||
room <- model.find(msg.body.fromMeetingId)
|
||||
voiceUser <- room.voiceUsers.find(p => p.id == msg.body.userId)
|
||||
} yield {
|
||||
val event = buildTransferUserToVoiceConfSysMsg(from, to, voiceUser.voiceUserId)
|
||||
outGW.send(event)
|
||||
}
|
||||
}
|
||||
|
||||
state
|
||||
|
@ -9,6 +9,7 @@ case class BreakoutRoom2x(
|
||||
voiceConf: String,
|
||||
assignedUsers: Vector[String],
|
||||
users: Vector[BreakoutUser],
|
||||
voiceUsers: Vector[BreakoutVoiceUser],
|
||||
startedOn: Option[Long],
|
||||
started: Boolean
|
||||
) {
|
||||
@ -16,3 +17,4 @@ case class BreakoutRoom2x(
|
||||
}
|
||||
|
||||
case class BreakoutUser(id: String, name: String)
|
||||
case class BreakoutVoiceUser(id: String, extId: String, voiceUserId: String)
|
@ -66,6 +66,7 @@ class AnalyticsActor extends Actor with ActorLogging {
|
||||
case m: ScreenshareRtmpBroadcastStoppedEvtMsg => logMessage(msg)
|
||||
case m: MeetingInactivityWarningEvtMsg => logMessage(msg)
|
||||
case m: StartRecordingVoiceConfSysMsg => logMessage(msg)
|
||||
case m: TransferUserToVoiceConfSysMsg => logMessage(msg)
|
||||
case _ => // ignore message
|
||||
}
|
||||
}
|
||||
|
@ -143,11 +143,11 @@ package org.bigbluebutton.modules.users.services
|
||||
}, JSON.stringify(message));
|
||||
}
|
||||
|
||||
public function listenInOnBreakout(fomMeetingId:String, toMeetingId:String, userId:String):void {
|
||||
public function listenInOnBreakout(fromMeetingId:String, toMeetingId:String, userId:String):void {
|
||||
var message:Object = {
|
||||
header: {name: "TransferUserToMeetingRequestMsg", meetingId: UsersUtil.getInternalMeetingID(),
|
||||
userId: UsersUtil.getMyUserID()},
|
||||
body: {fomMeetingId: fomMeetingId, toMeetingId: toMeetingId, userId: UsersUtil.getMyUserID()}
|
||||
body: {fromMeetingId: fromMeetingId, toMeetingId: toMeetingId, userId: UsersUtil.getMyUserID()}
|
||||
};
|
||||
|
||||
var _nc:ConnectionManager = BBB.initConnectionManager();
|
||||
|
Loading…
Reference in New Issue
Block a user