瀏覽代碼

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

Loading…
取消
儲存