fix: レートリミットのfactorが二回適用されて二乗の効果がある問題を修正

This commit is contained in:
anatawa12 2024-06-22 13:40:23 +09:00
parent e77bcf5ff7
commit d8941558c3
No known key found for this signature in database
GPG key ID: 9CA909848B8E4EA6
2 changed files with 2 additions and 1 deletions

View file

@ -77,7 +77,7 @@ export class RateLimiterService {
if (limitation.duration != null && limitation.max != null) {
const info = await this.checkLimiter({
id: `${actor}:${limitation.key}`,
duration: limitation.duration * factor,
duration: limitation.duration,
max: limitation.max / factor,
db: this.redisClient,
});