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 1fd0ae4c..36f82481 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 @@ -301,7 +301,13 @@ public class RecipientStore implements RecipientResolver, ContactsStore, Profile public void storeProfileKey(RecipientId recipientId, final ProfileKey profileKey) { synchronized (recipients) { final var recipient = recipients.get(recipientId); - if (profileKey != null && profileKey.equals(recipient.getProfileKey())) { + if (profileKey != null && profileKey.equals(recipient.getProfileKey()) && ( + recipient.getProfile() == null || ( + recipient.getProfile().getUnidentifiedAccessMode() != Profile.UnidentifiedAccessMode.UNKNOWN + && recipient.getProfile().getUnidentifiedAccessMode() + != Profile.UnidentifiedAccessMode.DISABLED + ) + )) { return; }