Add more getDifference logging.
GitOrigin-RevId: 047ed590512ec3f97c90d08d2cd709d7e4948519
This commit is contained in:
parent
f2a4cbd1f7
commit
68f477d71e
@ -1622,6 +1622,7 @@ bool InlineQueriesManager::load_recently_used_bots(Promise<Unit> &promise) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOG(INFO) << "Load recently used inline bots " << saved_bots << '/' << saved_bot_ids;
|
||||||
if (recently_used_bots_loaded_ == 1 && resolve_recent_inline_bots_multipromise_.promise_count() == 0) {
|
if (recently_used_bots_loaded_ == 1 && resolve_recent_inline_bots_multipromise_.promise_count() == 0) {
|
||||||
// queries was sent and have already been finished
|
// queries was sent and have already been finished
|
||||||
auto newly_used_bots = std::move(recently_used_bot_user_ids_);
|
auto newly_used_bots = std::move(recently_used_bot_user_ids_);
|
||||||
|
@ -135,6 +135,7 @@ class GetDifferenceQuery : public Td::ResultHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void on_result(uint64 id, BufferSlice packet) override {
|
void on_result(uint64 id, BufferSlice packet) override {
|
||||||
|
VLOG(get_difference) << "Receive getDifference result of size " << packet.size();
|
||||||
auto result_ptr = fetch_result<telegram_api::updates_getDifference>(packet);
|
auto result_ptr = fetch_result<telegram_api::updates_getDifference>(packet);
|
||||||
if (result_ptr.is_error()) {
|
if (result_ptr.is_error()) {
|
||||||
return on_error(id, result_ptr.move_as_error());
|
return on_error(id, result_ptr.move_as_error());
|
||||||
@ -990,6 +991,8 @@ void UpdatesManager::on_get_difference(tl_object_ptr<telegram_api::updates_Diffe
|
|||||||
}
|
}
|
||||||
case telegram_api::updates_difference::ID: {
|
case telegram_api::updates_difference::ID: {
|
||||||
auto difference = move_tl_object_as<telegram_api::updates_difference>(difference_ptr);
|
auto difference = move_tl_object_as<telegram_api::updates_difference>(difference_ptr);
|
||||||
|
VLOG(get_difference) << "In get difference receive " << difference->users_.size() << " users and "
|
||||||
|
<< difference->chats_.size() << " chats";
|
||||||
td_->contacts_manager_->on_get_users(std::move(difference->users_));
|
td_->contacts_manager_->on_get_users(std::move(difference->users_));
|
||||||
td_->contacts_manager_->on_get_chats(std::move(difference->chats_));
|
td_->contacts_manager_->on_get_chats(std::move(difference->chats_));
|
||||||
|
|
||||||
@ -1008,6 +1011,13 @@ void UpdatesManager::on_get_difference(tl_object_ptr<telegram_api::updates_Diffe
|
|||||||
}
|
}
|
||||||
case telegram_api::updates_differenceSlice::ID: {
|
case telegram_api::updates_differenceSlice::ID: {
|
||||||
auto difference = move_tl_object_as<telegram_api::updates_differenceSlice>(difference_ptr);
|
auto difference = move_tl_object_as<telegram_api::updates_differenceSlice>(difference_ptr);
|
||||||
|
if (difference->intermediate_state_->pts_ >= get_pts() && get_pts() != std::numeric_limits<int32>::max() &&
|
||||||
|
difference->intermediate_state_->date_ >= date_ && difference->intermediate_state_->qts_ == qts_) {
|
||||||
|
// TODO send new getDifference request and apply difference slice only after that
|
||||||
|
}
|
||||||
|
|
||||||
|
VLOG(get_difference) << "In get difference receive " << difference->users_.size() << " users and "
|
||||||
|
<< difference->chats_.size() << " chats";
|
||||||
td_->contacts_manager_->on_get_users(std::move(difference->users_));
|
td_->contacts_manager_->on_get_users(std::move(difference->users_));
|
||||||
td_->contacts_manager_->on_get_chats(std::move(difference->chats_));
|
td_->contacts_manager_->on_get_chats(std::move(difference->chats_));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user