From 1c9d68a932497ca2fdcd00f2d57186f2291c02a5 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Wed, 3 Sep 2025 15:44:04 -0400 Subject: [PATCH] Fix thumbnail job precondition. --- .../securesms/jobs/ArchiveThumbnailUploadJob.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/ArchiveThumbnailUploadJob.kt b/app/src/main/java/org/thoughtcrime/securesms/jobs/ArchiveThumbnailUploadJob.kt index 414a062c39..7d4e098975 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/ArchiveThumbnailUploadJob.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/ArchiveThumbnailUploadJob.kt @@ -108,7 +108,12 @@ class ArchiveThumbnailUploadJob private constructor( return Result.success() } - if (attachment.remoteDigest == null && attachment.dataHash == null && attachment.hadIntegrityCheckPerformed()) { + if (attachment.dataHash == null || attachment.remoteKey == null) { + Log.w(TAG, "$attachmentId is missing necessary ingredients for a mediaName!") + return Result.success() + } + + if (!attachment.hadIntegrityCheckPerformed()) { Log.w(TAG, "$attachmentId has no integrity check! Cannot proceed.") return Result.success() }