-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/v2.7.x-release' into issue-17894
- Loading branch information
Showing
274 changed files
with
5,379 additions
and
1,892 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
...-apps/src/main/scala/org/bigbluebutton/core/apps/users/ClearAllUsersEmojiCmdMsgHdlr.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package org.bigbluebutton.core.apps.users | ||
|
||
import org.bigbluebutton.common2.msgs._ | ||
import org.bigbluebutton.core.models.Users2x | ||
import org.bigbluebutton.core.running.{ BaseMeetingActor, LiveMeeting, OutMsgRouter } | ||
import org.bigbluebutton.core.apps.{ PermissionCheck, RightsManagementTrait } | ||
|
||
trait ClearAllUsersEmojiCmdMsgHdlr extends RightsManagementTrait { | ||
this: BaseMeetingActor => | ||
|
||
val liveMeeting: LiveMeeting | ||
val outGW: OutMsgRouter | ||
|
||
def handleClearAllUsersEmojiCmdMsg(msg: ClearAllUsersEmojiCmdMsg) { | ||
val isUserModerator = !permissionFailed( | ||
PermissionCheck.MOD_LEVEL, | ||
PermissionCheck.VIEWER_LEVEL, | ||
liveMeeting.users2x, | ||
msg.header.userId | ||
) | ||
|
||
if (isUserModerator) { | ||
for { | ||
user <- Users2x.findAll(liveMeeting.users2x) | ||
if user.emoji.equals("raiseHand") || user.emoji.equals("away") || user.emoji.equals("notAway") | ||
} yield { | ||
Users2x.setEmojiStatus(liveMeeting.users2x, user.intId, "none") | ||
} | ||
sendClearedAllUsersEmojiEvtMsg(outGW, liveMeeting.props.meetingProp.intId, msg.header.userId) | ||
} else { | ||
val meetingId = liveMeeting.props.meetingProp.intId | ||
val reason = "No permission to clear users reactions." | ||
PermissionCheck.ejectUserForFailedPermission(meetingId, msg.header.userId, reason, outGW, liveMeeting) | ||
} | ||
} | ||
|
||
def sendClearedAllUsersEmojiEvtMsg(outGW: OutMsgRouter, meetingId: String, userId: String): Unit = { | ||
val routing = Routing.addMsgToClientRouting(MessageTypes.BROADCAST_TO_MEETING, meetingId, userId) | ||
val envelope = BbbCoreEnvelope(ClearedAllUsersEmojiEvtMsg.NAME, routing) | ||
val header = BbbClientMsgHeader(ClearedAllUsersEmojiEvtMsg.NAME, meetingId, userId) | ||
val body = ClearedAllUsersEmojiEvtMsgBody() | ||
val event = ClearedAllUsersEmojiEvtMsg(header, body) | ||
val msgEvent = BbbCommonEnvCoreMsg(envelope, event) | ||
outGW.send(msgEvent) | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
.../src/main/scala/org/bigbluebutton/core/apps/users/UserReactionTimeExpiredCmdMsgHdlr.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.bigbluebutton.core.apps.users | ||
|
||
import org.bigbluebutton.common2.msgs._ | ||
import org.bigbluebutton.core.models.Users2x | ||
import org.bigbluebutton.core.running.{ BaseMeetingActor, LiveMeeting, OutMsgRouter } | ||
import org.bigbluebutton.core.apps.{ RightsManagementTrait } | ||
|
||
trait UserReactionTimeExpiredCmdMsgHdlr extends RightsManagementTrait { | ||
this: BaseMeetingActor => | ||
|
||
val liveMeeting: LiveMeeting | ||
|
||
def handleUserReactionTimeExpiredCmdMsg(msg: UserReactionTimeExpiredCmdMsg) { | ||
val isNodeUser = msg.header.userId.equals("nodeJSapp") | ||
|
||
val currentEmojiState = Users2x.findWithIntId(liveMeeting.users2x, msg.body.userId).get.emoji | ||
|
||
if (isNodeUser && (!currentEmojiState.equals("raiseHand") && !currentEmojiState.equals("away") && !currentEmojiState.equals("notAway"))) { | ||
Users2x.setEmojiStatus(liveMeeting.users2x, msg.body.userId, "none") | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.