From f4fbde2e2fc0e67c1c286cd71171ec7c5d859caf Mon Sep 17 00:00:00 2001 From: automated-signal <37887102+automated-signal@users.noreply.github.com> Date: Tue, 28 Apr 2026 08:26:44 -0500 Subject: [PATCH] Avoid attempting incremental playback on undownloadable attachments Co-authored-by: trevor-signal <131492920+trevor-signal@users.noreply.github.com> --- ts/state/selectors/message.preload.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ts/state/selectors/message.preload.ts b/ts/state/selectors/message.preload.ts index fda19bec34..d452ed3e11 100644 --- a/ts/state/selectors/message.preload.ts +++ b/ts/state/selectors/message.preload.ts @@ -73,6 +73,7 @@ import { isVoiceMessage, isIncremental, defaultBlurHash, + isDownloadable, } from '../../util/Attachment.std.ts'; import type { MessageAttachmentType } from '../../types/AttachmentDownload.std.ts'; import type { @@ -2188,7 +2189,9 @@ export function getPropsForAttachment( pending, url: path ? getLocalAttachmentUrl(attachment) : undefined, incrementalUrl: - isIncremental(attachment) && attachment.downloadPath + isIncremental(attachment) && + attachment.downloadPath && + isDownloadable(attachment) ? getLocalAttachmentUrl(attachment, { disposition: AttachmentDisposition.Download, })