mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-11-27 14:16:49 +01:00
Add field Message.has_protected_content.
This commit is contained in:
parent
f7e38e273c
commit
5d118ebf6b
@ -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<td_api::message> &&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) {
|
||||
|
@ -671,6 +671,7 @@ class Client : public WebhookActor::Callback {
|
||||
object_ptr<td_api::MessageContent> content;
|
||||
object_ptr<td_api::ReplyMarkup> 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;
|
||||
|
Loading…
Reference in New Issue
Block a user