Improve logging.

GitOrigin-RevId: d724bc73494d5ad5f19bc5d0e87c6bdc361183ee
This commit is contained in:
levlam 2020-06-18 03:49:31 +03:00
parent 448e8e0186
commit 10c3cc2a51
2 changed files with 4 additions and 4 deletions

View File

@ -726,9 +726,9 @@ void AuthManager::on_get_authorization(tl_object_ptr<telegram_api::auth_Authoriz
send_closure(td->top_dialog_manager_, &TopDialogManager::do_start_up);
td->updates_manager_->get_difference("on_get_authorization");
td->on_online_updated(false, true);
td->schedule_get_terms_of_service(0);
td->schedule_get_promo_data(0);
if (!is_bot()) {
td->schedule_get_terms_of_service(0);
td->schedule_get_promo_data(0);
G()->td_db()->get_binlog_pmc()->set("fetched_marks_as_unread", "1");
}
send_closure(G()->config_manager(), &ConfigManager::request_config);

View File

@ -3169,7 +3169,6 @@ void Td::on_get_promo_data(Result<telegram_api::object_ptr<telegram_api::help_Pr
}
void Td::schedule_get_promo_data(int32 expires_in) {
LOG(INFO) << "Schedule getPromoData in " << expires_in;
if (expires_in < 0) {
LOG(ERROR) << "Receive wrong expires_in: " << expires_in;
expires_in = 0;
@ -3181,6 +3180,7 @@ void Td::schedule_get_promo_data(int32 expires_in) {
expires_in = 86400;
}
if (!close_flag_ && !auth_manager_->is_bot()) {
LOG(INFO) << "Schedule getPromoData in " << expires_in;
alarm_timeout_.set_timeout_in(PROMO_DATA_ALARM_ID, expires_in);
}
}
@ -7035,7 +7035,7 @@ void Td::on_request(uint64 id, td_api::setOption &request) {
std::move(promise));
return;
}
if (set_boolean_option("is_location_visible")) {
if (!is_bot && set_boolean_option("is_location_visible")) {
contacts_manager_->set_location_visibility();
return;
}