Skip to content

Commit

Permalink
fix: try add a filename for gif
Browse files Browse the repository at this point in the history
  • Loading branch information
Itsusinn committed Jul 3, 2022
1 parent edc9d16 commit 73abd31
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/bot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 73abd31

Please sign in to comment.