Rate limit unsealed sender by E164

This commit is contained in:
Chris Eager 2021-04-20 10:36:21 -05:00 committed by Chris Eager
parent 52478e7de0
commit b7c56108ca
1 changed files with 1 additions and 0 deletions

View File

@ -174,6 +174,7 @@ public class MessageController {
if (dynamicConfigurationManager.getConfiguration().getMessageRateConfiguration().getRateLimitedCountryCodes().contains(senderCountryCode)) {
try {
rateLimiters.getUnsealedSenderLimiter().validate(source.get().getNumber(), destinationName.toString());
rateLimiters.getUnsealedSenderLimiter().validate(source.get().getUuid().toString(), destinationName.toString());
} catch (RateLimitExceededException e) {
Metrics.counter(REJECT_UNSEALED_SENDER_COUNTER_NAME, SENDER_COUNTRY_TAG_NAME, senderCountryCode).increment();