From ed4b1e8f02a9e77079f57e03a6f9ca881761d886 Mon Sep 17 00:00:00 2001 From: AsamK Date: Sat, 10 Feb 2024 12:24:13 +0100 Subject: [PATCH] Improve sql query --- .../signal/manager/storage/recipients/RecipientStore.java | 5 ++--- 1 file changed, 2 insertions(+), 3 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 9a0b5d00..5bd972ab 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 @@ -891,13 +891,12 @@ public class RecipientStore implements RecipientIdCreator, RecipientResolver, Re final var sql = ( """ UPDATE %s - SET unregistered_timestamp = ? + SET unregistered_timestamp = NULL WHERE _id = ? """ ).formatted(TABLE_RECIPIENT); try (final var statement = connection.prepareStatement(sql)) { - statement.setNull(1, Types.INTEGER); - statement.setLong(2, recipientId.id()); + statement.setLong(1, recipientId.id()); statement.executeUpdate(); } }