diff --git a/src/org/thoughtcrime/securesms/service/QuickResponseService.java b/src/org/thoughtcrime/securesms/service/QuickResponseService.java index aeda4dcbde..a98b6fe18c 100644 --- a/src/org/thoughtcrime/securesms/service/QuickResponseService.java +++ b/src/org/thoughtcrime/securesms/service/QuickResponseService.java @@ -19,6 +19,7 @@ import org.thoughtcrime.securesms.sms.OutgoingTextMessage; import org.thoughtcrime.securesms.util.Rfc5724Uri; import java.net.URISyntaxException; +import java.net.URLDecoder; public class QuickResponseService extends MasterSecretIntentService { @@ -44,7 +45,11 @@ public class QuickResponseService extends MasterSecretIntentService { try { Rfc5724Uri uri = new Rfc5724Uri(intent.getDataString()); String content = intent.getStringExtra(Intent.EXTRA_TEXT); - Recipients recipients = RecipientFactory.getRecipientsFromString(this, uri.getPath(), false); + String numbers = uri.getPath(); + if(numbers.contains("%")){ + numbers = URLDecoder.decode(numbers); + } + Recipients recipients = RecipientFactory.getRecipientsFromString(this, numbers, false); if (!TextUtils.isEmpty(content)) { if (recipients.isSingleRecipient()) { diff --git a/test/androidTest/java/org/thoughtcrime/securesms/util/Rfc5724UriTest.java b/test/androidTest/java/org/thoughtcrime/securesms/util/Rfc5724UriTest.java index 73452b4e92..095dcf3e19 100644 --- a/test/androidTest/java/org/thoughtcrime/securesms/util/Rfc5724UriTest.java +++ b/test/androidTest/java/org/thoughtcrime/securesms/util/Rfc5724UriTest.java @@ -65,6 +65,7 @@ public class Rfc5724UriTest extends TextSecureTestCase { public void testGetPath() throws Exception { final String[][] uriTestPairs = { {"sms:+15555555555", "+15555555555"}, + {"sms:%2B49555555555", "%2B555555555"}, {"smsto:+15555555555?", "+15555555555"}, {"mms:+15555555555?a=b", "+15555555555"}, {"mmsto:+15555555555?a=b&c=d", "+15555555555"},