Support td_api::botTransactionPurposePaidMedia.

This commit is contained in:
levlam 2024-08-12 21:12:54 +03:00
parent fbe56eb0a5
commit 5f659c9b8c

View File

@ -282,6 +282,12 @@ class GetStarsTransactionsQuery final : public Td::ResultHandler {
LOG(ERROR) << "Receive Telegram Star transaction with " << user_id;
return td_api::make_object<td_api::starTransactionPartnerUnsupported>();
}
if (product_info == nullptr && bot_payload.empty()) {
return td_api::make_object<td_api::starTransactionPartnerBot>(
td_->user_manager_->get_user_id_object(user_id, "starTransactionPartnerBot"),
td_api::make_object<td_api::botTransactionPurposePaidMedia>(
get_paid_media_objects(DialogId(user_id))));
}
SCOPE_EXIT {
bot_payload.clear();
};