mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 16:33:39 +00:00
Fix legacy expiration timer update handling
This commit is contained in:
parent
9e004cd09a
commit
8a51c8882c
@ -157,11 +157,11 @@ fun MessageReceiver.cancelTypingIndicatorsIfNeeded(senderPublicKey: String) {
|
||||
}
|
||||
|
||||
private fun MessageReceiver.handleExpirationTimerUpdate(message: ExpirationTimerUpdate) {
|
||||
if (!ExpirationConfiguration.isNewConfigEnabled) return
|
||||
if (ExpirationConfiguration.isNewConfigEnabled) return
|
||||
val recipient = Recipient.from(MessagingModuleConfiguration.shared.context, Address.fromSerialized(message.sender!!), false)
|
||||
val type = when {
|
||||
recipient.isLocalNumber -> ExpirationType.DELETE_AFTER_READ
|
||||
recipient.isContactRecipient || recipient.isGroupRecipient -> ExpirationType.DELETE_AFTER_SEND
|
||||
recipient.isContactRecipient -> ExpirationType.DELETE_AFTER_READ
|
||||
recipient.isGroupRecipient -> ExpirationType.DELETE_AFTER_SEND
|
||||
else -> null
|
||||
}
|
||||
SSKEnvironment.shared.messageExpirationManager.setExpirationTimer(message, type?.number)
|
||||
|
Loading…
x
Reference in New Issue
Block a user