fix: initial contact generation fix for existing blinded contacts

This commit is contained in:
0x330a 2023-06-15 12:08:34 +10:00
parent 0a98290c23
commit bd05985cd6
No known key found for this signature in database
GPG Key ID: 267811D6E6A2698C
2 changed files with 3 additions and 2 deletions

View File

@ -159,7 +159,7 @@ dependencies {
testImplementation 'org.robolectric:shadows-multidex:4.4'
}
def canonicalVersionCode = 339
def canonicalVersionCode = 340
def canonicalVersionName = "1.17.0"
def postFixSize = 10

View File

@ -25,6 +25,7 @@ import org.session.libsession.utilities.TextSecurePreferences
import org.session.libsession.utilities.WindowDebouncer
import org.session.libsignal.crypto.ecc.DjbECPublicKey
import org.session.libsignal.utilities.Hex
import org.session.libsignal.utilities.IdPrefix
import org.session.libsignal.utilities.toHexString
import org.thoughtcrime.securesms.database.GroupDatabase
import org.thoughtcrime.securesms.database.ThreadDatabase
@ -146,7 +147,7 @@ object ConfigurationMessageUtilities {
val storage = MessagingModuleConfiguration.shared.storage
val localUserKey = storage.getUserPublicKey() ?: return null
val contactsWithSettings = storage.getAllContacts().filter { recipient ->
recipient.sessionID != localUserKey
recipient.sessionID != localUserKey && recipient.sessionID.startsWith(IdPrefix.STANDARD.value)
}.map { contact ->
val address = Address.fromSerialized(contact.sessionID)
val thread = storage.getThreadId(address)