Skip to content

Commit

Permalink
fix: update reply message id in callback query
Browse files Browse the repository at this point in the history
  • Loading branch information
krau committed Nov 9, 2024
1 parent e3cd659 commit 1128ee2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bot/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,13 @@ func AddToQueue(ctx *ext.Context, update *ext.Update) error {
})
return dispatcher.EndGroups
}
if update.CallbackQuery.MsgID != record.ReplyMessageID {
record.ReplyMessageID = update.CallbackQuery.MsgID
if err := dao.UpdateReceivedFile(record); err != nil {
logger.L.Errorf("Failed to update received file: %s", err)
}
}

file, err := FileFromMessage(ctx, Client, record.ChatID, record.MessageID)
if err != nil {
logger.L.Errorf("Failed to get file from message: %s", err)
Expand Down

0 comments on commit 1128ee2

Please sign in to comment.