Browse Source

Disable status change notifications when join/leave notifications are disabled.

j8
damencho 5 years ago
parent
commit
a425e9c92e
2 changed files with 10 additions and 4 deletions
  1. 6
    2
      interface_config.js
  2. 4
    2
      modules/UI/UI.js

+ 6
- 2
interface_config.js View File

@@ -195,10 +195,14 @@ var interfaceConfig = {
195 195
      */
196 196
     ENABLE_SCREENSHOT_CAPTURE: false,
197 197
 
198
-    // If true, presence status: busy, calling, connected etc. is not displayed
198
+    /**
199
+     * If true, presence status: busy, calling, connected etc. is not displayed.
200
+     */
199 201
     DISABLE_PRESENCE_STATUS: false,
200 202
 
201
-    // If true, notifications regarding joining/leaving are no longer displayed
203
+    /**
204
+     * If true, notifications regarding joining/leaving are no longer displayed.
205
+     */
202 206
     DISABLE_JOIN_LEAVE_NOTIFICATIONS: false,
203 207
 
204 208
     /**

+ 4
- 2
modules/UI/UI.js View File

@@ -16,7 +16,7 @@ import { getLocalParticipant } from '../../react/features/base/participants';
16 16
 import { toggleChat } from '../../react/features/chat';
17 17
 import { setDocumentUrl } from '../../react/features/etherpad';
18 18
 import { setFilmstripVisible } from '../../react/features/filmstrip';
19
-import { setNotificationsEnabled } from '../../react/features/notifications';
19
+import { joinLeaveNotificationsDisabled, setNotificationsEnabled } from '../../react/features/notifications';
20 20
 import {
21 21
     dockToolbox,
22 22
     setToolboxEnabled,
@@ -327,7 +327,9 @@ UI.updateUserStatus = (user, status) => {
327 327
     const reduxState = APP.store.getState() || {};
328 328
     const { calleeInfoVisible } = reduxState['features/invite'] || {};
329 329
 
330
-    if (!status || calleeInfoVisible) {
330
+    // We hide status updates when join/leave notifications are disabled,
331
+    // as jigasi is the component with statuses and they are seen as join/leave notifications.
332
+    if (!status || calleeInfoVisible || joinLeaveNotificationsDisabled()) {
331 333
         return;
332 334
     }
333 335
 

Loading…
Cancel
Save