mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-21 01:01:15 +01:00
Add configuration by country for sending from alpha IDs
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package org.whispersystems.textsecuregcm.configuration;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
public class TwilioAlphaIdConfiguration {
|
||||
@NotEmpty
|
||||
private String prefix;
|
||||
|
||||
@NotEmpty
|
||||
private String value;
|
||||
|
||||
public String getPrefix() {
|
||||
return prefix;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public void setPrefix(String prefix) {
|
||||
this.prefix = prefix;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
@@ -18,9 +18,9 @@ package org.whispersystems.textsecuregcm.configuration;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
@@ -53,6 +53,10 @@ public class TwilioConfiguration {
|
||||
@Valid
|
||||
private RetryConfiguration retry = new RetryConfiguration();
|
||||
|
||||
@NotNull
|
||||
@Valid
|
||||
private List<TwilioAlphaIdConfiguration> alphaId;
|
||||
|
||||
public String getAccountId() {
|
||||
return accountId;
|
||||
}
|
||||
@@ -115,4 +119,13 @@ public class TwilioConfiguration {
|
||||
public void setRetry(RetryConfiguration retry) {
|
||||
this.retry = retry;
|
||||
}
|
||||
|
||||
public List<TwilioAlphaIdConfiguration> getAlphaId() {
|
||||
return alphaId;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public void setAlphaId(List<TwilioAlphaIdConfiguration> alphaId) {
|
||||
this.alphaId = alphaId;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user