From ccf899f70dfca7e7787fd7ceab710db04fea44cd Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Mon, 20 Apr 2026 13:01:51 -0700 Subject: [PATCH] Relax document requirements for media gallery --- ts/sql/Server.node.ts | 2 -- ts/util/Attachment.std.ts | 4 ---- 2 files changed, 6 deletions(-) diff --git a/ts/sql/Server.node.ts b/ts/sql/Server.node.ts index 5e08c4cf7e..b8a7afc464 100644 --- a/ts/sql/Server.node.ts +++ b/ts/sql/Server.node.ts @@ -5583,8 +5583,6 @@ function getSortedMedia( // see 'isFile' in ts/util/Attachment.std.ts contentFilter = sqlFragment` message_attachments.flags IS NOT ${VOICE_MESSAGE} AND - message_attachments.contentType IS NOT NULL AND - message_attachments.contentType IS NOT '' AND message_attachments.contentType IS NOT 'text/x-signal-plain' AND message_attachments.contentType NOT LIKE 'audio/%' AND message_attachments.contentType NOT LIKE 'image/%' AND diff --git a/ts/util/Attachment.std.ts b/ts/util/Attachment.std.ts index 19805c7a07..75e1b3b060 100644 --- a/ts/util/Attachment.std.ts +++ b/ts/util/Attachment.std.ts @@ -542,10 +542,6 @@ export const isVisualMedia = (attachment: AttachmentType): boolean => { export const isFile = (attachment: AttachmentType): boolean => { const { contentType } = attachment; - if (isUndefined(contentType)) { - return false; - } - if (isVisualMedia(attachment)) { return false; }