From 1a81c7278a722e3b21e8d0c341ac309d92341633 Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 26 Feb 2024 17:46:45 +1030 Subject: [PATCH] Set NTS to 14 days ago when created in updateUser --- .../main/java/org/thoughtcrime/securesms/database/Storage.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt b/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt index f784313a5c..f22371eb58 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/database/Storage.kt @@ -494,7 +494,10 @@ open class Storage( deleteConversation(ourThread) } else { // 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) setPinned(ourThread, userProfile.getNtsPriority() > 0) }