From b4d4d054deaf2a2a70e47035337d9d65892f90ff Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 13 Aug 2024 16:31:10 +0300 Subject: [PATCH] Log if there is unused paid media. --- td/telegram/StarManager.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/td/telegram/StarManager.cpp b/td/telegram/StarManager.cpp index adb22ca63..7184d6173 100644 --- a/td/telegram/StarManager.cpp +++ b/td/telegram/StarManager.cpp @@ -180,7 +180,7 @@ class GetStarsTransactionsQuery final : public Td::ResultHandler { } auto result = result_ptr.move_as_ok(); - LOG(DEBUG) << "Receive result for GetStarsTransactionsQuery: " << to_string(result); + LOG(INFO) << "Receive result for GetStarsTransactionsQuery: " << to_string(result); td_->user_manager_->on_get_users(std::move(result->users_), "GetStarsTransactionsQuery"); td_->chat_manager_->on_get_chats(std::move(result->chats_), "GetStarsTransactionsQuery"); @@ -287,7 +287,7 @@ class GetStarsTransactionsQuery final : public Td::ResultHandler { LOG(ERROR) << "Receive Telegram Star transaction with " << user_id; return td_api::make_object(); } - if (product_info == nullptr && bot_payload.empty()) { + if ((product_info == nullptr && bot_payload.empty()) || !transaction->extended_media_.empty()) { return td_api::make_object( td_->user_manager_->get_user_id_object(user_id, "starTransactionPartnerBot"), td_api::make_object( @@ -376,6 +376,9 @@ class GetStarsTransactionsQuery final : public Td::ResultHandler { if (transaction->reaction_) { LOG(ERROR) << "Receive reaction with " << to_string(star_transaction); } + if (!transaction->extended_media_.empty()) { + LOG(ERROR) << "Receive paid media with " << to_string(star_transaction); + } } if (!file_ids.empty()) { auto file_source_id =