diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index 5d71fef..45d9eb9 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -1091,6 +1091,9 @@ class Client::JsonChat final : public td::Jsonable { if (supergroup_info->location != nullptr) { object("location", JsonChatLocation(supergroup_info->location.get())); } + if (supergroup_info->has_paid_media_allowed && !supergroup_info->is_supergroup) { + object("can_send_paid_media", td::JsonTrue()); + } } photo = supergroup_info->photo.get(); break; @@ -6952,6 +6955,7 @@ void Client::on_update(object_ptr result) { supergroup_info->location = std::move(full_info->location_); supergroup_info->has_hidden_members = full_info->has_hidden_members_; supergroup_info->has_aggressive_anti_spam_enabled = full_info->has_aggressive_anti_spam_enabled_; + supergroup_info->has_paid_media_allowed = full_info->has_paid_media_allowed_; break; } case td_api::updateOption::ID: { diff --git a/telegram-bot-api/Client.h b/telegram-bot-api/Client.h index 2e25de3..7805588 100644 --- a/telegram-bot-api/Client.h +++ b/telegram-bot-api/Client.h @@ -878,6 +878,7 @@ class Client final : public WebhookActor::Callback { bool join_by_request = false; bool has_hidden_members = false; bool has_aggressive_anti_spam_enabled = false; + bool has_paid_media_allowed = false; }; static void add_supergroup(SupergroupInfo *supergroup_info, object_ptr &&supergroup); SupergroupInfo *add_supergroup_info(int64 supergroup_id);