Revert "Turn off alphanumeric sender ID for all countries."
This reverts commit 3bf0188e7f.
			
			
This commit is contained in:
		
							parent
							
								
									a6fd1aa06c
								
							
						
					
					
						commit
						e50a1c0646
					
				| 
						 | 
					@ -37,12 +37,11 @@ class SenderIdSupplier {
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  Optional<String> get(@NotNull String destination) {
 | 
					  Optional<String> get(@NotNull String destination) {
 | 
				
			||||||
    /* final String countryCode = Util.getCountryCode(destination);
 | 
					    final String countryCode = Util.getCountryCode(destination);
 | 
				
			||||||
    if (countryCodesWithoutSenderId.contains(countryCode)) {
 | 
					    if (countryCodesWithoutSenderId.contains(countryCode)) {
 | 
				
			||||||
      return Optional.empty();
 | 
					      return Optional.empty();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return Optional.ofNullable(StringUtils.stripToNull(countrySpecificSenderIds.getOrDefault(countryCode, defaultSenderId))); */
 | 
					    return Optional.ofNullable(StringUtils.stripToNull(countrySpecificSenderIds.getOrDefault(countryCode, defaultSenderId)));
 | 
				
			||||||
    return Optional.empty();
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,6 @@
 | 
				
			||||||
package org.whispersystems.textsecuregcm.tests.sms;
 | 
					package org.whispersystems.textsecuregcm.tests.sms;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.github.tomakehurst.wiremock.junit.WireMockRule;
 | 
					import com.github.tomakehurst.wiremock.junit.WireMockRule;
 | 
				
			||||||
import org.junit.Ignore;
 | 
					 | 
				
			||||||
import org.junit.Rule;
 | 
					import org.junit.Rule;
 | 
				
			||||||
import org.junit.Test;
 | 
					import org.junit.Test;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.configuration.TwilioConfiguration;
 | 
					import org.whispersystems.textsecuregcm.configuration.TwilioConfiguration;
 | 
				
			||||||
| 
						 | 
					@ -215,7 +214,6 @@ public class TwilioSmsSenderTest {
 | 
				
			||||||
            .withRequestBody(equalTo(expectedRequestBody)));
 | 
					            .withRequestBody(equalTo(expectedRequestBody)));
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @Ignore
 | 
					 | 
				
			||||||
  @Test
 | 
					  @Test
 | 
				
			||||||
  public void testSendAlphaIdByCountryCode() {
 | 
					  public void testSendAlphaIdByCountryCode() {
 | 
				
			||||||
    runSenderIdTest("+85278675309", "SIGNAL", () -> {
 | 
					    runSenderIdTest("+85278675309", "SIGNAL", () -> {
 | 
				
			||||||
| 
						 | 
					@ -228,7 +226,6 @@ public class TwilioSmsSenderTest {
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @Ignore
 | 
					 | 
				
			||||||
  @Test
 | 
					  @Test
 | 
				
			||||||
  public void testDefaultSenderId() {
 | 
					  public void testDefaultSenderId() {
 | 
				
			||||||
    runSenderIdTest("+14098675309", "SIGNALFOO", () -> {
 | 
					    runSenderIdTest("+14098675309", "SIGNALFOO", () -> {
 | 
				
			||||||
| 
						 | 
					@ -238,7 +235,6 @@ public class TwilioSmsSenderTest {
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @Ignore
 | 
					 | 
				
			||||||
  @Test
 | 
					  @Test
 | 
				
			||||||
  public void testDefaultSenderIdWithDisabledCountry() {
 | 
					  public void testDefaultSenderIdWithDisabledCountry() {
 | 
				
			||||||
    final Supplier<TwilioSenderIdConfiguration> senderIdConfigurationSupplier = () -> {
 | 
					    final Supplier<TwilioSenderIdConfiguration> senderIdConfigurationSupplier = () -> {
 | 
				
			||||||
| 
						 | 
					@ -251,7 +247,6 @@ public class TwilioSmsSenderTest {
 | 
				
			||||||
    runSenderIdTest("+447911123456", "SIGNALBAR", senderIdConfigurationSupplier);
 | 
					    runSenderIdTest("+447911123456", "SIGNALBAR", senderIdConfigurationSupplier);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @Ignore
 | 
					 | 
				
			||||||
  @Test
 | 
					  @Test
 | 
				
			||||||
  public void testDefaultSenderIdWithOverriddenCountry() {
 | 
					  public void testDefaultSenderIdWithOverriddenCountry() {
 | 
				
			||||||
    final Supplier<TwilioSenderIdConfiguration> senderIdConfigurationSupplier = () -> {
 | 
					    final Supplier<TwilioSenderIdConfiguration> senderIdConfigurationSupplier = () -> {
 | 
				
			||||||
| 
						 | 
					@ -267,7 +262,6 @@ public class TwilioSmsSenderTest {
 | 
				
			||||||
    runSenderIdTest("+6433456789", "JUSTREADTHEINSTRUCTIONS", senderIdConfigurationSupplier);
 | 
					    runSenderIdTest("+6433456789", "JUSTREADTHEINSTRUCTIONS", senderIdConfigurationSupplier);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @Ignore
 | 
					 | 
				
			||||||
  @Test
 | 
					  @Test
 | 
				
			||||||
  public void testSenderIdWithAllFieldsPopulated() {
 | 
					  public void testSenderIdWithAllFieldsPopulated() {
 | 
				
			||||||
    final Supplier<TwilioSenderIdConfiguration> senderIdConfigurationSupplier = () -> {
 | 
					    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")));
 | 
					            .withRequestBody(equalTo("MessagingServiceSid=test_messaging_services_id&To=%2B14153333333&Body=%3C%23%3E+Verify+on+AndroidNg%3A+123-456%0A%0Acharacters")));
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  @Ignore
 | 
					 | 
				
			||||||
  @Test
 | 
					  @Test
 | 
				
			||||||
  public void testRetrySmsOnUnreachableErrorCodeSkipsSenderIdSecondTime() {
 | 
					  public void testRetrySmsOnUnreachableErrorCodeSkipsSenderIdSecondTime() {
 | 
				
			||||||
    wireMockRule.stubFor(post(urlEqualTo("/2010-04-01/Accounts/" + ACCOUNT_ID + "/Messages.json"))
 | 
					    wireMockRule.stubFor(post(urlEqualTo("/2010-04-01/Accounts/" + ACCOUNT_ID + "/Messages.json"))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue