From 6478c25096ec1113e9617fa347e9acb38402d332 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 13 Aug 2024 16:00:42 +0300 Subject: [PATCH] Support botTransactionPurposePaidMedia. --- telegram-bot-api/Client.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index e02c120..4ce09f9 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -4116,8 +4116,13 @@ class Client::JsonStarTransactionPartner final : public td::Jsonable { } break; } - case td_api::botTransactionPurposePaidMedia::ID: + case td_api::botTransactionPurposePaidMedia::ID: { + auto purpose = static_cast(source_user->purpose_.get()); + object("paid_media", td::json_array(purpose->media_, [client = client_](auto &media) { + return JsonPaidMedia(media.get(), client); + })); break; + } default: UNREACHABLE(); }