Procházet zdrojové kódy

fix(lastN): Do not override channelLastN value.

If limitLastN values are specified and channelLastN < limitLastN, configure channelLastN on the conference.
master
Jaya Allamsetty před 4 roky
rodič
revize
fc694641dc
1 změnil soubory, kde provedl 3 přidání a 4 odebrání
  1. 3
    4
      react/features/base/lastn/middleware.js

+ 3
- 4
react/features/base/lastn/middleware.js Zobrazit soubor

68
         return;
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
     const limitedLastN = limitLastN(participantCount, lastNLimits);
74
     const limitedLastN = limitLastN(participantCount, lastNLimits);
76
 
75
 
77
     if (limitedLastN !== undefined) {
76
     if (limitedLastN !== undefined) {
78
-        lastN = limitedLastN;
77
+        lastN = lastN === -1 ? limitedLastN : Math.min(limitedLastN, lastN);
79
     }
78
     }
80
 
79
 
81
     if (typeof appState !== 'undefined' && appState !== 'active') {
80
     if (typeof appState !== 'undefined' && appState !== 'active') {

Načítá se…
Zrušit
Uložit