Ignore invalid ACI/PNI in recipient table

This commit is contained in:
AsamK 2024-02-09 18:34:32 +01:00
parent be699cbd85
commit d486563099

View file

@ -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);