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
fix(conference) clear raised hands when conference changes
Saúl Ibarra Corretgé86e295e9bc87
diff --git a/react/features/base/participants/actionTypes.ts b/react/features/base/participants/actionTypes.tsindex 50040cf910..85d7eb396f 100644--- a/react/features/base/participants/actionTypes.ts+++ b/react/features/base/participants/actionTypes.ts@@ -203,6 +203,14 @@ export const SET_LOADABLE_AVATAR_URL = 'SET_LOADABLE_AVATAR_URL';*/export const LOCAL_PARTICIPANT_RAISE_HAND = 'LOCAL_PARTICIPANT_RAISE_HAND';+/**+ * Clear the raise hand queue.+ * {+ * type: RAISE_HAND_CLEAR+ * }+ */+export const RAISE_HAND_CLEAR = 'RAISE_HAND_CLEAR';+/*** Updates participant in raise hand queue.* {diff --git a/react/features/base/participants/actions.ts b/react/features/base/participants/actions.tsindex 650db59cda..42fe6afe13 100644--- a/react/features/base/participants/actions.ts+++ b/react/features/base/participants/actions.ts@@ -22,6 +22,7 @@ import {PARTICIPANT_SOURCES_UPDATED,PARTICIPANT_UPDATED,PIN_PARTICIPANT,+ RAISE_HAND_CLEAR,RAISE_HAND_UPDATED,SCREENSHARE_PARTICIPANT_NAME_CHANGED,SET_LOADABLE_AVATAR_URL,@@ -629,6 +630,19 @@ export function raiseHand(enabled: boolean) {};}+/**+ * Clear the raise hand queue.+ *+ * @returns {{+* type: RAISE_HAND_CLEAR+* }}+*/+export function raiseHandClear() {+ return {+ type: RAISE_HAND_CLEAR+ };+}+/*** Update raise hand queue of participants.*diff --git a/react/features/base/participants/reducer.ts b/react/features/base/participants/reducer.tsindex d08cba0b6b..92d8fce399 100644--- a/react/features/base/participants/reducer.ts+++ b/react/features/base/participants/reducer.ts@@ -13,6 +13,7 @@ import {PARTICIPANT_SOURCES_UPDATED,PARTICIPANT_UPDATED,PIN_PARTICIPANT,+ RAISE_HAND_CLEAR,RAISE_HAND_UPDATED,SCREENSHARE_PARTICIPANT_NAME_CHANGED,SET_LOADABLE_AVATAR_URL@@ -465,6 +466,12 @@ ReducerRegistry.register<IParticipantsState>('features/base/participants',return { ...state };}+ case RAISE_HAND_CLEAR: {+ return {+ ...state,+ raisedHandsQueue: []+ };+ }case RAISE_HAND_UPDATED: {return {...state,diff --git a/react/features/conference/middleware.any.ts b/react/features/conference/middleware.any.tsindex 9131c39a43..07a619d286 100644--- a/react/features/conference/middleware.any.ts+++ b/react/features/conference/middleware.any.ts@@ -19,7 +19,7 @@ import { getLocalizedDateFormatter } from '../base/i18n/dateUtil';import { translateToHTML } from '../base/i18n/functions';import i18next from '../base/i18n/i18next';import { browser } from '../base/lib-jitsi-meet';-import { pinParticipant } from '../base/participants/actions';+import { pinParticipant, raiseHandClear } from '../base/participants/actions';import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';import StateListenerRegistry from '../base/redux/StateListenerRegistry';import { SET_REDUCED_UI } from '../base/responsive-ui/actionTypes';@@ -90,6 +90,9 @@ StateListenerRegistry.register(// remaining pinned, since it's not destroyed across runs.dispatch(pinParticipant(null));+ // Clear raised hands.+ dispatch(raiseHandClear());+// XXX I wonder if there is a better way to do this. At this stage// we do know what dialogs we want to keep but the list of those// we want to hide is a lot longer. Thus we take a bit of a shortcut