mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-11-23 12:16:48 +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_);
|
auto source_user = static_cast<const td_api::starTransactionPartnerBot *>(source_);
|
||||||
object("type", "user");
|
object("type", "user");
|
||||||
object("user", JsonUser(source_user->bot_user_id_, client_));
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case td_api::starTransactionPartnerTelegramAds::ID:
|
case td_api::starTransactionPartnerTelegramAds::ID:
|
||||||
|
Loading…
Reference in New Issue
Block a user