From e3cb6bb456d61f944839368d5b02b9717f0b629f Mon Sep 17 00:00:00 2001 From: levlam Date: Sat, 27 Apr 2019 21:37:24 +0300 Subject: [PATCH] Fix applying of getChannelDifference. GitOrigin-RevId: 6c0e6e73a809037a88c9e225718a71a50a854617 --- td/telegram/MessagesManager.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index f7dc830ed..b3290d724 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -24868,8 +24868,8 @@ void MessagesManager::on_get_channel_dialog(DialogId dialog_id, MessageId last_m if (last_message_id.get() > d->last_new_message_id.get()) { // TODO properly support last_message_id.get() <= d->last_new_message_id.get() - set_dialog_first_database_message_id(d, MessageId(), "on_get_channel_dialog"); - set_dialog_last_database_message_id(d, MessageId(), "on_get_channel_dialog"); + set_dialog_first_database_message_id(d, MessageId(), "on_get_channel_dialog 6"); + set_dialog_last_database_message_id(d, MessageId(), "on_get_channel_dialog 7"); d->have_full_history = false; for (auto &first_message_id : d->first_database_message_id_by_index) { first_message_id = MessageId(); @@ -24883,6 +24883,8 @@ void MessagesManager::on_get_channel_dialog(DialogId dialog_id, MessageId last_m if (last_message_id.get() > d->last_new_message_id.get()) { // if last message is really a new message if (!d->last_new_message_id.is_valid() && last_message_id.get() <= d->max_added_message_id.get()) { set_dialog_last_new_message_id(d, last_message_id, "on_get_channel_dialog 15"); // remove too new messages + set_dialog_first_database_message_id(d, MessageId(), "on_get_channel_dialog 16"); + set_dialog_last_database_message_id(d, MessageId(), "on_get_channel_dialog 17"); } d->last_new_message_id = MessageId(); set_dialog_last_message_id(d, MessageId(), "on_get_channel_dialog 20");