From ddd1344b65c97ba945b1f95382e39920b0a8b18f Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 7 Mar 2025 17:39:52 +0300 Subject: [PATCH] Add Message.paid_star_count. --- telegram-bot-api/Client.cpp | 10 +++++++--- telegram-bot-api/Client.h | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index 8cca426..1445db2 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -3127,9 +3127,6 @@ void Client::JsonMessage::store(td::JsonValueScope *scope) const { if (!message_->author_signature.empty()) { object("author_signature", message_->author_signature); } - if (message_->sender_boost_count != 0) { - object("sender_boost_count", message_->sender_boost_count); - } if (message_->sender_chat_id != 0) { object("sender_chat", JsonChat(message_->sender_chat_id, client_)); } @@ -3634,6 +3631,12 @@ void Client::JsonMessage::store(td::JsonValueScope *scope) const { if (message_->effect_id != 0) { object("effect_id", td::to_string(message_->effect_id)); } + if (message_->sender_boost_count != 0) { + object("sender_boost_count", message_->sender_boost_count); + } + if (message_->paid_message_star_count != 0) { + object("paid_star_count", message_->paid_message_star_count); + } } class Client::JsonMessageId final : public td::Jsonable { @@ -15080,6 +15083,7 @@ void Client::init_message(MessageInfo *message_info, object_ptr message_info->is_topic_message = message->is_topic_message_; message_info->author_signature = std::move(message->author_signature_); message_info->sender_boost_count = message->sender_boost_count_; + message_info->paid_message_star_count = message->paid_message_star_count_; message_info->effect_id = message->effect_id_; drop_internal_reply_to_message_in_another_chat(message); diff --git a/telegram-bot-api/Client.h b/telegram-bot-api/Client.h index 0ebc0b8..c1e074a 100644 --- a/telegram-bot-api/Client.h +++ b/telegram-bot-api/Client.h @@ -974,6 +974,7 @@ class Client final : public WebhookActor::Callback { int32 edit_date = 0; int32 initial_send_date = 0; int32 sender_boost_count = 0; + int64 paid_message_star_count = 0; object_ptr forward_origin; td::string author_signature; td::unique_ptr business_reply_to_message;