Merge pull request #12447 from gustavotrott/fix-user-inactive-while-in-breakoutroom
fix: Avoid users to be ejected due to inactivity while they are in a breakout room
This commit is contained in:
commit
93c9aecab8
@ -3,6 +3,7 @@ package org.bigbluebutton.core.apps.breakout
|
||||
import org.bigbluebutton.common2.msgs._
|
||||
import org.bigbluebutton.core.api.BreakoutRoomUsersUpdateInternalMsg
|
||||
import org.bigbluebutton.core.domain.{ BreakoutRoom2x, MeetingState2x }
|
||||
import org.bigbluebutton.core.models.Users2x
|
||||
import org.bigbluebutton.core.running.{ MeetingActor, OutMsgRouter }
|
||||
|
||||
trait BreakoutRoomUsersUpdateMsgHdlr {
|
||||
@ -30,6 +31,13 @@ trait BreakoutRoomUsersUpdateMsgHdlr {
|
||||
val updatedRoom = room.copy(users = msg.users, voiceUsers = msg.voiceUsers)
|
||||
val msgEvent = broadcastEvent(updatedRoom)
|
||||
outGW.send(msgEvent)
|
||||
|
||||
//Update user lastActivityTime in parent room (to avoid be ejected while is in Breakout room)
|
||||
for {
|
||||
breakoutRoomUser <- updatedRoom.users
|
||||
user <- Users2x.findWithBreakoutRoomId(liveMeeting.users2x, breakoutRoomUser.id)
|
||||
} yield Users2x.updateLastUserActivity(liveMeeting.users2x, user)
|
||||
|
||||
model.update(updatedRoom)
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,14 @@ object Users2x {
|
||||
users.toVector find (u => u.intId == intId)
|
||||
}
|
||||
|
||||
def findWithBreakoutRoomId(users: Users2x, breakoutRoomId: String): Option[UserState] = {
|
||||
//userId + "-" + roomSequence
|
||||
val userIdParts = breakoutRoomId.split("-")
|
||||
val userExtId = userIdParts(0)
|
||||
|
||||
users.toVector find (u => u.extId == userExtId)
|
||||
}
|
||||
|
||||
def findAll(users: Users2x): Vector[UserState] = users.toVector
|
||||
|
||||
def add(users: Users2x, user: UserState): Option[UserState] = {
|
||||
|
Loading…
Reference in New Issue
Block a user