Only apply unsealed sender rate limits to targeted country codes.

This commit is contained in:
Jon Chambers
2021-02-23 11:49:09 -05:00
committed by Jon Chambers
parent a5118e4daa
commit 5354104128
3 changed files with 24 additions and 10 deletions

View File

@@ -7,12 +7,22 @@ package org.whispersystems.textsecuregcm.configuration.dynamic;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Collections;
import java.util.Set;
public class DynamicMessageRateConfiguration {
@JsonProperty
private boolean enforceUnsealedSenderRateLimit = false;
@JsonProperty
private Set<String> rateLimitedCountryCodes = Collections.emptySet();
public boolean isEnforceUnsealedSenderRateLimit() {
return enforceUnsealedSenderRateLimit;
}
public Set<String> getRateLimitedCountryCodes() {
return rateLimitedCountryCodes;
}
}