From 34f40d01f35e929777cde7acc1007b89536e9e8c Mon Sep 17 00:00:00 2001 From: 0x330a <92654767+0x330a@users.noreply.github.com> Date: Mon, 22 May 2023 16:22:04 +1000 Subject: [PATCH] fix: don't add contacts if they don't exist in the profile manager --- .../org/thoughtcrime/securesms/sskenvironment/ProfileManager.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/org/thoughtcrime/securesms/sskenvironment/ProfileManager.kt b/app/src/main/java/org/thoughtcrime/securesms/sskenvironment/ProfileManager.kt index eec6038ca8..2ea5369390 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/sskenvironment/ProfileManager.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/sskenvironment/ProfileManager.kt @@ -95,6 +95,7 @@ class ProfileManager(private val context: Context, private val configFactory: Co if (contact.sessionID == TextSecurePreferences.getLocalNumber(context)) return val sessionId = SessionId(contact.sessionID) if (sessionId.prefix != IdPrefix.STANDARD) return // only internally store standard session IDs + if (contactConfig.get(contact.sessionID) == null) return // don't insert, only update contactConfig.upsertContact(contact.sessionID) { this.name = contact.name.orEmpty() this.nickname = contact.nickname.orEmpty()