From 096f0660248cf9b07837422e7066f2c0744a12a6 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 14 Nov 2023 13:00:27 +0300 Subject: [PATCH] Add Message.quote and Message.quote_entities. --- telegram-bot-api/Client.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index 32841e4..121f971 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -2272,6 +2272,12 @@ void Client::JsonMessage::store(td::JsonValueScope *scope) const { if (message_->reply_to_message != nullptr && message_->reply_to_message->origin_ != nullptr) { object("external_reply", JsonExternalReplyInfo(message_->reply_to_message.get(), client_)); } + if (message_->reply_to_message != nullptr && message_->reply_to_message->quote_ != nullptr) { + object("quote", message_->reply_to_message->quote_->text_); + if (!message_->reply_to_message->quote_->entities_.empty()) { + object("quote_entities", JsonVectorEntities(message_->reply_to_message->quote_->entities_, client_)); + } + } if (message_->media_album_id != 0) { object("media_group_id", td::to_string(message_->media_album_id)); }