Don't force getChatHistory response for only_local requests.

This commit is contained in:
levlam 2023-06-07 15:23:09 +03:00
parent 7d83f2e15a
commit e8ee1c5149

View File

@ -20902,8 +20902,8 @@ tl_object_ptr<td_api::messages> MessagesManager::get_dialog_history(DialogId dia
<< " tries left, have_full_history = " << d->have_full_history
<< ", have_full_history_source = " << d->have_full_history_source;
auto message_ids =
d->ordered_messages.get_history(d->last_message_id, from_message_id, offset, limit, left_tries == 0);
auto message_ids = d->ordered_messages.get_history(d->last_message_id, from_message_id, offset, limit,
left_tries == 0 && !only_local);
if (!message_ids.empty()) {
// maybe need some messages
CHECK(offset == 0);