mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 22:48:03 +01:00
Add a reactive method for checking rate limits by UUID
This commit is contained in:
committed by
Jon Chambers
parent
42141e51a1
commit
6cf4241283
@@ -58,6 +58,10 @@ public interface RateLimiter {
|
||||
return Mono.fromFuture(validateAsync(key).toCompletableFuture());
|
||||
}
|
||||
|
||||
default Mono<Void> validateReactive(final UUID accountUuid) {
|
||||
return validateReactive(accountUuid.toString());
|
||||
}
|
||||
|
||||
default boolean hasAvailablePermits(final UUID accountUuid, final int permits) {
|
||||
return hasAvailablePermits(accountUuid.toString(), permits);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user