Don't check self number in recipients refresh

This commit is contained in:
AsamK 2023-11-03 20:01:05 +01:00
parent 0014a69528
commit 790b7f1a2f

View file

@ -387,10 +387,12 @@ public class RecipientStore implements RecipientIdCreator, RecipientResolver, Re
WHERE r.number IS NOT NULL
"""
).formatted(TABLE_RECIPIENT);
final var selfNumber = selfAddressProvider.getSelfAddress().number().orElse(null);
try (final var connection = database.getConnection()) {
try (final var statement = connection.prepareStatement(sql)) {
return Utils.executeQueryForStream(statement, resultSet -> resultSet.getString("number"))
.filter(Objects::nonNull)
.filter(n -> !n.equals(selfNumber))
.filter(n -> {
try {
Long.parseLong(n);