Ensure we don't archive thumbnails or stories.

This commit is contained in:
Greyson Parrelli
2025-09-03 13:17:27 -04:00
parent 5294bd8a1a
commit 89a0541574

View File

@@ -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)