From 299dd86c77b6312a994d01f1844510d779ba884e Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Mon, 16 Feb 2015 18:09:14 -0800 Subject: [PATCH] Support matching to account for telcos inserting SMS prefixes. // FREEBIE Fixes #1944 --- src/org/thoughtcrime/securesms/service/SmsListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/thoughtcrime/securesms/service/SmsListener.java b/src/org/thoughtcrime/securesms/service/SmsListener.java index e706e85ab2..fab3d2d107 100644 --- a/src/org/thoughtcrime/securesms/service/SmsListener.java +++ b/src/org/thoughtcrime/securesms/service/SmsListener.java @@ -128,7 +128,7 @@ public class SmsListener extends BroadcastReceiver { if (messageBody == null) return false; - if (messageBody.matches("Your TextSecure verification code: [0-9]{3,4}-[0-9]{3,4}") && + if (messageBody.matches(".*Your TextSecure verification code: [0-9]{3,4}-[0-9]{3,4}") && TextSecurePreferences.isVerifying(context)) { return true;