mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
Let's take this SMS number cleaning thing to its logical extreme
Fixes #4833 // FREEBIE
This commit is contained in:
parent
e32736359b
commit
bde838d35a
@ -95,7 +95,9 @@ public class SmsSendJob extends SendJob {
|
|||||||
// stripSeparator() to rigid? what will people try to send here? - see discussion on #3099
|
// stripSeparator() to rigid? what will people try to send here? - see discussion on #3099
|
||||||
//recipient = PhoneNumberUtils.stripSeparators(recipient);
|
//recipient = PhoneNumberUtils.stripSeparators(recipient);
|
||||||
// minimum required to fix the issue - brackets are no dialable chars...
|
// minimum required to fix the issue - brackets are no dialable chars...
|
||||||
recipient = recipient.replaceAll("[\\(\\)\\s]", "");
|
if (!NumberUtil.isValidEmail(recipient)) {
|
||||||
|
recipient = recipient.replaceAll("[^0-9+]", "");
|
||||||
|
}
|
||||||
|
|
||||||
// NOTE 11/04/14 -- There's apparently a bug where for some unknown recipients
|
// NOTE 11/04/14 -- There's apparently a bug where for some unknown recipients
|
||||||
// and messages, this will throw an NPE. We have no idea why, so we're just
|
// and messages, this will throw an NPE. We have no idea why, so we're just
|
||||||
|
Loading…
x
Reference in New Issue
Block a user