From da9b24d19154dcfc9da985f46e60202646b2572a Mon Sep 17 00:00:00 2001 From: iequidoo Date: Fri, 6 Jun 2025 16:03:13 -0300 Subject: [PATCH] fix: Treat "tgs" as Viewtype::File `Viewtype::Sticker` has special meaning: the file should be an image having fully transparent pixels. But "tgs" (Telegram animated sticker) is a compressed JSON and isn't recognized by Core as image. --- src/message.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/message.rs b/src/message.rs index e80177183..e385ce9d5 100644 --- a/src/message.rs +++ b/src/message.rs @@ -1592,7 +1592,7 @@ pub(crate) fn guess_msgtype_from_path_suffix(path: &Path) -> Option<(Viewtype, & "rtf" => (Viewtype::File, "application/rtf"), "spx" => (Viewtype::File, "audio/ogg"), // Ogg Speex Profile "svg" => (Viewtype::File, "image/svg+xml"), - "tgs" => (Viewtype::Sticker, "application/x-tgsticker"), + "tgs" => (Viewtype::File, "application/x-tgsticker"), "tiff" => (Viewtype::File, "image/tiff"), "tif" => (Viewtype::File, "image/tiff"), "ttf" => (Viewtype::File, "font/ttf"),