From: AsamK Date: Sun, 2 Jan 2022 20:19:37 +0000 (+0100) Subject: Add verbose logging for decryption errors of incoming messages X-Git-Tag: v0.10.1~11 X-Git-Url: https://git.nmode.ca/signal-cli/commitdiff_plain/5d83e149b3ed61683da20bba6703a37db66f93cf?ds=inline Add verbose logging for decryption errors of incoming messages --- diff --git a/lib/src/main/java/org/asamk/signal/manager/helper/IncomingMessageHandler.java b/lib/src/main/java/org/asamk/signal/manager/helper/IncomingMessageHandler.java index 67e45516..d5ada09e 100644 --- a/lib/src/main/java/org/asamk/signal/manager/helper/IncomingMessageHandler.java +++ b/lib/src/main/java/org/asamk/signal/manager/helper/IncomingMessageHandler.java @@ -119,6 +119,7 @@ public final class IncomingMessageHandler { exception = new UntrustedIdentityException(account.getRecipientStore() .resolveRecipientAddress(recipientId), e.getSenderDevice()); } catch (ProtocolInvalidKeyIdException | ProtocolInvalidKeyException | ProtocolNoSessionException | ProtocolInvalidMessageException e) { + logger.debug("Failed to decrypt incoming message", e); final var sender = account.getRecipientStore().resolveRecipient(e.getSender()); final var senderProfile = context.getProfileHelper().getRecipientProfile(sender); final var selfProfile = context.getProfileHelper().getRecipientProfile(account.getSelfRecipientId()); @@ -138,6 +139,7 @@ public final class IncomingMessageHandler { logger.debug("Dropping unidentified message from self."); return new Pair<>(List.of(), null); } catch (Exception e) { + logger.debug("Failed to handle incoming message", e); exception = e; } }