From 361d7ffd42366fe2accf6c98335e0fab55a9cdb3 Mon Sep 17 00:00:00 2001 From: SessionHero01 <180888785+SessionHero01@users.noreply.github.com> Date: Mon, 10 Nov 2025 14:12:43 +1100 Subject: [PATCH 1/2] Fix contacts being created incorrectly on group threads --- .../messaging/sending_receiving/VisibleMessageHandler.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/session/libsession/messaging/sending_receiving/VisibleMessageHandler.kt b/app/src/main/java/org/session/libsession/messaging/sending_receiving/VisibleMessageHandler.kt index 06f9213bf0..a5e1332f5e 100644 --- a/app/src/main/java/org/session/libsession/messaging/sending_receiving/VisibleMessageHandler.kt +++ b/app/src/main/java/org/session/libsession/messaging/sending_receiving/VisibleMessageHandler.kt @@ -172,8 +172,11 @@ class VisibleMessageHandler @Inject constructor( runThreadUpdate = runThreadUpdate ) ?: return null - // If we have previously "hidden" the sender, we should flip the flag back to visible - if (senderAddress is Address.Standard && senderAddress.address != ctx.currentUserPublicKey) { + // If we have previously "hidden" the sender, we should flip the flag back to visible, + // and this should only be done only for 1:1 messages + if (senderAddress is Address.Standard && + senderAddress.address != ctx.currentUserPublicKey && + threadAddress is Address.Standard) { val existingContact = configFactory.withUserConfigs { it.contacts.get(senderAddress.accountId.hexString) } From a872dade816d462473fb96b50225a6e6d2316928 Mon Sep 17 00:00:00 2001 From: SessionHero01 <180888785+SessionHero01@users.noreply.github.com> Date: Mon, 10 Nov 2025 14:12:51 +1100 Subject: [PATCH 2/2] Fix contacts being created incorrectly on group threads (for legacy receiver) --- .../messaging/sending_receiving/ReceivedMessageHandler.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/session/libsession/messaging/sending_receiving/ReceivedMessageHandler.kt b/app/src/main/java/org/session/libsession/messaging/sending_receiving/ReceivedMessageHandler.kt index bf891abf98..624693ca98 100644 --- a/app/src/main/java/org/session/libsession/messaging/sending_receiving/ReceivedMessageHandler.kt +++ b/app/src/main/java/org/session/libsession/messaging/sending_receiving/ReceivedMessageHandler.kt @@ -414,8 +414,10 @@ class ReceivedMessageHandler @Inject constructor( runThreadUpdate = runThreadUpdate ) ?: return null - // If we have previously "hidden" the sender, we should flip the flag back to visible - if (senderAddress is Address.Standard && senderAddress.address != userPublicKey) { + // If we have previously "hidden" the sender, we should flip the flag back to visible, + // and this should only be done only for 1:1 messages + if (senderAddress is Address.Standard && senderAddress.address != userPublicKey + && context.threadAddress is Address.Standard) { val existingContact = configFactory.withUserConfigs { it.contacts.get(senderAddress.accountId.hexString) }