From 4876523bf24872b35350d7d643715787aa383214 Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 22 Apr 2024 10:00:46 +0930 Subject: [PATCH] Don't start expiration for group expiration update messages --- .../thoughtcrime/securesms/service/ExpiringMessageManager.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/service/ExpiringMessageManager.kt b/app/src/main/java/org/thoughtcrime/securesms/service/ExpiringMessageManager.kt index c1dff74333..2f6ad7fd8b 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/service/ExpiringMessageManager.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/service/ExpiringMessageManager.kt @@ -151,8 +151,8 @@ class ExpiringMessageManager(context: Context) : MessageExpirationManagerProtoco val userPublicKey = getLocalNumber(context) val senderPublicKey = message.sender - val sentTimestamp = if (message.sentTimestamp == null) 0 else message.sentTimestamp!! - val expireStartedAt = if (expiryMode is AfterSend || message.isSenderSelf) sentTimestamp else 0 + val sentTimestamp = message.sentTimestamp ?: 0 + val expireStartedAt = if ((expiryMode is AfterSend || message.isSenderSelf) && !message.isGroup) sentTimestamp else 0 // Notify the user if (senderPublicKey == null || userPublicKey == senderPublicKey) {