From 790b7f1a2f4a0c0f76718c722da46474e50a5d8c Mon Sep 17 00:00:00 2001 From: AsamK Date: Fri, 3 Nov 2023 20:01:05 +0100 Subject: [PATCH] Don't check self number in recipients refresh --- .../asamk/signal/manager/storage/recipients/RecipientStore.java | 2 ++ 1 file changed, 2 insertions(+) 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 87e5f3d2..e87dd6bb 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 @@ -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);