mirror of
https://github.com/oxen-io/session-android.git
synced 2025-06-09 19:48:33 +00:00
Fix number formatting issue.
This commit is contained in:
parent
37f3b1f1ba
commit
bc6b7d15f1
@ -379,7 +379,7 @@ public class DirectoryHelper {
|
||||
private static Set<String> sanitizeNumbers(@NonNull Set<String> numbers) {
|
||||
return Stream.of(numbers).filter(number -> {
|
||||
try {
|
||||
return number.startsWith("+") && number.length() > 1 && Long.parseLong(number.substring(1)) > 0;
|
||||
return number.startsWith("+") && number.length() > 1 && number.charAt(1) != '0' && Long.parseLong(number.substring(1)) > 0;
|
||||
} catch (NumberFormatException e) {
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user