feat(visitor) confirm raised hand sent to mods (#16388)

This commit is contained in:
Mihaela Dumitru
2025-09-09 16:19:39 +03:00
committed by GitHub
parent abc1f3d33b
commit 58db02bab8
3 changed files with 28 additions and 2 deletions

View File

@@ -1617,6 +1617,8 @@
"noMainParticipantsTitle": "This meeting hasn't started yet.",
"noVisitorLobby": "You cannot join while there is a lobby enabled for the meeting.",
"notAllowedPromotion": "A participant needs to allow your request first.",
"requestToJoin": "Hand Raised",
"requestToJoinDescription": "Your request was sent to the moderators. Hang tight!",
"title": "You are a viewer in the meeting"
},
"waitingMessage": "You'll join the meeting as soon as it is live!"

View File

@@ -24,12 +24,14 @@ import { hideNotification, showNotification } from '../../notifications/actions'
import {
LOCAL_RECORDING_NOTIFICATION_ID,
NOTIFICATION_TIMEOUT_TYPE,
RAISE_HAND_NOTIFICATION_ID
RAISE_HAND_NOTIFICATION_ID,
VISITOR_ASKED_TO_JOIN_NOTIFICATION_ID
} from '../../notifications/constants';
import { open as openParticipantsPane } from '../../participants-pane/actions';
import { CALLING, INVITED } from '../../presence-status/constants';
import { RAISE_HAND_SOUND_ID } from '../../reactions/constants';
import { RECORDING_OFF_SOUND_ID, RECORDING_ON_SOUND_ID } from '../../recording/constants';
import { iAmVisitor } from '../../visitors/functions';
import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../app/actionTypes';
import { CONFERENCE_JOINED, CONFERENCE_WILL_JOIN } from '../conference/actionTypes';
import { forEachConference, getCurrentConference } from '../conference/functions';
@@ -167,7 +169,10 @@ MiddlewareRegistry.register(store => next => action => {
case LOCAL_PARTICIPANT_RAISE_HAND: {
const { raisedHandTimestamp } = action;
const localId = getLocalParticipant(store.getState())?.id;
const localParticipant = getLocalParticipant(store.getState());
const localId = localParticipant?.id;
const _iAmVisitor = iAmVisitor(store.getState());
const isHandRaised = hasRaisedHand(localParticipant);
store.dispatch(participantUpdated({
// XXX Only the local participant is allowed to update without
@@ -186,6 +191,18 @@ MiddlewareRegistry.register(store => next => action => {
raisedHandTimestamp
}));
if (_iAmVisitor) {
const notifyAction = isHandRaised
? hideNotification(VISITOR_ASKED_TO_JOIN_NOTIFICATION_ID)
: showNotification({
titleKey: 'visitors.notification.requestToJoin',
descriptionKey: 'visitors.notification.requestToJoinDescription',
uid: VISITOR_ASKED_TO_JOIN_NOTIFICATION_ID
}, NOTIFICATION_TIMEOUT_TYPE.STICKY);
store.dispatch(notifyAction);
}
if (typeof APP !== 'undefined') {
APP.API.notifyRaiseHandUpdated(localId, raisedHandTimestamp);
}

View File

@@ -119,6 +119,13 @@ export const VISITORS_PROMOTION_NOTIFICATION_ID = 'VISITORS_PROMOTION_NOTIFICATI
*/
export const VISITORS_NOT_LIVE_NOTIFICATION_ID = 'VISITORS_NOT_LIVE_NOTIFICATION_ID';
/**
* The identifier of the visitors notification indicating the request for promotion.
*
* @type {string}
*/
export const VISITOR_ASKED_TO_JOIN_NOTIFICATION_ID = 'VISITOR_ASKED_TO_JOIN_NOTIFICATION_ID';
/**
* Amount of participants beyond which no join notification will be emitted.
*/