Do not send message resend request to own device

This commit is contained in:
AsamK 2021-09-28 21:12:37 +02:00
parent 7c9fd9d0fb
commit 1a81bbecbb

View file

@ -144,7 +144,8 @@ public final class IncomingMessageHandler {
final var sender = account.getRecipientStore().resolveRecipient(e.getSender()); final var sender = account.getRecipientStore().resolveRecipient(e.getSender());
final var senderProfile = profileProvider.getProfile(sender); final var senderProfile = profileProvider.getProfile(sender);
final var selfProfile = profileProvider.getProfile(account.getSelfRecipientId()); final var selfProfile = profileProvider.getProfile(account.getSelfRecipientId());
if (senderProfile != null if (e.getSenderDevice() != account.getDeviceId()
&& senderProfile != null
&& senderProfile.getCapabilities().contains(Profile.Capability.senderKey) && senderProfile.getCapabilities().contains(Profile.Capability.senderKey)
&& selfProfile != null && selfProfile != null
&& selfProfile.getCapabilities().contains(Profile.Capability.senderKey)) { && selfProfile.getCapabilities().contains(Profile.Capability.senderKey)) {