mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-28 20:45:17 +00:00
fix: don't add contacts if they don't exist in the profile manager
This commit is contained in:
parent
1a3f432f85
commit
34f40d01f3
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user