From d4865630990600e03c3e34ac96bd2d330269acd5 Mon Sep 17 00:00:00 2001 From: AsamK Date: Fri, 9 Feb 2024 18:34:32 +0100 Subject: [PATCH] Ignore invalid ACI/PNI in recipient table --- .../signal/manager/storage/recipients/RecipientStore.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 4ddab217..9a0b5d00 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 @@ -1367,8 +1367,8 @@ public class RecipientStore implements RecipientIdCreator, RecipientResolver, Re } private RecipientAddress getRecipientAddressFromResultSet(ResultSet resultSet) throws SQLException { - final var aci = Optional.ofNullable(resultSet.getString("aci")).map(ACI::parseOrThrow); - final var pni = Optional.ofNullable(resultSet.getString("pni")).map(PNI::parseOrThrow); + final var aci = Optional.ofNullable(resultSet.getString("aci")).map(ACI::parseOrNull); + final var pni = Optional.ofNullable(resultSet.getString("pni")).map(PNI::parseOrNull); final var number = Optional.ofNullable(resultSet.getString("number")); final var username = Optional.ofNullable(resultSet.getString("username")); return new RecipientAddress(aci, pni, number, username);