diff --git a/lib/src/main/java/org/asamk/signal/manager/storage/recipients/RecipientStore.java b/lib/src/main/java/org/asamk/signal/manager/storage/recipients/RecipientStore.java index 62ab525a..9731496e 100644 --- a/lib/src/main/java/org/asamk/signal/manager/storage/recipients/RecipientStore.java +++ b/lib/src/main/java/org/asamk/signal/manager/storage/recipients/RecipientStore.java @@ -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) {