Reload message from server after receiving MESSAGE_ID_INVALID for a callback query.

This commit is contained in:
levlam 2021-09-28 00:14:57 +03:00
parent 36cbba4d2c
commit 26ff41deab

View File

@ -83,7 +83,7 @@ class GetBotCallbackAnswerQuery final : public Td::ResultHandler {
}
void on_error(uint64 id, Status status) final {
if (status.message() == "DATA_INVALID") {
if (status.message() == "DATA_INVALID" || status.message() == "MESSAGE_ID_INVALID") {
td->messages_manager_->get_message_from_server({dialog_id_, message_id_}, Auto(), "GetBotCallbackAnswerQuery");
} else if (status.message() == "BOT_RESPONSE_TIMEOUT") {
status = Status::Error(502, "The bot is not responding");