Browse Source

fix(raise-hand) Fix multiple raise hand from notification (#11586)

Only dispatch raise hand if hand was not already raised
master
Robert Pintilii 3 years ago
parent
commit
9dba1d30b0
No account linked to committer's email address
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      react/features/av-moderation/middleware.js

+ 3
- 1
react/features/av-moderation/middleware.js View File

@@ -80,6 +80,8 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
80 80
         let descriptionKey;
81 81
         let titleKey;
82 82
         let uid;
83
+        const localParticipant = getLocalParticipant(getState);
84
+        const raisedHand = hasRaisedHand(localParticipant);
83 85
 
84 86
         switch (action.mediaType) {
85 87
         case MEDIA_TYPE.AUDIO: {
@@ -102,7 +104,7 @@ MiddlewareRegistry.register(({ dispatch, getState }) => next => action => {
102 104
         dispatch(showNotification({
103 105
             customActionNameKey: [ 'notify.raiseHandAction' ],
104 106
             customActionHandler: [ () => batch(() => {
105
-                dispatch(raiseHand(true));
107
+                !raisedHand && dispatch(raiseHand(true));
106 108
                 dispatch(hideNotification(uid));
107 109
             }) ],
108 110
             descriptionKey,

Loading…
Cancel
Save