Add starTransaction.is_refund.

This commit is contained in:
levlam 2024-05-28 00:07:10 +03:00
parent 99b3f09f07
commit 969bde99c1
3 changed files with 5 additions and 4 deletions

View File

@ -874,9 +874,10 @@ starTransactionSourceUnsupported = StarTransactionSource;
//@description Represents a transaction changing the amount of owned Telegram stars
//@id Unique identifier of the transaction
//@star_count The amount of added owned Telegram stars; negative for outgoing transactions
//@is_refund True, if the transaction is a refund of a previous transaction
//@date Point in time (Unix timestamp) when the transaction was completed
//@source Source of the transaction, or its recipient for outgoing transactions
starTransaction id:string star_count:int53 date:int32 source:StarTransactionSource = StarTransaction;
starTransaction id:string star_count:int53 is_refund:Bool date:int32 source:StarTransactionSource = StarTransaction;
//@description Represents a list of Telegram star transactions
//@star_count The amount of owned Telegram stars

View File

@ -1827,7 +1827,7 @@ starsTransactionPeer#d80da15d peer:Peer = StarsTransactionPeer;
starsTopupOption#bd915c0 flags:# extended:flags.1?true stars:long store_product:flags.0?string currency:string amount:long = StarsTopupOption;
starsTransaction#cc7079b2 flags:# id:string stars:long date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument = StarsTransaction;
starsTransaction#cc7079b2 flags:# refund:flags.3?true id:string stars:long date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument = StarsTransaction;
payments.starsStatus#8cf4ee60 flags:# balance:long history:Vector<StarsTransaction> next_offset:flags.0?string chats:Vector<Chat> users:Vector<User> = payments.StarsStatus;

View File

@ -712,8 +712,8 @@ class GetStarsTransactionsQuery final : public Td::ResultHandler {
UNREACHABLE();
}
}();
transactions.push_back(td_api::make_object<td_api::starTransaction>(transaction->id_, transaction->stars_,
transaction->date_, std::move(source)));
transactions.push_back(td_api::make_object<td_api::starTransaction>(
transaction->id_, transaction->stars_, transaction->refund_, transaction->date_, std::move(source)));
}
promise_.set_value(