Skip to content

Commit baec61c

Browse files
author
Alexander Krotov
committed
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.
1 parent 6285d18 commit baec61c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/message.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,7 @@ pub fn guess_msgtype_from_suffix(path: &Path) -> Option<(Viewtype, &str)> {
10771077
"png" => (Viewtype::Image, "image/png"),
10781078
"spx" => (Viewtype::Audio, "audio/ogg"), // Ogg Speex Profile
10791079
"svg" => (Viewtype::Image, "image/svg+xml"),
1080+
"tgs" => (Viewtype::Sticker, "application/x-tgsticker"),
10801081
"vcard" => (Viewtype::File, "text/vcard"),
10811082
"vcf" => (Viewtype::File, "text/vcard"),
10821083
"webm" => (Viewtype::Video, "video/webm"),

0 commit comments

Comments
 (0)