mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-11 17:57:47 +00:00
refactor: add sender to be the person to trigger the legacy message send (in case of closed group updates)
This commit is contained in:
@@ -175,6 +175,8 @@ interface StorageProtocol {
|
||||
fun isPinned(threadID: Long): Boolean
|
||||
fun deleteConversation(threadID: Long)
|
||||
fun setThreadDate(threadId: Long, newDate: Long)
|
||||
fun getLastLegacyRecipient(threadRecipient: String): String?
|
||||
fun setLastLegacyRecipient(threadRecipient: String, senderRecipient: String?)
|
||||
|
||||
// Contacts
|
||||
fun getContactWithSessionID(sessionID: String): Contact?
|
||||
@@ -226,7 +228,11 @@ interface StorageProtocol {
|
||||
fun getExpirationConfiguration(threadId: Long): ExpirationConfiguration?
|
||||
fun setExpirationConfiguration(config: ExpirationConfiguration)
|
||||
fun getExpiringMessages(messageIds: List<Long> = emptyList()): List<Pair<Long, Long>>
|
||||
fun updateDisappearingState(threadID: Long, disappearingState: Recipient.DisappearingState)
|
||||
fun updateDisappearingState(
|
||||
messageSender: String,
|
||||
threadID: Long,
|
||||
disappearingState: Recipient.DisappearingState
|
||||
)
|
||||
|
||||
// Shared configs
|
||||
fun notifyConfigUpdates(forConfigObject: ConfigBase, messageTimestamp: Long)
|
||||
|
@@ -307,7 +307,7 @@ fun MessageReceiver.updateExpiryIfNeeded(
|
||||
|
||||
if (!recipient.isGroupRecipient && !recipient.isLocalNumber) {
|
||||
val disappearingState = if (proto.hasExpirationType()) Recipient.DisappearingState.UPDATED else Recipient.DisappearingState.LEGACY
|
||||
storage.updateDisappearingState(threadID, disappearingState)
|
||||
storage.updateDisappearingState(message.sender!!, threadID, disappearingState)
|
||||
}
|
||||
|
||||
remoteConfig.takeIf { localConfig == null || it.updatedTimestampMs > localConfig.updatedTimestampMs }
|
||||
|
Reference in New Issue
Block a user