Improve name of starTransactionPartnerBot.
This commit is contained in:
parent
e187c0ac3c
commit
78aae0b3f3
@ -864,11 +864,11 @@ starTransactionPartnerGooglePlay = StarTransactionPartner;
|
||||
//@description The transaction is a transaction with Fragment @withdrawal_state State of the withdrawal; may be null for refunds from Fragment
|
||||
starTransactionPartnerFragment withdrawal_state:RevenueWithdrawalState = StarTransactionPartner;
|
||||
|
||||
//@description The transaction is a transaction with another user
|
||||
//@user_id Identifier of the user
|
||||
//@product_info Information about the bought product; may be null if none
|
||||
//@description The transaction is a transaction with a bot
|
||||
//@bot_user_id Identifier of the bot
|
||||
//@product_info Information about the bought product; may be null if not applicable
|
||||
//@invoice_payload Invoice payload; for bots only
|
||||
starTransactionPartnerUser user_id:int53 product_info:productInfo invoice_payload:bytes = StarTransactionPartner;
|
||||
starTransactionPartnerBot bot_user_id:int53 product_info:productInfo invoice_payload:bytes = StarTransactionPartner;
|
||||
|
||||
//@description The transaction is a transaction with a channel chat @chat_id Identifier of the chat
|
||||
starTransactionPartnerChannel chat_id:int53 = StarTransactionPartner;
|
||||
|
@ -167,17 +167,23 @@ class GetStarsTransactionsQuery final : public Td::ResultHandler {
|
||||
DialogId dialog_id(
|
||||
static_cast<const telegram_api::starsTransactionPeer *>(transaction->peer_.get())->peer_);
|
||||
if (dialog_id.get_type() == DialogType::User) {
|
||||
auto user_id = dialog_id.get_user_id();
|
||||
if (td_->auth_manager_->is_bot() == td_->user_manager_->is_user_bot(user_id)) {
|
||||
LOG(ERROR) << "Receive star transaction with " << user_id;
|
||||
return td_api::make_object<td_api::starTransactionPartnerUnsupported>();
|
||||
}
|
||||
SCOPE_EXIT {
|
||||
bot_payload.clear();
|
||||
};
|
||||
return td_api::make_object<td_api::starTransactionPartnerUser>(
|
||||
td_->user_manager_->get_user_id_object(dialog_id.get_user_id(), "starTransactionPartnerUser"),
|
||||
std::move(product_info), bot_payload);
|
||||
return td_api::make_object<td_api::starTransactionPartnerBot>(
|
||||
td_->user_manager_->get_user_id_object(user_id, "starTransactionPartnerBot"), std::move(product_info),
|
||||
bot_payload);
|
||||
}
|
||||
if (td_->dialog_manager_->is_broadcast_channel(dialog_id)) {
|
||||
return td_api::make_object<td_api::starTransactionPartnerChannel>(
|
||||
td_->dialog_manager_->get_chat_id_object(dialog_id, "starTransactionPartnerChannel"));
|
||||
}
|
||||
LOG(ERROR) << "Receive star transaction with " << dialog_id;
|
||||
return td_api::make_object<td_api::starTransactionPartnerUnsupported>();
|
||||
}
|
||||
case telegram_api::starsTransactionPeerAds::ID: {
|
||||
|
Loading…
Reference in New Issue
Block a user