mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 12:56:53 +00:00
Add excluded E164s configuration to pre-registration experiment
This commit is contained in:
1 parent
df9c0051c9
commit
51b7a8d868
4 files changed
+50
-22
No files matched your search
+11
-3
@@ -20,12 +20,16 @@ public class DynamicPreRegistrationExperimentEnrollmentConfiguration {
|
||||
|
||||
@JsonProperty
|
||||
@Valid
|
||||
private Set<String> excludedCountryCodes = Collections.emptySet();
|
||||
private Set<String> excludedE164s = Collections.emptySet();
|
||||
|
||||
@JsonProperty
|
||||
@Valid
|
||||
private Set<String> includedCountryCodes = Collections.emptySet();
|
||||
|
||||
@JsonProperty
|
||||
@Valid
|
||||
private Set<String> excludedCountryCodes = Collections.emptySet();
|
||||
|
||||
@JsonProperty
|
||||
@Valid
|
||||
@Min(0)
|
||||
@@ -36,14 +40,18 @@ public class DynamicPreRegistrationExperimentEnrollmentConfiguration {
|
||||
return enrolledE164s;
|
||||
}
|
||||
|
||||
public Set<String> getExcludedCountryCodes() {
|
||||
return excludedCountryCodes;
|
||||
public Set<String> getExcludedE164s() {
|
||||
return excludedE164s;
|
||||
}
|
||||
|
||||
public Set<String> getIncludedCountryCodes() {
|
||||
return includedCountryCodes;
|
||||
}
|
||||
|
||||
public Set<String> getExcludedCountryCodes() {
|
||||
return excludedCountryCodes;
|
||||
}
|
||||
|
||||
public int getEnrollmentPercentage() {
|
||||
return enrollmentPercentage;
|
||||
}
|
||||
|
||||
+4
@@ -47,6 +47,10 @@ public class ExperimentEnrollmentManager {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (config.getExcludedE164s().contains(e164)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
{
|
||||
final String countryCode = Util.getCountryCode(e164);
|
||||
|
||||
|
||||
Reference in new issue
Block a user