summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaksim Sukharev <antreesy.web@gmail.com>2024-01-19 11:06:14 +0100
committerMaksim Sukharev <antreesy.web@gmail.com>2024-01-22 15:39:20 +0100
commit3e26bbf43079dd6e3e2532022a3e2aeb0c3a6e53 (patch)
treebb34a2cc1dcc7dbeb6f471048f30769cc97eadcf
parent335a3b22058109abc13f57481b9a65d4cc071cbd (diff)
fix(breakout): request / dismiss assistance if user is the first / last in the room
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
-rw-r--r--src/components/TopBar/TopBarMenu.vue11
-rw-r--r--src/store/callViewStore.js3
2 files changed, 13 insertions, 1 deletions
diff --git a/src/components/TopBar/TopBarMenu.vue b/src/components/TopBar/TopBarMenu.vue
index 888d9aef5..09a23c851 100644
--- a/src/components/TopBar/TopBarMenu.vue
+++ b/src/components/TopBar/TopBarMenu.vue
@@ -467,8 +467,17 @@ export default {
// If the current conversation is a break-out room and the user is not a moderator,
// also send request for assistance to the moderators.
if (this.userIsInBreakoutRoomAndInCall && !this.canModerate) {
- if (newState) {
+ const hasRaisedHands = Object.keys(this.$store.getters.participantRaisedHandList)
+ .filter(sessionId => sessionId !== this.$store.getters.getSessionId())
+ .length !== 0
+ if (hasRaisedHands) {
+ return // Assistance is already requested by someone in the room
+ }
+ const hasAssistanceRequested = this.conversation.breakoutRoomStatus === CONVERSATION.BREAKOUT_ROOM_STATUS.STATUS_ASSISTANCE_REQUESTED
+ if (newState && !hasAssistanceRequested) {
this.$store.dispatch('requestAssistanceAction', { token: this.token })
+ } else if (!newState && hasAssistanceRequested) {
+ this.$store.dispatch('resetRequestAssistanceAction', { token: this.token })
}
}
},
diff --git a/src/store/callViewStore.js b/src/store/callViewStore.js
index 54ead1acf..783023bd9 100644
--- a/src/store/callViewStore.js
+++ b/src/store/callViewStore.js
@@ -54,6 +54,9 @@ const getters = {
return state.selectedVideoPeerId
},
isQualityWarningTooltipDismissed: (state) => state.qualityWarningTooltipDismissed,
+ participantRaisedHandList: (state) => {
+ return state.participantRaisedHands
+ },
getParticipantRaisedHand: (state) => (sessionIds) => {
for (let i = 0; i < sessionIds.length; i++) {
if (state.participantRaisedHands[sessionIds[i]]) {