mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-28 20:45:17 +00:00
fix: prevent NTS self create thread on user view bind
This commit is contained in:
parent
b2439d48ee
commit
da330273c8
@ -54,8 +54,9 @@ class UserView : LinearLayout {
|
||||
val contact = DatabaseComponent.get(context).sessionContactDatabase().getContactWithSessionID(publicKey)
|
||||
return contact?.displayName(Contact.ContactContext.REGULAR) ?: publicKey
|
||||
}
|
||||
val threadID = MessagingModuleConfiguration.shared.storage.getOrCreateThreadIdFor(user.address)
|
||||
MessagingModuleConfiguration.shared.storage.getThreadId(user.address)?.let { threadID ->
|
||||
MentionManagerUtilities.populateUserPublicKeyCacheIfNeeded(threadID, context) // FIXME: This is a bad place to do this
|
||||
}
|
||||
val address = user.address.serialize()
|
||||
binding.profilePictureView.root.glide = glide
|
||||
binding.profilePictureView.root.update(user)
|
||||
|
@ -97,6 +97,9 @@ open class Storage(context: Context, helper: SQLCipherOpenHelper, private val co
|
||||
// TODO: maybe add time here from formation / creation message
|
||||
override fun threadCreated(address: Address, threadId: Long) {
|
||||
if (!getRecipientApproved(address)) return // don't store unapproved / message requests
|
||||
if (getUserPublicKey() == address.serialize()) {
|
||||
Log.d("Loki-DBG", "NTS created, context:\n${Thread.currentThread().stackTrace.joinToString("\n")}")
|
||||
}
|
||||
|
||||
val volatile = configFactory.convoVolatile ?: return
|
||||
if (address.isGroup) {
|
||||
|
Loading…
Reference in New Issue
Block a user