Set NTS to 14 days ago when created in updateUser

This commit is contained in:
Andrew 2024-02-26 17:46:45 +10:30
parent d143d8a883
commit 1a81c7278a

View File

@ -494,7 +494,10 @@ open class Storage(
deleteConversation(ourThread) deleteConversation(ourThread)
} else { } else {
// create note to self thread if needed (?) // create note to self thread if needed (?)
val ourThread = getOrCreateThreadIdFor(recipient.address) val address = recipient.address
val ourThread = getThreadId(address) ?: getOrCreateThreadIdFor(address).also {
setThreadDate(it, SnodeAPI.nowWithOffset - 14.days.inWholeMilliseconds)
}
DatabaseComponent.get(context).threadDatabase().setHasSent(ourThread, true) DatabaseComponent.get(context).threadDatabase().setHasSent(ourThread, true)
setPinned(ourThread, userProfile.getNtsPriority() > 0) setPinned(ourThread, userProfile.getNtsPriority() > 0)
} }