Revert "Turn off alphanumeric sender ID for all countries."

This reverts commit 3bf0188e7f.
This commit is contained in:
Jon Chambers 2021-01-08 11:21:19 -05:00 committed by Jon Chambers
parent a6fd1aa06c
commit e50a1c0646
2 changed files with 2 additions and 10 deletions

View File

@ -37,12 +37,11 @@ class SenderIdSupplier {
}
Optional<String> get(@NotNull String destination) {
/* final String countryCode = Util.getCountryCode(destination);
final String countryCode = Util.getCountryCode(destination);
if (countryCodesWithoutSenderId.contains(countryCode)) {
return Optional.empty();
}
return Optional.ofNullable(StringUtils.stripToNull(countrySpecificSenderIds.getOrDefault(countryCode, defaultSenderId))); */
return Optional.empty();
return Optional.ofNullable(StringUtils.stripToNull(countrySpecificSenderIds.getOrDefault(countryCode, defaultSenderId)));
}
}

View File

@ -6,7 +6,6 @@
package org.whispersystems.textsecuregcm.tests.sms;
import com.github.tomakehurst.wiremock.junit.WireMockRule;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.whispersystems.textsecuregcm.configuration.TwilioConfiguration;
@ -215,7 +214,6 @@ public class TwilioSmsSenderTest {
.withRequestBody(equalTo(expectedRequestBody)));
}
@Ignore
@Test
public void testSendAlphaIdByCountryCode() {
runSenderIdTest("+85278675309", "SIGNAL", () -> {
@ -228,7 +226,6 @@ public class TwilioSmsSenderTest {
});
}
@Ignore
@Test
public void testDefaultSenderId() {
runSenderIdTest("+14098675309", "SIGNALFOO", () -> {
@ -238,7 +235,6 @@ public class TwilioSmsSenderTest {
});
}
@Ignore
@Test
public void testDefaultSenderIdWithDisabledCountry() {
final Supplier<TwilioSenderIdConfiguration> senderIdConfigurationSupplier = () -> {
@ -251,7 +247,6 @@ public class TwilioSmsSenderTest {
runSenderIdTest("+447911123456", "SIGNALBAR", senderIdConfigurationSupplier);
}
@Ignore
@Test
public void testDefaultSenderIdWithOverriddenCountry() {
final Supplier<TwilioSenderIdConfiguration> senderIdConfigurationSupplier = () -> {
@ -267,7 +262,6 @@ public class TwilioSmsSenderTest {
runSenderIdTest("+6433456789", "JUSTREADTHEINSTRUCTIONS", senderIdConfigurationSupplier);
}
@Ignore
@Test
public void testSenderIdWithAllFieldsPopulated() {
final Supplier<TwilioSenderIdConfiguration> senderIdConfigurationSupplier = () -> {
@ -310,7 +304,6 @@ public class TwilioSmsSenderTest {
.withRequestBody(equalTo("MessagingServiceSid=test_messaging_services_id&To=%2B14153333333&Body=%3C%23%3E+Verify+on+AndroidNg%3A+123-456%0A%0Acharacters")));
}
@Ignore
@Test
public void testRetrySmsOnUnreachableErrorCodeSkipsSenderIdSecondTime() {
wireMockRule.stubFor(post(urlEqualTo("/2010-04-01/Accounts/" + ACCOUNT_ID + "/Messages.json"))