File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -28,11 +28,19 @@ async function handleDailyLeaderboardResults(
2828 users : { inbox : inboxConfig } ,
2929 } = await getCachedConfiguration ( false ) ;
3030
31+ const { maxResults, xpRewardBrackets, topResultsToAnnounce } =
32+ dailyLeaderboardsConfig ;
33+
34+ const maxRankToGet = Math . max (
35+ topResultsToAnnounce ,
36+ ...xpRewardBrackets . map ( ( bracket ) => bracket . maxRank )
37+ ) ;
38+
3139 const dailyLeaderboard = new DailyLeaderboard ( modeRule , yesterdayTimestamp ) ;
3240
3341 const results = await dailyLeaderboard . getResults (
3442 0 ,
35- - 1 ,
43+ maxRankToGet ,
3644 dailyLeaderboardsConfig ,
3745 false
3846 ) ;
@@ -41,8 +49,6 @@ async function handleDailyLeaderboardResults(
4149 return ;
4250 }
4351
44- const { maxResults, xpRewardBrackets } = dailyLeaderboardsConfig ;
45-
4652 if ( inboxConfig . enabled && xpRewardBrackets . length > 0 ) {
4753 const mailEntries : {
4854 uid : string ;
You can’t perform that action at this time.
0 commit comments