diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index b8509f180..d7f367930 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -1459,6 +1459,12 @@ bankCardInfo title:string actions:vector = BankCardInfo; address country_code:string state:string city:string street_line1:string street_line2:string postal_code:string = Address; +//@description Contains parameters of the app theme @background_color A color of the background in the RGB24 format @text_color A color of text in the RGB24 format +//@hint_color A color of hints in the RGB24 format @link_color A color of links in the RGB24 format @button_color A color of the buttons in the RGB24 format +//@button_text_color A color of text on the buttons in the RGB24 format +themeParameters background_color:int32 text_color:int32 hint_color:int32 link_color:int32 button_color:int32 button_text_color:int32 = ThemeParameters; + + //@description Portion of the price of a product (e.g., "delivery cost", "tax amount") @label Label for this portion of the product price @amount Currency amount in the smallest units of the currency labeledPricePart label:string amount:int53 = LabeledPricePart; @@ -1502,11 +1508,6 @@ inputCredentialsGooglePay data:string = InputCredentials; //@description Stripe payment provider @publishable_key Stripe API publishable key @need_country True, if the user country must be provided @need_postal_code True, if the user ZIP/postal code must be provided @need_cardholder_name True, if the cardholder name must be provided paymentsProviderStripe publishable_key:string need_country:Bool need_postal_code:Bool need_cardholder_name:Bool = PaymentsProviderStripe; -//@description Theme colors for a payment form @background_color A color of the payment form background in the RGB24 format @text_color A color of text in the RGB24 format -//@hint_color A color of hints in the RGB24 format @link_color A color of links in the RGB24 format @button_color A color of the buttons in the RGB24 format -//@button_text_color A color of text on the buttons in the RGB24 format -paymentFormTheme background_color:int32 text_color:int32 hint_color:int32 link_color:int32 button_color:int32 button_text_color:int32 = PaymentFormTheme; - //@description Contains information about an invoice payment form //@id The payment form identifier //@invoice Full information of the invoice @@ -5731,7 +5732,7 @@ getChatEventLog chat_id:int53 query:string from_event_id:int64 limit:int32 filte //@chat_id Chat identifier of the Invoice message //@message_id Message identifier //@theme Preferred payment form theme; pass null to use the default theme -getPaymentForm chat_id:int53 message_id:int53 theme:paymentFormTheme = PaymentForm; +getPaymentForm chat_id:int53 message_id:int53 theme:themeParameters = PaymentForm; //@description Validates the order information provided by a user and returns the available shipping options for a flexible invoice //@chat_id Chat identifier of the Invoice message diff --git a/td/telegram/Payments.cpp b/td/telegram/Payments.cpp index 5636cdc25..fc7844b54 100644 --- a/td/telegram/Payments.cpp +++ b/td/telegram/Payments.cpp @@ -1145,7 +1145,7 @@ void answer_pre_checkout_query(Td *td, int64 pre_checkout_query_id, const string td->create_handler(std::move(promise))->send(pre_checkout_query_id, error_message); } -void get_payment_form(Td *td, FullMessageId full_message_id, const td_api::object_ptr &theme, +void get_payment_form(Td *td, FullMessageId full_message_id, const td_api::object_ptr &theme, Promise> &&promise) { TRY_RESULT_PROMISE(promise, server_message_id, td->messages_manager_->get_invoice_message_id(full_message_id)); diff --git a/td/telegram/Payments.h b/td/telegram/Payments.h index cdb84b3fe..1deb56d81 100644 --- a/td/telegram/Payments.h +++ b/td/telegram/Payments.h @@ -180,7 +180,7 @@ void answer_shipping_query(Td *td, int64 shipping_query_id, void answer_pre_checkout_query(Td *td, int64 pre_checkout_query_id, const string &error_message, Promise &&promise); -void get_payment_form(Td *td, FullMessageId full_message_id, const td_api::object_ptr &theme, +void get_payment_form(Td *td, FullMessageId full_message_id, const td_api::object_ptr &theme, Promise> &&promise); void validate_order_info(Td *td, FullMessageId full_message_id, tl_object_ptr order_info, diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index 5296ab208..d7af3c7e4 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -1983,7 +1983,7 @@ class CliClient final : public Actor { MessageId message_id; get_args(args, chat_id, message_id); send_request(td_api::make_object( - chat_id, message_id, td_api::make_object(0, -1, 256, 65536, 123456789, 65535))); + chat_id, message_id, td_api::make_object(0, -1, 256, 65536, 123456789, 65535))); } else if (op == "voi") { ChatId chat_id; MessageId message_id;