Reget message from server after failed to get its thread with MSG_ID_INVALID.

This commit is contained in:
levlam 2022-03-22 14:59:57 +03:00
parent de6c4648d4
commit ff014add18

View File

@ -429,6 +429,10 @@ class GetDiscussionMessageQuery final : public Td::ResultHandler {
if (expected_dialog_id_ == dialog_id_) {
td_->messages_manager_->on_get_dialog_error(dialog_id_, status, "GetDiscussionMessageQuery");
}
if (status.message() == "MSG_ID_INVALID") {
td_->messages_manager_->get_message_from_server({dialog_id_, message_id_}, Promise<Unit>(),
"GetDiscussionMessageQuery");
}
promise_.set_error(std::move(status));
}
};