Przeglądaj źródła

fix(lastN): Do not override channelLastN value.

If limitLastN values are specified and channelLastN < limitLastN, configure channelLastN on the conference.
master
Jaya Allamsetty 4 lat temu
rodzic
commit
fc694641dc
1 zmienionych plików z 3 dodań i 4 usunięć
  1. 3
    4
      react/features/base/lastn/middleware.js

+ 3
- 4
react/features/base/lastn/middleware.js Wyświetl plik

@@ -68,14 +68,13 @@ function _updateLastN({ getState }) {
68 68
         return;
69 69
     }
70 70
 
71
-    const defaultLastN = typeof config.channelLastN === 'undefined' ? -1 : config.channelLastN;
72
-    let lastN = defaultLastN;
71
+    let lastN = typeof config.channelLastN === 'undefined' ? -1 : config.channelLastN;
73 72
 
74
-    // Apply last N limit based on the # of participants
73
+    // Apply last N limit based on the # of participants and channelLastN settings.
75 74
     const limitedLastN = limitLastN(participantCount, lastNLimits);
76 75
 
77 76
     if (limitedLastN !== undefined) {
78
-        lastN = limitedLastN;
77
+        lastN = lastN === -1 ? limitedLastN : Math.min(limitedLastN, lastN);
79 78
     }
80 79
 
81 80
     if (typeof appState !== 'undefined' && appState !== 'active') {

Ładowanie…
Anuluj
Zapisz