mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-04-30 03:22:04 -04:00
Update query for oldest entry in IsRateLimited to First as this seems to make more sense when it's using an ascending order? The behavior isn't right regardless right now
This commit is contained in:
@@ -46,7 +46,7 @@ public static class RateLimitService
|
||||
if (entries.Count >= command.RateLimitOptions.MaxInvocations)
|
||||
{
|
||||
result.IsRateLimited = true;
|
||||
result.OldestEntryExpires = entries.OrderBy(x => x.EntryCreated).Last().EntryExpires;
|
||||
result.OldestEntryExpires = entries.OrderBy(x => x.EntryCreated).First().EntryExpires;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user