Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat(visitor) confirm raised hand sent to mods (#16388)
Mihaela Dumitru58db02bab854
diff --git a/lang/main.json b/lang/main.jsonindex dc21f2d3da..083e8ffb10 100644--- a/lang/main.json+++ b/lang/main.json@@ -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!"diff --git a/react/features/base/participants/middleware.ts b/react/features/base/participants/middleware.tsindex 969c805ade..ab66928a99 100644--- a/react/features/base/participants/middleware.ts+++ b/react/features/base/participants/middleware.ts@@ -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);}diff --git a/react/features/notifications/constants.ts b/react/features/notifications/constants.tsindex 3c9c5978b8..f749ec6c1f 100644--- a/react/features/notifications/constants.ts+++ b/react/features/notifications/constants.ts@@ -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.*/