Only update desktop activity timestamp for user-initiated sync messages.

Co-authored-by: Greyson Parrelli <greyson@signal.org>
This commit is contained in:
Alex Hart
2026-05-20 12:42:52 -03:00
committed by GitHub
parent 00042b9579
commit 9e8ae7e26a
2 changed files with 8 additions and 1 deletions
@@ -470,7 +470,6 @@ open class MessageContentProcessor(private val context: Context) {
content.syncMessage != null -> {
SignalStore.account.isMultiDevice = true
SignalStore.misc.lastSyncMessageSeenTimeMs = System.currentTimeMillis()
SyncMessageProcessor.process(
context,
@@ -287,6 +287,8 @@ object SyncMessageProcessor {
log(envelope.clientTimestamp!!, "Got a sent transcript while in reCAPTCHA mode. Assuming we're good to message again.")
RateLimitUtil.retryAllRateLimitedMessages(context)
}
SignalStore.misc.lastSyncMessageSeenTimeMs = System.currentTimeMillis()
} catch (e: MmsException) {
throw StorageFailedException(e, metadata.sourceServiceId.toString(), metadata.sourceDeviceId)
}
@@ -1010,6 +1012,8 @@ object SyncMessageProcessor {
PushProcessEarlyMessagesJob.enqueue()
}
SignalStore.misc.lastSyncMessageSeenTimeMs = System.currentTimeMillis()
AppDependencies
.messageNotifier
.apply {
@@ -1045,6 +1049,8 @@ object SyncMessageProcessor {
SignalDatabase.messages.setIncomingMessagesViewed(toMarkViewed)
SignalDatabase.messages.setOutgoingGiftsRevealed(toMarkViewed)
SignalStore.misc.lastSyncMessageSeenTimeMs = System.currentTimeMillis()
AppDependencies.messageNotifier.apply {
cancelDelayedNotifications()
updateNotification(context)
@@ -1073,6 +1079,8 @@ object SyncMessageProcessor {
}
}
SignalStore.misc.lastSyncMessageSeenTimeMs = System.currentTimeMillis()
AppDependencies.messageNotifier.apply {
cancelDelayedNotifications()
updateNotification(context)