From 71a588da39c0d24ffc0b6b5f7554cb5ea540cc83 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Fri, 8 Aug 2025 17:00:20 -0400 Subject: [PATCH] Do not retry thumbnails on terminal status codes. --- .../securesms/jobs/RestoreAttachmentThumbnailJob.kt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/RestoreAttachmentThumbnailJob.kt b/app/src/main/java/org/thoughtcrime/securesms/jobs/RestoreAttachmentThumbnailJob.kt index eddd09ecdc..4ee10f98f9 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/RestoreAttachmentThumbnailJob.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/RestoreAttachmentThumbnailJob.kt @@ -156,7 +156,15 @@ class RestoreAttachmentThumbnailJob private constructor( override fun onShouldRetry(exception: Exception): Boolean { if (exception is NonSuccessfulResponseCodeException) { if (exception.code == 404) { - Log.w(TAG, "[$attachmentId-thumbnail] Unable to find file") + Log.w(TAG, "[$attachmentId-thumbnail] Unable to find file!") + return false + } + if (exception.code == 403) { + Log.w(TAG, "[$attachmentId-thumbnail] No permission!") + return false + } + if (exception.code == 555) { + Log.w(TAG, "[$attachmentId-thumbnail] Syntetic failure!") return false } }