Move get_product_description_object to InputInvoice.h.
This commit is contained in:
parent
cb01c3022c
commit
fa5dbe4751
@ -8,7 +8,6 @@
|
||||
|
||||
#include "td/telegram/files/FileManager.h"
|
||||
#include "td/telegram/misc.h"
|
||||
#include "td/telegram/Payments.h"
|
||||
#include "td/telegram/PhotoSize.h"
|
||||
#include "td/telegram/Td.h"
|
||||
|
||||
@ -395,4 +394,11 @@ FileId get_input_invoice_thumbnail_file_id(const Td *td, const InputInvoice &inp
|
||||
return input_invoice.extended_media.get_thumbnail_file_id(td);
|
||||
}
|
||||
|
||||
tl_object_ptr<td_api::formattedText> get_product_description_object(const string &description) {
|
||||
FormattedText result;
|
||||
result.text = description;
|
||||
result.entities = find_entities(result.text, true, true);
|
||||
return get_formatted_text_object(result, true, 0);
|
||||
}
|
||||
|
||||
} // namespace td
|
||||
|
@ -99,4 +99,6 @@ FileId get_input_invoice_any_file_id(const InputInvoice &input_invoice);
|
||||
|
||||
FileId get_input_invoice_thumbnail_file_id(const Td *td, const InputInvoice &input_invoice);
|
||||
|
||||
tl_object_ptr<td_api::formattedText> get_product_description_object(const string &description);
|
||||
|
||||
} // namespace td
|
||||
|
@ -6,7 +6,7 @@
|
||||
//
|
||||
#pragma once
|
||||
|
||||
#include "td/telegram/Payments.h"
|
||||
#include "td/telegram/OrderInfo.h"
|
||||
|
||||
#include "td/utils/tl_helpers.h"
|
||||
|
||||
|
@ -33,13 +33,6 @@
|
||||
|
||||
namespace td {
|
||||
|
||||
tl_object_ptr<td_api::formattedText> get_product_description_object(const string &description) {
|
||||
FormattedText result;
|
||||
result.text = description;
|
||||
result.entities = find_entities(result.text, true, true);
|
||||
return get_formatted_text_object(result, true, 0);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
struct InputInvoiceInfo {
|
||||
|
@ -33,8 +33,6 @@ bool operator!=(const ShippingOption &lhs, const ShippingOption &rhs);
|
||||
|
||||
StringBuilder &operator<<(StringBuilder &string_builder, const ShippingOption &shipping_option);
|
||||
|
||||
tl_object_ptr<td_api::formattedText> get_product_description_object(const string &description);
|
||||
|
||||
void answer_shipping_query(Td *td, int64 shipping_query_id,
|
||||
vector<tl_object_ptr<td_api::shippingOption>> &&shipping_options,
|
||||
const string &error_message, Promise<Unit> &&promise);
|
||||
|
Loading…
Reference in New Issue
Block a user