diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index 3d71905..a895d2a 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -1629,7 +1629,7 @@ void Client::JsonMessage::store(JsonValueScope *scope) const { object("forward_sender_name", message_->initial_sender_name); } if (message_->is_automatic_forward) { - object("is_automatic_forward", td::JsonBool(message_->is_automatic_forward)); + object("is_automatic_forward", td::JsonTrue()); } object("forward_date", message_->initial_send_date); } @@ -1923,6 +1923,9 @@ void Client::JsonMessage::store(JsonValueScope *scope) const { if (message_->via_bot_user_id > 0) { object("via_bot", JsonUser(message_->via_bot_user_id, client_)); } + if (!message_->can_be_saved) { + object("has_protected_content", td::JsonTrue()); + } } class Client::JsonDeletedMessage : public Jsonable { @@ -9512,6 +9515,7 @@ Client::FullMessageId Client::add_message(object_ptr &&message, message_info->initial_message_id == message->forward_info_->from_message_id_; } + message_info->can_be_saved = message->can_be_saved_; message_info->author_signature = std::move(message->author_signature_); if (message->reply_in_chat_id_ != chat_id && message->reply_to_message_id_ != 0) { diff --git a/telegram-bot-api/Client.h b/telegram-bot-api/Client.h index b35c423..d559a82 100644 --- a/telegram-bot-api/Client.h +++ b/telegram-bot-api/Client.h @@ -671,6 +671,7 @@ class Client : public WebhookActor::Callback { object_ptr content; object_ptr reply_markup; + bool can_be_saved = false; bool is_automatic_forward = false; mutable bool is_reply_to_message_deleted = false; mutable bool is_content_changed = false;