mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-19 20:48:27 +00:00
Switch regexp matcher to find() in order to handle alpha addresses
Any address with an alpha character anywhere in it should be used as-is. Fixes #6849 // FREEBIE
This commit is contained in:
parent
dc61c67856
commit
9a78615991
@ -206,7 +206,7 @@ public class Address implements Parcelable, Comparable<Address> {
|
||||
public String format(@Nullable String number) {
|
||||
if (number == null) return "Unknown";
|
||||
if (number.startsWith("__textsecure_group__!")) return number;
|
||||
if (ALPHA_PATTERN.matcher(number).matches()) return number.trim();
|
||||
if (ALPHA_PATTERN.matcher(number).find()) return number.trim();
|
||||
|
||||
String bareNumber = number.replaceAll("[^0-9+]", "");
|
||||
|
||||
|
@ -1319,7 +1319,7 @@ public class DatabaseFactory {
|
||||
public String migrate(@Nullable String number) {
|
||||
if (number == null) return "Unknown";
|
||||
if (number.startsWith("__textsecure_group__!")) return number;
|
||||
if (ALPHA_PATTERN.matcher(number).matches()) return number;
|
||||
if (ALPHA_PATTERN.matcher(number).find()) return number.trim();
|
||||
|
||||
String bareNumber = number.replaceAll("[^0-9+]", "");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user