Support for sticker pack uploads

This commit is contained in:
Moxie Marlinspike
2019-07-03 20:58:38 -07:00
parent 0d46f85ead
commit 10724fee04
13 changed files with 323 additions and 16 deletions

View File

@@ -42,6 +42,7 @@ public class RateLimiters {
private final RateLimiter turnLimiter;
private final RateLimiter profileLimiter;
private final RateLimiter stickerPackLimiter;
public RateLimiters(RateLimitsConfiguration config, ReplicatedJedisPool cacheClient) {
this.smsDestinationLimiter = new RateLimiter(cacheClient, "smsDestination",
@@ -107,6 +108,10 @@ public class RateLimiters {
this.profileLimiter = new RateLimiter(cacheClient, "profile",
config.getProfile().getBucketSize(),
config.getProfile().getLeakRatePerMinute());
this.stickerPackLimiter = new RateLimiter(cacheClient, "stickerPack",
config.getStickerPack().getBucketSize(),
config.getStickerPack().getLeakRatePerMinute());
}
public RateLimiter getAllocateDeviceLimiter() {
@@ -173,4 +178,8 @@ public class RateLimiters {
return profileLimiter;
}
public RateLimiter getStickerPackLimiter() {
return stickerPackLimiter;
}
}