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 048822a7a6..414a062c39 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/ArchiveThumbnailUploadJob.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/ArchiveThumbnailUploadJob.kt @@ -98,8 +98,13 @@ class ArchiveThumbnailUploadJob private constructor( return Result.success() } + if (!MediaUtil.isImageOrVideoType(attachment.contentType)) { + Log.w(TAG, "$attachmentId isn't visual media (contentType = ${attachment.contentType}). Skipping.") + return Result.success() + } + if (attachment.quote) { - Log.w(TAG, "$attachmentId is a quote, skipping.") + Log.w(TAG, "$attachmentId is a quote. Skipping.") return Result.success() } @@ -108,6 +113,11 @@ class ArchiveThumbnailUploadJob private constructor( return Result.success() } + if (SignalDatabase.messages.isStory(attachment.mmsId)) { + Log.w(TAG, "$attachmentId is a story. Skipping.") + return Result.success() + } + // TODO [backups] Determine if we actually need to upload or are reusing a thumbnail from another attachment val thumbnailResult = generateThumbnailIfPossible(attachment)