Merge pull request #18859 from gustavotrott/fix-graphql-webcamsOnlyForModerator
fix (graphql-server): Graphql not updating webcamsOnlyForModerator
This commit is contained in:
commit
4794d105d4
@ -3,8 +3,9 @@ package org.bigbluebutton.core.apps.webcam
|
||||
import org.bigbluebutton.common2.msgs._
|
||||
import org.bigbluebutton.core.apps.PermissionCheck
|
||||
import org.bigbluebutton.core.bus.MessageBus
|
||||
import org.bigbluebutton.core.db.MeetingUsersPoliciesDAO
|
||||
import org.bigbluebutton.core.running.LiveMeeting
|
||||
import org.bigbluebutton.core2.message.senders.{ MsgBuilder }
|
||||
import org.bigbluebutton.core2.message.senders.MsgBuilder
|
||||
|
||||
trait UpdateWebcamsOnlyForModeratorCmdMsgHdlr {
|
||||
this: WebcamApp2x =>
|
||||
@ -50,6 +51,8 @@ trait UpdateWebcamsOnlyForModeratorCmdMsgHdlr {
|
||||
case Some(value) => {
|
||||
log.info(s"Change webcams only for moderator status. meetingId=${meetingId} value=${value}")
|
||||
|
||||
MeetingUsersPoliciesDAO.updateWebcamsOnlyForModerator(meetingId, msg.body.webcamsOnlyForModerator)
|
||||
|
||||
if (value) {
|
||||
val notifyEvent = MsgBuilder.buildNotifyAllInMeetingEvtMsg(
|
||||
meetingId,
|
||||
|
@ -73,8 +73,8 @@ object MeetingUsersPoliciesDAO {
|
||||
.map(u => u.guestPolicy)
|
||||
.update(policy.policy)
|
||||
).onComplete {
|
||||
case Success(rowsAffected) => DatabaseConnection.logger.debug(s"$rowsAffected row(s) updated on meeting_usersPolicies table!")
|
||||
case Failure(e) => DatabaseConnection.logger.error(s"Error updating meeting_usersPolicies: $e")
|
||||
case Success(rowsAffected) => DatabaseConnection.logger.debug(s"$rowsAffected row(s) updated guestPolicy on meeting_usersPolicies table!")
|
||||
case Failure(e) => DatabaseConnection.logger.error(s"Error updating guestPolicy on meeting_usersPolicies: $e")
|
||||
}
|
||||
}
|
||||
|
||||
@ -90,8 +90,20 @@ object MeetingUsersPoliciesDAO {
|
||||
}
|
||||
)
|
||||
).onComplete {
|
||||
case Success(rowsAffected) => DatabaseConnection.logger.debug(s"$rowsAffected row(s) updated on meeting_usersPolicies table!")
|
||||
case Failure(e) => DatabaseConnection.logger.error(s"Error updating meeting_usersPolicies: $e")
|
||||
case Success(rowsAffected) => DatabaseConnection.logger.debug(s"$rowsAffected row(s) updated guestLobbyMessage on meeting_usersPolicies table!")
|
||||
case Failure(e) => DatabaseConnection.logger.error(s"Error updating guestLobbyMessage on meeting_usersPolicies: $e")
|
||||
}
|
||||
}
|
||||
|
||||
def updateWebcamsOnlyForModerator(meetingId: String, webcamsOnlyForModerator: Boolean) = {
|
||||
DatabaseConnection.db.run(
|
||||
TableQuery[MeetingUsersPoliciesDbTableDef]
|
||||
.filter(_.meetingId === meetingId)
|
||||
.map(u => u.webcamsOnlyForModerator)
|
||||
.update(webcamsOnlyForModerator)
|
||||
).onComplete {
|
||||
case Success(rowsAffected) => DatabaseConnection.logger.debug(s"$rowsAffected row(s) updated webcamsOnlyForModerator on meeting_usersPolicies table!")
|
||||
case Failure(e) => DatabaseConnection.logger.error(s"Error updating webcamsOnlyForModerator on meeting_usersPolicies: $e")
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user