mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-11-27 06:06:47 +01:00
Add version to ClientParameters and log it on launch.
This commit is contained in:
parent
72171e5751
commit
d97045bc06
@ -3996,7 +3996,7 @@ void Client::on_update_authorization_state() {
|
||||
parameters->api_hash_ = parameters_->api_hash_;
|
||||
parameters->system_language_code_ = "en";
|
||||
parameters->device_model_ = "server";
|
||||
parameters->application_version_ = "5.1";
|
||||
parameters->application_version_ = parameters_->version_;
|
||||
parameters->enable_storage_optimizer_ = true;
|
||||
parameters->ignore_file_names_ = true;
|
||||
|
||||
|
@ -59,6 +59,8 @@ struct ClientParameters {
|
||||
td::int32 api_id_ = 0;
|
||||
td::string api_hash_;
|
||||
|
||||
td::string version_;
|
||||
|
||||
td::int32 default_max_webhook_connections_ = 0;
|
||||
td::IPAddress webhook_proxy_ip_address_;
|
||||
|
||||
|
@ -134,6 +134,7 @@ int main(int argc, char *argv[]) {
|
||||
auto start_time = td::Time::now();
|
||||
auto shared_data = std::make_shared<SharedData>();
|
||||
auto parameters = std::make_unique<ClientParameters>();
|
||||
parameters->version_ = "5.1";
|
||||
parameters->shared_data_ = shared_data;
|
||||
parameters->start_time_ = start_time;
|
||||
auto net_query_stats = td::create_net_query_stats();
|
||||
@ -399,7 +400,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
// LOG(WARNING) << "Bot API server with commit " << td::GitInfo::commit() << ' '
|
||||
// << (td::GitInfo::is_dirty() ? "(dirty)" : "") << " started";
|
||||
LOG(WARNING) << "Bot API server started";
|
||||
LOG(WARNING) << "Bot API " << parameters->version_ << " server started";
|
||||
|
||||
const int threads_n = 5; // +3 for Td, one for slow HTTP connections and one for DNS resolving
|
||||
td::ConcurrentScheduler sched;
|
||||
|
Loading…
Reference in New Issue
Block a user