From 1a81bbecbb1d40ef08ab6b3b1913dfe73c678262 Mon Sep 17 00:00:00 2001 From: AsamK Date: Tue, 28 Sep 2021 21:12:37 +0200 Subject: [PATCH] Do not send message resend request to own device --- .../asamk/signal/manager/helper/IncomingMessageHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 0917a214..45173da4 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 @@ -144,7 +144,8 @@ public final class IncomingMessageHandler { final var sender = account.getRecipientStore().resolveRecipient(e.getSender()); final var senderProfile = profileProvider.getProfile(sender); final var selfProfile = profileProvider.getProfile(account.getSelfRecipientId()); - if (senderProfile != null + if (e.getSenderDevice() != account.getDeviceId() + && senderProfile != null && senderProfile.getCapabilities().contains(Profile.Capability.senderKey) && selfProfile != null && selfProfile.getCapabilities().contains(Profile.Capability.senderKey)) {