From af5f55b20601f7391559434990a5eba0f9448fa9 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 13 Aug 2024 15:46:37 +0300 Subject: [PATCH] Add subscription information to ChatInviteLink. --- telegram-bot-api/Client.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index 51d9dc4..e02c120 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -887,6 +887,10 @@ class Client::JsonChatInviteLink final : public td::Jsonable { if (chat_invite_link_->pending_join_request_count_ != 0) { object("pending_join_request_count", chat_invite_link_->pending_join_request_count_); } + if (chat_invite_link_->subscription_pricing_ != nullptr) { + object("subscription_period", chat_invite_link_->subscription_pricing_->period_); + object("subscription_price", chat_invite_link_->subscription_pricing_->star_count_); + } object("creates_join_request", td::JsonBool(chat_invite_link_->creates_join_request_)); object("is_primary", td::JsonBool(chat_invite_link_->is_primary_)); object("is_revoked", td::JsonBool(chat_invite_link_->is_revoked_));