From 73abd31ef4c9305ced8f4c53120626662c238d67 Mon Sep 17 00:00:00 2001 From: Itsusinn Date: Sun, 3 Jul 2022 15:27:35 +0800 Subject: [PATCH] fix: try add a filename for gif --- src/bot.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bot.rs b/src/bot.rs index 22dfd5d..66a1840 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -101,6 +101,7 @@ impl TgBot { let is_gif = "gif" == kind.extension(); let result = if is_gif { + let photo = photo.clone().file_name(format!("{:?}.gif",image_path.file_name().expect("Wrong filename"))); let send = self.inner.send_animation(chat_id, photo.clone()); if let Some(reply) = reply { send.reply_to_message_id(reply).await