Fix up MX numbers for SMS delivery

// FREEBIE
This commit is contained in:
Moxie Marlinspike 2015-11-09 17:18:59 -08:00
parent aac3fc68fc
commit faa0630851
1 changed files with 5 additions and 0 deletions

View File

@ -47,6 +47,11 @@ public class SmsSender {
public void deliverSmsVerification(String destination, String verificationCode)
throws IOException
{
// Fix up mexico numbers to 'mobile' format just for SMS delivery.
if (destination.startsWith("+42") && !destination.startsWith("+421")) {
destination = "+421" + destination.substring(3);
}
if (!isTwilioDestination(destination) && nexmoSender.isPresent()) {
nexmoSender.get().deliverSmsVerification(destination, verificationCode);
} else {