Przeglądaj źródła

feat(visitors): Hide reactions.

factor2
Hristo Terezov 1 rok temu
rodzic
commit
a3bb1a3459

+ 3
- 3
react/features/reactions/components/web/RaiseHandContainerButtons.tsx Wyświetl plik

4
 import { IReduxState } from '../../../app/types';
4
 import { IReduxState } from '../../../app/types';
5
 import { isMobileBrowser } from '../../../base/environment/utils';
5
 import { isMobileBrowser } from '../../../base/environment/utils';
6
 import { IProps as AbstractButtonProps } from '../../../base/toolbox/components/AbstractButton';
6
 import { IProps as AbstractButtonProps } from '../../../base/toolbox/components/AbstractButton';
7
-import { isReactionsButtonEnabled, isReactionsEnabled } from '../../functions.web';
7
+import { isReactionsButtonEnabled, shouldDisplayReactionsButtons } from '../../functions.web';
8
 
8
 
9
 import RaiseHandButton from './RaiseHandButton';
9
 import RaiseHandButton from './RaiseHandButton';
10
 import ReactionsMenuButton from './ReactionsMenuButton';
10
 import ReactionsMenuButton from './ReactionsMenuButton';
11
 
11
 
12
 const RaiseHandContainerButton = (props: AbstractButtonProps) => {
12
 const RaiseHandContainerButton = (props: AbstractButtonProps) => {
13
     const reactionsButtonEnabled = useSelector(isReactionsButtonEnabled);
13
     const reactionsButtonEnabled = useSelector(isReactionsButtonEnabled);
14
-    const reactionsEnabled = useSelector(isReactionsEnabled);
14
+    const _shouldDisplayReactionsButtons = useSelector(shouldDisplayReactionsButtons);
15
     const isNarrowLayout = useSelector((state: IReduxState) => state['features/base/responsive-ui'].isNarrowLayout);
15
     const isNarrowLayout = useSelector((state: IReduxState) => state['features/base/responsive-ui'].isNarrowLayout);
16
     const showReactionsAsPartOfRaiseHand
16
     const showReactionsAsPartOfRaiseHand
17
-        = !reactionsButtonEnabled && reactionsEnabled && !isNarrowLayout && !isMobileBrowser();
17
+        = _shouldDisplayReactionsButtons && !reactionsButtonEnabled && !isNarrowLayout && !isMobileBrowser();
18
 
18
 
19
     return showReactionsAsPartOfRaiseHand
19
     return showReactionsAsPartOfRaiseHand
20
         ? <ReactionsMenuButton
20
         ? <ReactionsMenuButton

+ 2
- 9
react/features/reactions/components/web/ReactionsMenuButton.tsx Wyświetl plik

10
 import ToolboxButtonWithPopup from '../../../base/toolbox/components/web/ToolboxButtonWithPopup';
10
 import ToolboxButtonWithPopup from '../../../base/toolbox/components/web/ToolboxButtonWithPopup';
11
 import { toggleReactionsMenuVisibility } from '../../actions.web';
11
 import { toggleReactionsMenuVisibility } from '../../actions.web';
12
 import { IReactionEmojiProps } from '../../constants';
12
 import { IReactionEmojiProps } from '../../constants';
13
-import { getReactionsQueue, isReactionsEnabled } from '../../functions.any';
13
+import { getReactionsQueue } from '../../functions.any';
14
 import { getReactionsMenuVisibility, isReactionsButtonEnabled } from '../../functions.web';
14
 import { getReactionsMenuVisibility, isReactionsButtonEnabled } from '../../functions.web';
15
 import { IReactionsMenuParent } from '../../types';
15
 import { IReactionsMenuParent } from '../../types';
16
 
16
 
30
      */
30
      */
31
     _reactionsButtonEnabled: boolean;
31
     _reactionsButtonEnabled: boolean;
32
 
32
 
33
-    /**
34
-     * Whether or not the reactions are enabled.
35
-     */
36
-    _reactionsEnabled: boolean;
37
-
38
     /**
33
     /**
39
      * The button's key.
34
      * The button's key.
40
      */
35
      */
93
  */
88
  */
94
 function ReactionsMenuButton({
89
 function ReactionsMenuButton({
95
     _reactionsButtonEnabled,
90
     _reactionsButtonEnabled,
96
-    _reactionsEnabled,
97
     _isMobile,
91
     _isMobile,
98
     buttonKey,
92
     buttonKey,
99
     dispatch,
93
     dispatch,
116
         isOpen && toggleReactionsMenu();
110
         isOpen && toggleReactionsMenu();
117
     }, [ isOpen, toggleReactionsMenu ]);
111
     }, [ isOpen, toggleReactionsMenu ]);
118
 
112
 
119
-    if (!showRaiseHand && (!_reactionsButtonEnabled || !_reactionsEnabled)) {
113
+    if (!showRaiseHand && !_reactionsButtonEnabled) {
120
         return null;
114
         return null;
121
     }
115
     }
122
 
116
 
184
 
178
 
185
     return {
179
     return {
186
         _reactionsButtonEnabled: isReactionsButtonEnabled(state),
180
         _reactionsButtonEnabled: isReactionsButtonEnabled(state),
187
-        _reactionsEnabled: isReactionsEnabled(state),
188
         _isMobile: isMobileBrowser(),
181
         _isMobile: isMobileBrowser(),
189
         isOpen: getReactionsMenuVisibility(state),
182
         isOpen: getReactionsMenuVisibility(state),
190
         isNarrow: isNarrowLayout,
183
         isNarrow: isNarrowLayout,

+ 11
- 0
react/features/reactions/functions.any.ts Wyświetl plik

5
 import { getFeatureFlag } from '../base/flags/functions';
5
 import { getFeatureFlag } from '../base/flags/functions';
6
 import { getLocalParticipant } from '../base/participants/functions';
6
 import { getLocalParticipant } from '../base/participants/functions';
7
 import { extractFqnFromPath } from '../dynamic-branding/functions.any';
7
 import { extractFqnFromPath } from '../dynamic-branding/functions.any';
8
+import { iAmVisitor } from '../visitors/functions';
8
 
9
 
9
 import { IReactionEmojiProps, REACTIONS, ReactionThreshold, SOUNDS_THRESHOLDS } from './constants';
10
 import { IReactionEmojiProps, REACTIONS, ReactionThreshold, SOUNDS_THRESHOLDS } from './constants';
10
 import logger from './logger';
11
 import logger from './logger';
161
 
162
 
162
     return !disableReactions;
163
     return !disableReactions;
163
 }
164
 }
165
+
166
+/**
167
+ * Returns true if the reactions buttons should be displayed anywhere on the page and false otherwise.
168
+ *
169
+ * @param {IReduxState} state - The redux state.
170
+ * @returns {boolean}
171
+ */
172
+export function shouldDisplayReactionsButtons(state: IReduxState): boolean {
173
+    return isReactionsEnabled(state) && !iAmVisitor(state);
174
+}

+ 2
- 2
react/features/reactions/functions.web.ts Wyświetl plik

1
 import { IReduxState } from '../app/types';
1
 import { IReduxState } from '../app/types';
2
 import { getToolbarButtons } from '../base/config/functions.web';
2
 import { getToolbarButtons } from '../base/config/functions.web';
3
 
3
 
4
-import { isReactionsEnabled } from './functions.any';
4
+import { shouldDisplayReactionsButtons } from './functions.any';
5
 
5
 
6
 export * from './functions.any';
6
 export * from './functions.any';
7
 
7
 
22
  * @returns {boolean}
22
  * @returns {boolean}
23
  */
23
  */
24
 export function isReactionsButtonEnabled(state: IReduxState) {
24
 export function isReactionsButtonEnabled(state: IReduxState) {
25
-    return Boolean(getToolbarButtons(state).includes('reactions')) && isReactionsEnabled(state);
25
+    return Boolean(getToolbarButtons(state).includes('reactions')) && shouldDisplayReactionsButtons(state);
26
 }
26
 }

+ 1
- 0
react/features/settings/functions.any.ts Wyświetl plik

208
         soundsTalkWhileMuted,
208
         soundsTalkWhileMuted,
209
         soundsReactions
209
         soundsReactions
210
     } = state['features/base/settings'];
210
     } = state['features/base/settings'];
211
+
211
     const enableReactions = isReactionsEnabled(state);
212
     const enableReactions = isReactionsEnabled(state);
212
     const moderatorMutedSoundsReactions = state['features/base/conference'].startReactionsMuted ?? false;
213
     const moderatorMutedSoundsReactions = state['features/base/conference'].startReactionsMuted ?? false;
213
     const enabledNotifications = getNotificationsMap(stateful);
214
     const enabledNotifications = getNotificationsMap(stateful);

+ 15
- 12
react/features/toolbox/components/native/OverflowMenu.tsx Wyświetl plik

12
     from '../../../breakout-rooms/components/native/BreakoutRoomsButton';
12
     from '../../../breakout-rooms/components/native/BreakoutRoomsButton';
13
 import SharedDocumentButton from '../../../etherpad/components/SharedDocumentButton.native';
13
 import SharedDocumentButton from '../../../etherpad/components/SharedDocumentButton.native';
14
 import ReactionMenu from '../../../reactions/components/native/ReactionMenu';
14
 import ReactionMenu from '../../../reactions/components/native/ReactionMenu';
15
-import { isReactionsEnabled } from '../../../reactions/functions.any';
15
+import { shouldDisplayReactionsButtons } from '../../../reactions/functions.any';
16
 import LiveStreamButton from '../../../recording/components/LiveStream/native/LiveStreamButton';
16
 import LiveStreamButton from '../../../recording/components/LiveStream/native/LiveStreamButton';
17
 import RecordButton from '../../../recording/components/Recording/native/RecordButton';
17
 import RecordButton from '../../../recording/components/Recording/native/RecordButton';
18
 import SecurityDialogButton
18
 import SecurityDialogButton
52
      */
52
      */
53
     _isSpeakerStatsDisabled?: boolean;
53
     _isSpeakerStatsDisabled?: boolean;
54
 
54
 
55
-    /**
56
-     * Whether or not the reactions feature is enabled.
57
-     */
58
-    _reactionsEnabled: boolean;
59
-
60
     /**
55
     /**
61
      * Whether the recoding button should be enabled or not.
56
      * Whether the recoding button should be enabled or not.
62
-     */
63
-    _recordingEnabled: boolean;
57
+    */
58
+   _recordingEnabled: boolean;
59
+
60
+   /**
61
+    * Whether or not any reactions buttons should be displayed.
62
+    */
63
+   _shouldDisplayReactionsButtons: boolean;
64
 
64
 
65
     /**
65
     /**
66
      * The width of the screen.
66
      * The width of the screen.
113
         const {
113
         const {
114
             _isBreakoutRoomsSupported,
114
             _isBreakoutRoomsSupported,
115
             _isSpeakerStatsDisabled,
115
             _isSpeakerStatsDisabled,
116
-            _reactionsEnabled,
116
+            _shouldDisplayReactionsButtons,
117
             _width,
117
             _width,
118
             dispatch
118
             dispatch
119
         } = this.props;
119
         } = this.props;
141
 
141
 
142
         return (
142
         return (
143
             <BottomSheet
143
             <BottomSheet
144
-                renderFooter = { _reactionsEnabled && !toolbarButtons.has('raisehand')
144
+                renderFooter = { _shouldDisplayReactionsButtons && !toolbarButtons.has('raisehand')
145
                     ? this._renderReactionMenu
145
                     ? this._renderReactionMenu
146
                     : undefined }>
146
                     : undefined }>
147
                 <OpenCarmodeButton { ...topButtonProps } />
147
                 <OpenCarmodeButton { ...topButtonProps } />
148
                 <AudioOnlyButton { ...buttonProps } />
148
                 <AudioOnlyButton { ...buttonProps } />
149
-                {!_reactionsEnabled && !toolbarButtons.has('raisehand') && <RaiseHandButton { ...buttonProps } />}
149
+                {
150
+                    !_shouldDisplayReactionsButtons && !toolbarButtons.has('raisehand')
151
+                        && <RaiseHandButton { ...buttonProps } />
152
+                }
150
                 {/* @ts-ignore */}
153
                 {/* @ts-ignore */}
151
                 <Divider style = { styles.divider as ViewStyle } />
154
                 <Divider style = { styles.divider as ViewStyle } />
152
                 <SecurityDialogButton { ...buttonProps } />
155
                 <SecurityDialogButton { ...buttonProps } />
206
     return {
209
     return {
207
         _isBreakoutRoomsSupported: conference?.getBreakoutRooms()?.isSupported(),
210
         _isBreakoutRoomsSupported: conference?.getBreakoutRooms()?.isSupported(),
208
         _isSpeakerStatsDisabled: isSpeakerStatsDisabled(state),
211
         _isSpeakerStatsDisabled: isSpeakerStatsDisabled(state),
209
-        _reactionsEnabled: isReactionsEnabled(state),
212
+        _shouldDisplayReactionsButtons: shouldDisplayReactionsButtons(state),
210
         _width: state['features/base/responsive-ui'].clientWidth
213
         _width: state['features/base/responsive-ui'].clientWidth
211
     };
214
     };
212
 }
215
 }

+ 6
- 6
react/features/toolbox/components/native/Toolbox.tsx Wyświetl plik

8
 import Platform from '../../../base/react/Platform.native';
8
 import Platform from '../../../base/react/Platform.native';
9
 import ChatButton from '../../../chat/components/native/ChatButton';
9
 import ChatButton from '../../../chat/components/native/ChatButton';
10
 import ReactionsMenuButton from '../../../reactions/components/native/ReactionsMenuButton';
10
 import ReactionsMenuButton from '../../../reactions/components/native/ReactionsMenuButton';
11
-import { isReactionsEnabled } from '../../../reactions/functions.any';
11
+import { shouldDisplayReactionsButtons } from '../../../reactions/functions.any';
12
 import TileViewButton from '../../../video-layout/components/TileViewButton';
12
 import TileViewButton from '../../../video-layout/components/TileViewButton';
13
 import { iAmVisitor } from '../../../visitors/functions';
13
 import { iAmVisitor } from '../../../visitors/functions';
14
 import { getMovableButtons, isToolboxVisible } from '../../functions.native';
14
 import { getMovableButtons, isToolboxVisible } from '../../functions.native';
38
     _iAmVisitor: boolean;
38
     _iAmVisitor: boolean;
39
 
39
 
40
     /**
40
     /**
41
-     * Whether or not the reactions feature is enabled.
41
+     * Whether or not any reactions buttons should be visible.
42
      */
42
      */
43
-    _reactionsEnabled: boolean;
43
+    _shouldDisplayReactionsButtons: boolean;
44
 
44
 
45
     /**
45
     /**
46
      * The color-schemed stylesheet of the feature.
46
      * The color-schemed stylesheet of the feature.
65
  * @returns {React$Element}.
65
  * @returns {React$Element}.
66
  */
66
  */
67
 function Toolbox(props: IProps) {
67
 function Toolbox(props: IProps) {
68
-    const { _endConferenceSupported, _reactionsEnabled, _styles, _visible, _iAmVisitor, _width } = props;
68
+    const { _endConferenceSupported, _shouldDisplayReactionsButtons, _styles, _visible, _iAmVisitor, _width } = props;
69
 
69
 
70
     if (!_visible) {
70
     if (!_visible) {
71
         return null;
71
         return null;
114
                 }
114
                 }
115
                 {!_iAmVisitor && additionalButtons.has('screensharing')
115
                 {!_iAmVisitor && additionalButtons.has('screensharing')
116
                     && <ScreenSharingButton styles = { buttonStylesBorderless } />}
116
                     && <ScreenSharingButton styles = { buttonStylesBorderless } />}
117
-                {additionalButtons.has('raisehand') && (_reactionsEnabled && !_iAmVisitor
117
+                {additionalButtons.has('raisehand') && (_shouldDisplayReactionsButtons
118
                     ? <ReactionsMenuButton
118
                     ? <ReactionsMenuButton
119
                         styles = { buttonStylesBorderless }
119
                         styles = { buttonStylesBorderless }
120
                         toggledStyles = { backgroundToggledStyle } />
120
                         toggledStyles = { backgroundToggledStyle } />
155
         _visible: isToolboxVisible(state),
155
         _visible: isToolboxVisible(state),
156
         _iAmVisitor: iAmVisitor(state),
156
         _iAmVisitor: iAmVisitor(state),
157
         _width: state['features/base/responsive-ui'].clientWidth,
157
         _width: state['features/base/responsive-ui'].clientWidth,
158
-        _reactionsEnabled: isReactionsEnabled(state)
158
+        _shouldDisplayReactionsButtons: shouldDisplayReactionsButtons(state)
159
     };
159
     };
160
 }
160
 }
161
 
161
 

+ 12
- 12
react/features/toolbox/components/web/Toolbox.tsx Wyświetl plik

16
 import { translate } from '../../../base/i18n/functions';
16
 import { translate } from '../../../base/i18n/functions';
17
 import { isLocalParticipantModerator } from '../../../base/participants/functions';
17
 import { isLocalParticipantModerator } from '../../../base/participants/functions';
18
 import ContextMenu from '../../../base/ui/components/web/ContextMenu';
18
 import ContextMenu from '../../../base/ui/components/web/ContextMenu';
19
-import { isReactionsButtonEnabled, isReactionsEnabled } from '../../../reactions/functions.web';
19
+import { isReactionsButtonEnabled, shouldDisplayReactionsButtons } from '../../../reactions/functions.web';
20
 import { iAmVisitor } from '../../../visitors/functions';
20
 import { iAmVisitor } from '../../../visitors/functions';
21
 import {
21
 import {
22
     setHangupMenuVisible,
22
     setHangupMenuVisible,
116
     _reactionsButtonEnabled: boolean;
116
     _reactionsButtonEnabled: boolean;
117
 
117
 
118
     /**
118
     /**
119
-     * Whether or not reactions feature is enabled.
119
+     * Whether the toolbox should be shifted up or not.
120
      */
120
      */
121
-    _reactionsEnabled: boolean;
121
+    _shiftUp: boolean;
122
 
122
 
123
     /**
123
     /**
124
-     * Whether the toolbox should be shifted up or not.
124
+     * Whether any reactions buttons should be displayed or not.
125
      */
125
      */
126
-    _shiftUp: boolean;
126
+    _shouldDisplayReactionsButtons: boolean;
127
 
127
 
128
     /**
128
     /**
129
      * The enabled buttons.
129
      * The enabled buttons.
185
     _overflowDrawer,
185
     _overflowDrawer,
186
     _overflowMenuVisible,
186
     _overflowMenuVisible,
187
     _reactionsButtonEnabled,
187
     _reactionsButtonEnabled,
188
-    _reactionsEnabled,
189
     _shiftUp,
188
     _shiftUp,
189
+    _shouldDisplayReactionsButtons,
190
     _toolbarButtons,
190
     _toolbarButtons,
191
     _visible,
191
     _visible,
192
     dispatch,
192
     dispatch,
362
 
362
 
363
         const { mainMenuButtons, overflowMenuButtons } = getVisibleButtons();
363
         const { mainMenuButtons, overflowMenuButtons } = getVisibleButtons();
364
         const raiseHandInOverflowMenu = overflowMenuButtons.some(({ key }) => key === 'raisehand');
364
         const raiseHandInOverflowMenu = overflowMenuButtons.some(({ key }) => key === 'raisehand');
365
-        const showReactionsInOverflowMenu
366
-            = (_reactionsEnabled && !_reactionsButtonEnabled
367
-                && (raiseHandInOverflowMenu || _isNarrowLayout || _isMobile))
368
-            || overflowMenuButtons.some(({ key }) => key === 'reactions');
365
+        const showReactionsInOverflowMenu = _shouldDisplayReactionsButtons
366
+            && (
367
+                (!_reactionsButtonEnabled && (raiseHandInOverflowMenu || _isNarrowLayout || _isMobile))
368
+                    || overflowMenuButtons.some(({ key }) => key === 'reactions')
369
+            );
369
         const showRaiseHandInReactionsMenu = showReactionsInOverflowMenu && raiseHandInOverflowMenu;
370
         const showRaiseHandInReactionsMenu = showReactionsInOverflowMenu && raiseHandInOverflowMenu;
370
 
371
 
371
         return (
372
         return (
502
     } = state['features/toolbox'];
503
     } = state['features/toolbox'];
503
     const { clientWidth } = state['features/base/responsive-ui'];
504
     const { clientWidth } = state['features/base/responsive-ui'];
504
     let toolbarButtons = ownProps.toolbarButtons || getToolbarButtons(state);
505
     let toolbarButtons = ownProps.toolbarButtons || getToolbarButtons(state);
505
-    const _reactionsEnabled = isReactionsEnabled(state);
506
 
506
 
507
     if (iAmVisitor(state)) {
507
     if (iAmVisitor(state)) {
508
         toolbarButtons = VISITORS_MODE_BUTTONS.filter(e => toolbarButtons.indexOf(e) > -1);
508
         toolbarButtons = VISITORS_MODE_BUTTONS.filter(e => toolbarButtons.indexOf(e) > -1);
523
         _overflowMenuVisible: overflowMenuVisible,
523
         _overflowMenuVisible: overflowMenuVisible,
524
         _overflowDrawer: overflowDrawer,
524
         _overflowDrawer: overflowDrawer,
525
         _reactionsButtonEnabled: isReactionsButtonEnabled(state),
525
         _reactionsButtonEnabled: isReactionsButtonEnabled(state),
526
-        _reactionsEnabled,
527
         _shiftUp: state['features/toolbox'].shiftUp,
526
         _shiftUp: state['features/toolbox'].shiftUp,
527
+        _shouldDisplayReactionsButtons: shouldDisplayReactionsButtons(state),
528
         _toolbarButtons: toolbarButtons,
528
         _toolbarButtons: toolbarButtons,
529
         _visible: isToolboxVisible(state)
529
         _visible: isToolboxVisible(state)
530
     };
530
     };

+ 6
- 4
react/features/toolbox/hooks.web.ts Wyświetl plik

21
 import { addReactionToBuffer } from '../reactions/actions.any';
21
 import { addReactionToBuffer } from '../reactions/actions.any';
22
 import { toggleReactionsMenuVisibility } from '../reactions/actions.web';
22
 import { toggleReactionsMenuVisibility } from '../reactions/actions.web';
23
 import { REACTIONS } from '../reactions/constants';
23
 import { REACTIONS } from '../reactions/constants';
24
-import { isReactionsEnabled } from '../reactions/functions.any';
24
+import { shouldDisplayReactionsButtons } from '../reactions/functions.any';
25
 import { startScreenShareFlow } from '../screen-share/actions.web';
25
 import { startScreenShareFlow } from '../screen-share/actions.web';
26
 import { isScreenVideoShared } from '../screen-share/functions';
26
 import { isScreenVideoShared } from '../screen-share/functions';
27
 import SpeakerStats from '../speaker-stats/components/web/SpeakerStats';
27
 import SpeakerStats from '../speaker-stats/components/web/SpeakerStats';
36
 export const useKeyboardShortcuts = (toolbarButtons: Array<string>) => {
36
 export const useKeyboardShortcuts = (toolbarButtons: Array<string>) => {
37
     const dispatch = useDispatch();
37
     const dispatch = useDispatch();
38
     const _isSpeakerStatsDisabled = useSelector(isSpeakerStatsDisabled);
38
     const _isSpeakerStatsDisabled = useSelector(isSpeakerStatsDisabled);
39
+    const _shouldDisplayReactionsButtons = useSelector(shouldDisplayReactionsButtons);
39
     const _toolbarButtons = useSelector((state: IReduxState) => toolbarButtons || getToolbarButtons(state));
40
     const _toolbarButtons = useSelector((state: IReduxState) => toolbarButtons || getToolbarButtons(state));
40
     const chatOpen = useSelector((state: IReduxState) => state['features/chat'].isOpen);
41
     const chatOpen = useSelector((state: IReduxState) => state['features/chat'].isOpen);
41
     const desktopSharingButtonDisabled = useSelector(isDesktopShareButtonDisabled);
42
     const desktopSharingButtonDisabled = useSelector(isDesktopShareButtonDisabled);
44
     const gifsEnabled = useSelector(isGifEnabled);
45
     const gifsEnabled = useSelector(isGifEnabled);
45
     const participantsPaneOpen = useSelector(getParticipantsPaneOpen);
46
     const participantsPaneOpen = useSelector(getParticipantsPaneOpen);
46
     const raisedHand = useSelector((state: IReduxState) => hasRaisedHand(getLocalParticipant(state)));
47
     const raisedHand = useSelector((state: IReduxState) => hasRaisedHand(getLocalParticipant(state)));
47
-    const reactionsEnabled = useSelector(isReactionsEnabled);
48
     const screenSharing = useSelector(isScreenVideoShared);
48
     const screenSharing = useSelector(isScreenVideoShared);
49
     const tileViewEnabled = useSelector(shouldDisplayTileView);
49
     const tileViewEnabled = useSelector(shouldDisplayTileView);
50
 
50
 
253
             }
253
             }
254
         });
254
         });
255
 
255
 
256
-        if (reactionsEnabled) {
256
+        // If the buttons for sending reactions are not displayed we should disable the shortcuts too.
257
+        if (_shouldDisplayReactionsButtons) {
257
             const REACTION_SHORTCUTS = Object.keys(REACTIONS).map(key => {
258
             const REACTION_SHORTCUTS = Object.keys(REACTIONS).map(key => {
258
                 const onShortcutSendReaction = () => {
259
                 const onShortcutSendReaction = () => {
259
                     dispatch(addReactionToBuffer(key));
260
                     dispatch(addReactionToBuffer(key));
299
             [ 'A', 'C', 'D', 'P', 'R', 'S', 'W', 'T', 'G' ].forEach(letter =>
300
             [ 'A', 'C', 'D', 'P', 'R', 'S', 'W', 'T', 'G' ].forEach(letter =>
300
                 dispatch(unregisterShortcut(letter)));
301
                 dispatch(unregisterShortcut(letter)));
301
 
302
 
302
-            if (reactionsEnabled) {
303
+            if (_shouldDisplayReactionsButtons) {
303
                 Object.keys(REACTIONS).map(key => REACTIONS[key].shortcutChar)
304
                 Object.keys(REACTIONS).map(key => REACTIONS[key].shortcutChar)
304
                     .forEach(letter =>
305
                     .forEach(letter =>
305
                         dispatch(unregisterShortcut(letter, true)));
306
                         dispatch(unregisterShortcut(letter, true)));
306
             }
307
             }
307
         };
308
         };
308
     }, [
309
     }, [
310
+        _shouldDisplayReactionsButtons,
309
         chatOpen,
311
         chatOpen,
310
         desktopSharingButtonDisabled,
312
         desktopSharingButtonDisabled,
311
         desktopSharingEnabled,
313
         desktopSharingEnabled,

+ 1
- 1
resources/prosody-plugins/mod_measure_message_count.lua Wyświetl plik

158
     local occupant, room = event.occupant, event.room;
158
     local occupant, room = event.occupant, event.room;
159
     local session = event.origin;
159
     local session = event.origin;
160
 
160
 
161
-    if session.jitsi_meet_tenant_mismatch then
161
+    if session and session.jitsi_meet_tenant_mismatch then
162
         room.jitsi_meet_tenant_mismatch = true;
162
         room.jitsi_meet_tenant_mismatch = true;
163
     end
163
     end
164
 end);
164
 end);

Ładowanie…
Anuluj
Zapisz