|
@@ -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') {
|