aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
m---------td0
-rw-r--r--telegram-bot-api/Client.cpp19
-rw-r--r--telegram-bot-api/Client.h2
-rw-r--r--telegram-bot-api/ClientManager.cpp2
-rw-r--r--telegram-bot-api/Stats.cpp6
5 files changed, 11 insertions, 18 deletions
diff --git a/td b/td
-Subproject 207f3be7b58b2a2b9f0a066b5b6ef18782b8b51
+Subproject a03a90470d6fca9a5a3db747ba3f3e4a465b5fe
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<td_api::me
return true;
case td_api::messageGiveawayPrizeStars::ID:
return true;
+ case td_api::messagePaidMessagesRefunded::ID:
+ return true;
+ case td_api::messagePaidMessagePriceChanged::ID:
+ return true;
default:
break;
}
@@ -15328,13 +15336,6 @@ td::int64 Client::get_status_custom_emoji_id(const object_ptr<td_api::emojiStatu
}
}
-constexpr Client::int64 Client::GENERAL_MESSAGE_THREAD_ID;
-
-constexpr Client::int64 Client::GREAT_MINDS_SET_ID;
-constexpr td::Slice Client::GREAT_MINDS_SET_NAME;
-
-constexpr td::Slice Client::MASK_POINTS[MASK_POINTS_SIZE];
-
td::FlatHashMap<td::string, td::Status (Client::*)(PromisedQueryPtr &query)> 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<td_api::businessBotRights> rights_;
bool is_enabled_ = false;
};
const BusinessConnection *add_business_connection(object_ptr<td_api::businessConnection> &&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<StatItem> 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