mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-15 07:28:30 +00:00
Ensure we don't archive thumbnails or stories.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user