mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-12-24 11:15:50 +01:00
Add field Message.is_automatic_forward.
This commit is contained in:
parent
5491729a3c
commit
824b23afc6
@ -1622,6 +1622,9 @@ void Client::JsonMessage::store(JsonValueScope *scope) const {
|
|||||||
if (!message_->initial_sender_name.empty()) {
|
if (!message_->initial_sender_name.empty()) {
|
||||||
object("forward_sender_name", message_->initial_sender_name);
|
object("forward_sender_name", message_->initial_sender_name);
|
||||||
}
|
}
|
||||||
|
if (message_->is_automatic_forward) {
|
||||||
|
object("is_automatic_forward", td::JsonBool(message_->is_automatic_forward));
|
||||||
|
}
|
||||||
object("forward_date", message_->initial_send_date);
|
object("forward_date", message_->initial_send_date);
|
||||||
}
|
}
|
||||||
if (message_->reply_to_message_id > 0 && need_reply_ && !message_->is_reply_to_message_deleted) {
|
if (message_->reply_to_message_id > 0 && need_reply_ && !message_->is_reply_to_message_deleted) {
|
||||||
@ -9493,6 +9496,9 @@ Client::FullMessageId Client::add_message(object_ptr<td_api::message> &&message,
|
|||||||
default:
|
default:
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
message_info->is_automatic_forward = message_info->initial_chat_id != 0 && message_info->initial_message_id != 0 &&
|
||||||
|
message_info->initial_chat_id == message->forward_info_->from_chat_id_ &&
|
||||||
|
message_info->initial_message_id == message->forward_info_->from_message_id_;
|
||||||
}
|
}
|
||||||
|
|
||||||
message_info->author_signature = std::move(message->author_signature_);
|
message_info->author_signature = std::move(message->author_signature_);
|
||||||
|
@ -671,6 +671,7 @@ class Client : public WebhookActor::Callback {
|
|||||||
object_ptr<td_api::MessageContent> content;
|
object_ptr<td_api::MessageContent> content;
|
||||||
object_ptr<td_api::ReplyMarkup> reply_markup;
|
object_ptr<td_api::ReplyMarkup> reply_markup;
|
||||||
|
|
||||||
|
bool is_automatic_forward = false;
|
||||||
mutable bool is_reply_to_message_deleted = false;
|
mutable bool is_reply_to_message_deleted = false;
|
||||||
mutable bool is_content_changed = false;
|
mutable bool is_content_changed = false;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user