From 280bdbefdcb9123a9bd7ee0cf7b7b3585a972dfc Mon Sep 17 00:00:00 2001 From: AsamK Date: Sat, 18 Jun 2022 12:27:34 +0200 Subject: [PATCH] Only send profile key update message from the primary device --- .../asamk/signal/manager/helper/IncomingMessageHandler.java | 5 ++++- 1 file changed, 4 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 4940e67c..d18cc0c0 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 @@ -255,7 +255,10 @@ public final class IncomingMessageHandler { } else { // Message wasn't sent as unidentified sender message final var contact = context.getAccount().getContactStore().getContact(sender); - if (contact != null && !contact.isBlocked() && contact.isProfileSharingEnabled()) { + if (account.isPrimaryDevice() + && contact != null + && !contact.isBlocked() + && contact.isProfileSharingEnabled()) { actions.add(UpdateAccountAttributesAction.create()); actions.add(new SendProfileKeyAction(sender)); }