mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-12-27 13:15:52 +01:00
Add invoice_payload to "user" transaction partner.
This commit is contained in:
parent
76006f4a2e
commit
546777ab24
@ -3980,6 +3980,14 @@ class Client::JsonStarTransactionPartner final : public td::Jsonable {
|
||||
auto source_user = static_cast<const td_api::starTransactionPartnerBot *>(source_);
|
||||
object("type", "user");
|
||||
object("user", JsonUser(source_user->bot_user_id_, client_));
|
||||
if (!source_user->invoice_payload_.empty()) {
|
||||
if (!td::check_utf8(source_user->invoice_payload_)) {
|
||||
LOG(WARNING) << "Receive non-UTF-8 invoice payload";
|
||||
object("invoice_payload", td::JsonRawString(source_user->invoice_payload_));
|
||||
} else {
|
||||
object("invoice_payload", source_user->invoice_payload_);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case td_api::starTransactionPartnerTelegramAds::ID:
|
||||
|
Loading…
Reference in New Issue
Block a user