mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Ignore invalid recipient numbers
This commit is contained in:
parent
ca2e6adedb
commit
733c14bbc8
1 changed files with 8 additions and 0 deletions
|
@ -395,6 +395,14 @@ public class RecipientStore implements RecipientIdCreator, RecipientResolver, Re
|
|||
try (final var statement = connection.prepareStatement(sql)) {
|
||||
return Utils.executeQueryForStream(statement, resultSet -> resultSet.getString("number"))
|
||||
.filter(Objects::nonNull)
|
||||
.filter(n -> {
|
||||
try {
|
||||
Long.parseLong(n);
|
||||
return true;
|
||||
} catch (NumberFormatException e) {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
.collect(Collectors.toSet());
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue