Immediately fetch affected messages.
This commit is contained in:
parent
168bba072d
commit
238d154ed7
|
@ -21731,9 +21731,9 @@ void MessagesManager::on_get_affected_history(DialogId dialog_id, AffectedHistor
|
|||
add_pending_channel_update(dialog_id, make_tl_object<dummyUpdate>(), affected_history.pts_,
|
||||
affected_history.pts_count_, std::move(update_promise), "on_get_affected_history");
|
||||
} else {
|
||||
td_->updates_manager_->add_pending_pts_update(make_tl_object<dummyUpdate>(), affected_history.pts_,
|
||||
affected_history.pts_count_, Time::now(), std::move(update_promise),
|
||||
"on_get_affected_history");
|
||||
td_->updates_manager_->add_pending_pts_update(
|
||||
make_tl_object<dummyUpdate>(), affected_history.pts_, affected_history.pts_count_,
|
||||
Time::now() - (get_affected_messages ? 10.0 : 0.0), std::move(update_promise), "on_get_affected_history");
|
||||
}
|
||||
} else if (affected_history.is_final_) {
|
||||
promise.set_value(Unit());
|
||||
|
|
|
@ -2910,7 +2910,7 @@ void UpdatesManager::add_pending_pts_update(tl_object_ptr<telegram_api::Update>
|
|||
// can't apply all updates, but can apply this and probably some other updates
|
||||
process_pending_pts_updates();
|
||||
} else {
|
||||
set_pts_gap_timeout(receive_time + MAX_UNFILLED_GAP_TIME - Time::now());
|
||||
set_pts_gap_timeout(max(receive_time + MAX_UNFILLED_GAP_TIME - Time::now(), 0.001));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -3233,7 +3233,7 @@ void UpdatesManager::process_pending_pts_updates() {
|
|||
}
|
||||
receive_time = min(receive_time, update_it->second.receive_time);
|
||||
}
|
||||
set_pts_gap_timeout(receive_time + MAX_UNFILLED_GAP_TIME - Time::now());
|
||||
set_pts_gap_timeout(max(receive_time + MAX_UNFILLED_GAP_TIME - Time::now(), 0.001));
|
||||
}
|
||||
|
||||
auto passed_time = Time::now() - begin_time;
|
||||
|
|
Loading…
Reference in New Issue