From 1d26b39ed571a2ef1559a58024fc322529b95447 Mon Sep 17 00:00:00 2001 From: Richard Alam <ritzalam@gmail.com> Date: Tue, 26 Aug 2014 13:43:50 -0700 Subject: [PATCH] - turn off talking when user is muted or joined listen-only --- .../scala/org/bigbluebutton/core/apps/users/UsersApp.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/users/UsersApp.scala b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/users/UsersApp.scala index 42e8917496..48d8247c05 100644 --- a/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/users/UsersApp.scala +++ b/bigbluebutton-apps/src/main/scala/org/bigbluebutton/core/apps/users/UsersApp.scala @@ -36,7 +36,8 @@ trait UsersApp { // println("*************** Got UserConnectedToGlobalAudio message for [" + msg.name + "] ********************" ) val user = users.getUserWithExternalId(msg.userid) user foreach {u => - val uvo = u.copy(listenOnly=true) + val vu = u.voiceUser.copy(talking=false) + val uvo = u.copy(listenOnly=true, voiceUser=vu) users.addUser(uvo) outGW.send(new UserListeningOnly(meetingID, recorded, uvo.userID, uvo.listenOnly)) } @@ -315,7 +316,8 @@ trait UsersApp { def handleVoiceUserMuted(msg: VoiceUserMuted) { users.getUser(msg.userId) foreach {user => - val nv = user.voiceUser.copy(muted=msg.muted) + val talking = if (msg.muted) false else user.voiceUser.talking + val nv = user.voiceUser.copy(muted=msg.muted, talking=talking) val nu = user.copy(voiceUser=nv) users.addUser(nu) // println("Received voice muted=[" + msg.muted + "] wid=[" + msg.userId + "]" ) -- GitLab