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.
This commit is contained in:
Alexander Krotov
2020-08-11 04:21:42 +03:00
parent 6285d18186
commit baec61cc4d

View File

@@ -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"),