- only remove stream if present
This commit is contained in:
parent
007a13d0e9
commit
10ef6bec01
@ -249,12 +249,15 @@ trait UsersApp {
|
||||
|
||||
def handleUserunshareWebcam(msg: UserUnshareWebcam) {
|
||||
usersModel.getUser(msg.userId) foreach { user =>
|
||||
val streams = user.webcamStreams - msg.stream
|
||||
val streamName = user.webcamStreams find (w => w == msg.stream) foreach { streamName =>
|
||||
val streams = user.webcamStreams - streamName
|
||||
val uvo = user.copy(hasStream = (!streams.isEmpty), webcamStreams = streams)
|
||||
usersModel.addUser(uvo)
|
||||
log.info("User unshared webcam: mid=[" + mProps.meetingID + "] uid=[" + uvo.userID + "] unsharedStream=[" + msg.stream + "] streams=[" + streams + "]")
|
||||
outGW.send(new UserUnsharedWebcam(mProps.meetingID, mProps.recorded, uvo.userID, msg.stream))
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
def handleChangeUserStatus(msg: ChangeUserStatus): Unit = {
|
||||
|
Loading…
Reference in New Issue
Block a user