From 8092cb53c5f3052746773cec6ffa861d2fefff86 Mon Sep 17 00:00:00 2001 From: benya Date: Sun, 8 Mar 2026 20:45:16 +0300 Subject: [PATCH] fix(media): exclude stickers and gifs from media gallery set --- web/src/components/MessageList.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/src/components/MessageList.tsx b/web/src/components/MessageList.tsx index 1757ac6..96823b8 100644 --- a/web/src/components/MessageList.tsx +++ b/web/src/components/MessageList.tsx @@ -1316,14 +1316,16 @@ function collectMediaItems( for (const attachment of attachments) { if (!attachment.file_url) continue; if (!attachment.file_type.startsWith("image/") && !attachment.file_type.startsWith("video/")) continue; + if (isStickerOrGifMedia(attachment.file_url)) continue; const type = attachment.file_type.startsWith("image/") ? "image" : "video"; const key = `${type}:${attachment.file_url}`; if (seen.has(key)) continue; seen.add(key); items.push({ url: attachment.file_url, type }); } - if (attachments.length === 0 && message.text && /^https?:\/\//i.test(message.text)) { + if (attachments.length === 0 && message.text && /^https?:\/\//i.test(message.text)) { if (message.type !== "image" && message.type !== "video" && message.type !== "circle_video") continue; + if (isStickerOrGifMedia(message.text)) continue; const type = message.type === "image" ? "image" : "video"; const key = `${type}:${message.text}`; if (seen.has(key)) continue;