瀏覽代碼

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

Only dispatch raise hand if hand was not already raised
master
Robert Pintilii 3 年之前
父節點
當前提交
9dba1d30b0
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 3 行新增1 行删除
  1. 3
    1
      react/features/av-moderation/middleware.js

+ 3
- 1
react/features/av-moderation/middleware.js 查看文件

@@ -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…
取消
儲存