From 9620d43700c32fe3b9bbdb49a1486351e343bb6d Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 4 Dec 2023 14:31:45 +0300 Subject: [PATCH] Support quote position in reply parameters. --- telegram-bot-api/Client.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index d41e4b3..624d208 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -6077,12 +6077,13 @@ td::Result Client::get_reply_parameters(td::JsonVa TRY_RESULT(parse_mode, object.get_optional_string_field("quote_parse_mode")); TRY_RESULT(quote, get_formatted_text(std::move(input_quote), std::move(parse_mode), object.extract_field("quote_entities"))); + TRY_RESULT(quote_position, object.get_optional_int_field("quote_position")); InputReplyParameters result; result.reply_in_chat_id = std::move(chat_id); result.reply_to_message_id = as_tdlib_message_id(td::max(message_id, 0)); result.allow_sending_without_reply = allow_sending_without_reply; - result.quote = td_api::make_object(std::move(quote), 0); + result.quote = td_api::make_object(std::move(quote), quote_position); return std::move(result); }