Return back manual load_messages call if receive no messages from database to repair last message with a server-side request.
This commit is contained in:
parent
6ded199729
commit
aff810db0d
@ -23349,6 +23349,14 @@ void MessagesManager::on_get_history_from_database(DialogId dialog_id, MessageId
|
||||
}
|
||||
}
|
||||
|
||||
if (!first_added_message_id.is_valid() && !only_local && dialog_id.get_type() != DialogType::SecretChat) {
|
||||
if (from_the_end) {
|
||||
from_message_id = MessageId();
|
||||
}
|
||||
load_messages_impl(d, from_message_id, offset, limit, 1, false, std::move(promise));
|
||||
return;
|
||||
}
|
||||
|
||||
bool need_update_dialog_pos = false;
|
||||
if (from_the_end && last_added_message_id.is_valid()) {
|
||||
CHECK(next_message_id.is_valid());
|
||||
|
Loading…
Reference in New Issue
Block a user