Skip to content

Commit

Permalink
fix: incorrect caption
Browse files Browse the repository at this point in the history
  • Loading branch information
Itsusinn committed Jun 30, 2022
1 parent c11c807 commit eea1b0b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/message/handlers/send.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ pub async fn answer_common(msg: Message, _bot: BotRequester) -> anyhow::Result<(
RES.put_image_id(&uid, file_id.clone());
TG_BOT.file(&uid, &file_id).await?;
chain.push(MessageType::Image { id: uid, url: None });
if let Some(caption) = msg.caption() {
chain.push(MessageType::Text {
content: caption.to_string(),
});
}
} else if let Some(_) = msg.new_chat_members() {
// TODO
} else if let Some(_) = msg.left_chat_member() {
Expand All @@ -73,6 +68,11 @@ pub async fn answer_common(msg: Message, _bot: BotRequester) -> anyhow::Result<(
// TODO
// animation is GIF or video
}
if let Some(caption) = msg.caption() {
chain.push(MessageType::Text {
content: caption.to_string(),
});
}

let reply = match msg.reply_to_message() {
Some(v) => {
Expand Down

0 comments on commit eea1b0b

Please sign in to comment.