From baec61cc4dce79502c9bdd864a7875e888374603 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Tue, 11 Aug 2020 04:21:42 +0300 Subject: [PATCH] Recognize .tgs files as stickers .tgs files are Telegram stickers. Internally they are gzipped JSON files, containing a single Lottie animation. MIME type application/x-tgsticker is commonly used for telegram documents containing such stickers. --- src/message.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/message.rs b/src/message.rs index bb1e4607b..a622a4d4c 100644 --- a/src/message.rs +++ b/src/message.rs @@ -1077,6 +1077,7 @@ pub fn guess_msgtype_from_suffix(path: &Path) -> Option<(Viewtype, &str)> { "png" => (Viewtype::Image, "image/png"), "spx" => (Viewtype::Audio, "audio/ogg"), // Ogg Speex Profile "svg" => (Viewtype::Image, "image/svg+xml"), + "tgs" => (Viewtype::Sticker, "application/x-tgsticker"), "vcard" => (Viewtype::File, "text/vcard"), "vcf" => (Viewtype::File, "text/vcard"), "webm" => (Viewtype::Video, "video/webm"),