Fix dialog reply markup if keyboard is in edited message just in case.

GitOrigin-RevId: 105e4ef522dbdb39b279b56cf8832ead6dbc168a
This commit is contained in:
levlam 2018-01-05 14:49:01 +03:00
parent dc113f2b84
commit 0e4e84235d
2 changed files with 5 additions and 1 deletions

View File

@ -34,7 +34,7 @@ This repository contains the code of the Telegram Database library (`TDLib`).
* **Fully-asynchronous**: requests to `TDLib` don't block each other or anything else, responses will be sent when they are available.
<a name="license"></a>
## License
## License
The Telegram Database library is licensed under the terms of the
Boost Software License. See [LICENSE](http://www.boost.org/LICENSE_1_0.txt) for more information.

View File

@ -21478,6 +21478,10 @@ void MessagesManager::update_message(Dialog *d, unique_ptr<Message> &old_message
((old_message->reply_markup == nullptr) != (new_message->reply_markup == nullptr)) ||
(old_message->reply_markup != nullptr && *old_message->reply_markup != *new_message->reply_markup);
if (reply_markup_changed) {
if (d->reply_markup_message_id == message_id && !td_->auth_manager_->is_bot() &&
new_message->reply_markup == nullptr) {
set_dialog_reply_markup(d, MessageId());
}
old_message->reply_markup = std::move(new_message->reply_markup);
is_edited = true;
is_changed = true;