浏览代码

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,

正在加载...
取消
保存