mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-03 13:47:45 +00:00
Set thread to 14 days old when added from libSessionContacts
This commit is contained in:
parent
e8c61d6791
commit
19c3b639c3
@ -92,6 +92,7 @@ import org.thoughtcrime.securesms.mms.PartAuthority
|
|||||||
import org.thoughtcrime.securesms.util.ConfigurationMessageUtilities
|
import org.thoughtcrime.securesms.util.ConfigurationMessageUtilities
|
||||||
import org.thoughtcrime.securesms.util.SessionMetaProtocol
|
import org.thoughtcrime.securesms.util.SessionMetaProtocol
|
||||||
import java.security.MessageDigest
|
import java.security.MessageDigest
|
||||||
|
import kotlin.time.Duration.Companion.days
|
||||||
import network.loki.messenger.libsession_util.util.Contact as LibSessionContact
|
import network.loki.messenger.libsession_util.util.Contact as LibSessionContact
|
||||||
|
|
||||||
private const val TAG = "Storage"
|
private const val TAG = "Storage"
|
||||||
@ -1186,6 +1187,7 @@ open class Storage(
|
|||||||
} else {
|
} else {
|
||||||
getOrCreateThreadIdFor(fromSerialized(contact.id)).let { conversationThreadId ->
|
getOrCreateThreadIdFor(fromSerialized(contact.id)).let { conversationThreadId ->
|
||||||
setPinned(conversationThreadId, contact.priority == PRIORITY_PINNED)
|
setPinned(conversationThreadId, contact.priority == PRIORITY_PINNED)
|
||||||
|
setThreadDate(conversationThreadId, SnodeAPI.nowWithOffset - 14.days.inWholeMilliseconds)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
getThreadId(recipient)?.let {
|
getThreadId(recipient)?.let {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user