From 4a0631a10c06673d22a03dfca27b07dc82fbc3e5 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Fri, 9 Jan 2026 21:15:46 -0500 Subject: [PATCH] Attempt to restore attachment as long as we have the data hash. --- .../org/thoughtcrime/securesms/jobs/AttachmentDownloadJob.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/AttachmentDownloadJob.kt b/app/src/main/java/org/thoughtcrime/securesms/jobs/AttachmentDownloadJob.kt index 75c27f3d45..85effd9210 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/AttachmentDownloadJob.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/AttachmentDownloadJob.kt @@ -98,11 +98,11 @@ class AttachmentDownloadJob private constructor( AttachmentTable.TRANSFER_PROGRESS_PENDING, AttachmentTable.TRANSFER_PROGRESS_FAILED -> { if (SignalStore.backup.backsUpMedia && (databaseAttachment.remoteLocation == null || databaseAttachment.remoteDigest == null)) { - if (databaseAttachment.archiveTransferState == AttachmentTable.ArchiveTransferState.FINISHED) { + if (databaseAttachment.dataHash != null) { Log.i(TAG, "Trying to restore attachment from archive cdn") RestoreAttachmentJob.forManualRestore(databaseAttachment) } else { - Log.w(TAG, "No remote location, and the archive transfer state is unfinished. Can't download.") + Log.w(TAG, "No remote location and no plaintext hash. Can't download.") null } } else {