From 021c305770060c1f121470bd2771a84648fe748e Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 13 Jun 2024 19:22:45 +0300 Subject: [PATCH] Rename ChatRevenueWithdrawalState tp RevenueWithdrawalState. --- td/generate/scheme/td_api.tl | 10 +++++----- td/telegram/StatisticsManager.cpp | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index a5b63773e..20754e7b8 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -6863,18 +6863,18 @@ messageStatistics message_interaction_graph:StatisticalGraph message_reaction_gr storyStatistics story_interaction_graph:StatisticalGraph story_reaction_graph:StatisticalGraph = StoryStatistics; -//@class ChatRevenueWithdrawalState @description Describes state of a chat revenue withdrawal +//@class RevenueWithdrawalState @description Describes state of a revenue withdrawal //@description Withdrawal is pending -chatRevenueWithdrawalStatePending = ChatRevenueWithdrawalState; +revenueWithdrawalStatePending = RevenueWithdrawalState; //@description Withdrawal was completed //@date Point in time (Unix timestamp) when the withdrawal was completed //@url The URL where the withdrawal transaction can be viewed -chatRevenueWithdrawalStateCompleted date:int32 url:string = ChatRevenueWithdrawalState; +revenueWithdrawalStateCompleted date:int32 url:string = RevenueWithdrawalState; //@description Withdrawal has_failed -chatRevenueWithdrawalStateFailed = ChatRevenueWithdrawalState; +revenueWithdrawalStateFailed = RevenueWithdrawalState; //@class ChatRevenueTransactionType @description Describes type of transaction for revenue earned from sponsored messages in a chat @@ -6888,7 +6888,7 @@ chatRevenueTransactionTypeEarnings start_date:int32 end_date:int32 = ChatRevenue //@withdrawal_date Point in time (Unix timestamp) when the earnings withdrawal started //@provider Name of the payment provider //@state State of the withdrawal -chatRevenueTransactionTypeWithdrawal withdrawal_date:int32 provider:string state:ChatRevenueWithdrawalState = ChatRevenueTransactionType; +chatRevenueTransactionTypeWithdrawal withdrawal_date:int32 provider:string state:RevenueWithdrawalState = ChatRevenueTransactionType; //@description Describes a refund for failed withdrawal of earnings //@refund_date Point in time (Unix timestamp) when the transaction was refunded diff --git a/td/telegram/StatisticsManager.cpp b/td/telegram/StatisticsManager.cpp index ec433e144..f405046ad 100644 --- a/td/telegram/StatisticsManager.cpp +++ b/td/telegram/StatisticsManager.cpp @@ -415,18 +415,18 @@ class GetBroadcastRevenueTransactionsQuery final : public Td::ResultHandler { auto transaction = telegram_api::move_object_as(transaction_ptr); amount = get_amount(transaction->amount_, true); - auto state = [&]() -> td_api::object_ptr { + auto state = [&]() -> td_api::object_ptr { if (transaction->transaction_date_ > 0) { - return td_api::make_object(transaction->transaction_date_, + return td_api::make_object(transaction->transaction_date_, transaction->transaction_url_); } if (transaction->pending_) { - return td_api::make_object(); + return td_api::make_object(); } if (!transaction->failed_) { LOG(ERROR) << "Transaction has unknown state"; } - return td_api::make_object(); + return td_api::make_object(); }(); return td_api::make_object( transaction->date_, transaction->provider_, std::move(state));