From c6a8cf4a3a28f07bff1d2b518514cbfa2c397d70 Mon Sep 17 00:00:00 2001 From: levlam Date: Sun, 30 Mar 2025 08:05:10 +0300 Subject: [PATCH] Update TDLib to 1.8.47. --- td | 2 +- telegram-bot-api/Client.cpp | 19 ++++++++++--------- telegram-bot-api/Client.h | 2 +- telegram-bot-api/ClientManager.cpp | 2 -- telegram-bot-api/Stats.cpp | 6 ------ 5 files changed, 12 insertions(+), 19 deletions(-) diff --git a/td b/td index 207f3be..a03a904 160000 --- a/td +++ b/td @@ -1 +1 @@ -Subproject commit 207f3be7b58b2a2b9f0a066b5b6ef18782b8b517 +Subproject commit a03a90470d6fca9a5a3db747ba3f3e4a465b5fe7 diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index 2d9ae95..5a1af1f 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -3610,6 +3610,10 @@ void Client::JsonMessage::store(td::JsonValueScope *scope) const { object("gift", JsonRefundedUpgradedGiftMessage(content, client_)); break; } + case td_api::messagePaidMessagesRefunded::ID: + break; + case td_api::messagePaidMessagePriceChanged::ID: + break; default: UNREACHABLE(); } @@ -4367,7 +4371,7 @@ class Client::JsonBusinessConnection final : public td::Jsonable { object("user", JsonUser(connection_->user_id_, client_)); object("user_chat_id", connection_->user_chat_id_); object("date", connection_->date_); - object("can_reply", td::JsonBool(connection_->can_reply_)); + object("can_reply", td::JsonBool(connection_->rights_->can_reply_)); object("is_enabled", td::JsonBool(connection_->is_enabled_)); } @@ -13799,7 +13803,7 @@ const Client::BusinessConnection *Client::add_business_connection( connection->user_id_ = business_connection->user_id_; connection->user_chat_id_ = business_connection->user_chat_id_; connection->date_ = business_connection->date_; - connection->can_reply_ = business_connection->can_reply_; + connection->rights_ = std::move(business_connection->rights_); connection->is_enabled_ = business_connection->is_enabled_; return connection.get(); } @@ -14570,6 +14574,10 @@ bool Client::need_skip_update_message(int64 chat_id, const object_ptr Client::methods_; } // namespace telegram_bot_api diff --git a/telegram-bot-api/Client.h b/telegram-bot-api/Client.h index c1e074a..234d78f 100644 --- a/telegram-bot-api/Client.h +++ b/telegram-bot-api/Client.h @@ -1001,7 +1001,7 @@ class Client final : public WebhookActor::Callback { int64 user_id_ = 0; int64 user_chat_id_ = 0; int32 date_ = 0; - bool can_reply_ = false; + object_ptr rights_; bool is_enabled_ = false; }; const BusinessConnection *add_business_connection(object_ptr &&business_connection, diff --git a/telegram-bot-api/ClientManager.cpp b/telegram-bot-api/ClientManager.cpp index 6ec3b51..963f1d2 100644 --- a/telegram-bot-api/ClientManager.cpp +++ b/telegram-bot-api/ClientManager.cpp @@ -590,6 +590,4 @@ void ClientManager::finish_close() { stop(); } -constexpr double ClientManager::WATCHDOG_TIMEOUT; - } // namespace telegram_bot_api diff --git a/telegram-bot-api/Stats.cpp b/telegram-bot-api/Stats.cpp index 564238d..4b3cf90 100644 --- a/telegram-bot-api/Stats.cpp +++ b/telegram-bot-api/Stats.cpp @@ -83,9 +83,6 @@ td::vector ServerCpuStat::as_vector(double now) { return res; } -constexpr int ServerCpuStat::DURATIONS[SIZE]; -constexpr const char *ServerCpuStat::DESCR[SIZE]; - void ServerBotStat::normalize(double duration) { if (duration == 0) { return; @@ -201,7 +198,4 @@ bool BotStatActor::is_active(double now) const { return last_activity_timestamp_ > now - 86400; } -constexpr int BotStatActor::DURATIONS[SIZE]; -constexpr const char *BotStatActor::DESCR[SIZE]; - } // namespace telegram_bot_api