Add starTransaction.product_info.
This commit is contained in:
parent
c4ef2bbf91
commit
95e4a4f6d9
@ -876,7 +876,8 @@ starTransactionSourceUnsupported = StarTransactionSource;
|
|||||||
//@star_count The amount of added owned Telegram stars; negative for outgoing transactions
|
//@star_count The amount of added owned Telegram stars; negative for outgoing transactions
|
||||||
//@date Point in time (Unix timestamp) when the transaction was completed
|
//@date Point in time (Unix timestamp) when the transaction was completed
|
||||||
//@source Source of the transaction, or its recipient for outgoing transactions
|
//@source Source of the transaction, or its recipient for outgoing transactions
|
||||||
starTransaction id:string star_count:int53 date:int32 source:StarTransactionSource = StarTransaction;
|
//@product_info Information about the product; may be null if unknown
|
||||||
|
starTransaction id:string star_count:int53 date:int32 source:StarTransactionSource product_info:productInfo = StarTransaction;
|
||||||
|
|
||||||
//@description Represents a list of Telegram star transactions
|
//@description Represents a list of Telegram star transactions
|
||||||
//@star_count The amount of owned Telegram stars
|
//@star_count The amount of owned Telegram stars
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include "td/telegram/DocumentsManager.h"
|
#include "td/telegram/DocumentsManager.h"
|
||||||
#include "td/telegram/GiveawayParameters.h"
|
#include "td/telegram/GiveawayParameters.h"
|
||||||
#include "td/telegram/Global.h"
|
#include "td/telegram/Global.h"
|
||||||
|
#include "td/telegram/InputInvoice.h"
|
||||||
#include "td/telegram/MessageEntity.h"
|
#include "td/telegram/MessageEntity.h"
|
||||||
#include "td/telegram/MessageId.h"
|
#include "td/telegram/MessageId.h"
|
||||||
#include "td/telegram/MessageSender.h"
|
#include "td/telegram/MessageSender.h"
|
||||||
@ -704,8 +705,13 @@ class GetStarsTransactionsQuery final : public Td::ResultHandler {
|
|||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
}();
|
}();
|
||||||
transactions.push_back(td_api::make_object<td_api::starTransaction>(transaction->id_, transaction->stars_,
|
td_api::object_ptr<td_api::productInfo> product_info;
|
||||||
transaction->date_, std::move(source)));
|
if (!transaction->title_.empty() || !transaction->description_.empty() || transaction->photo_ != nullptr) {
|
||||||
|
auto photo = get_web_document_photo(td_->file_manager_.get(), std::move(transaction->photo_), DialogId());
|
||||||
|
product_info = get_product_info_object(td_, transaction->title_, transaction->description_, photo);
|
||||||
|
}
|
||||||
|
transactions.push_back(td_api::make_object<td_api::starTransaction>(
|
||||||
|
transaction->id_, transaction->stars_, transaction->date_, std::move(source), std::move(product_info)));
|
||||||
}
|
}
|
||||||
|
|
||||||
promise_.set_value(
|
promise_.set_value(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user