Save is_from_scheduled Message flag.
GitOrigin-RevId: 6db9c1a244f275372fddd74977fdce37e8ffad35
This commit is contained in:
parent
c94b54f7f5
commit
2a335089f9
@ -3827,6 +3827,7 @@ void MessagesManager::Message::store(StorerT &storer) const {
|
|||||||
STORE_FLAG(has_legacy_layer);
|
STORE_FLAG(has_legacy_layer);
|
||||||
STORE_FLAG(hide_edit_date);
|
STORE_FLAG(hide_edit_date);
|
||||||
STORE_FLAG(has_restriction_reasons);
|
STORE_FLAG(has_restriction_reasons);
|
||||||
|
STORE_FLAG(is_from_scheduled);
|
||||||
END_STORE_FLAGS();
|
END_STORE_FLAGS();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3979,6 +3980,7 @@ void MessagesManager::Message::parse(ParserT &parser) {
|
|||||||
PARSE_FLAG(has_legacy_layer);
|
PARSE_FLAG(has_legacy_layer);
|
||||||
PARSE_FLAG(hide_edit_date);
|
PARSE_FLAG(hide_edit_date);
|
||||||
PARSE_FLAG(has_restriction_reasons);
|
PARSE_FLAG(has_restriction_reasons);
|
||||||
|
PARSE_FLAG(is_from_scheduled);
|
||||||
END_PARSE_FLAGS();
|
END_PARSE_FLAGS();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -10578,6 +10580,7 @@ std::pair<DialogId, unique_ptr<MessagesManager::Message>> MessagesManager::creat
|
|||||||
bool is_channel_post = (flags & MESSAGE_FLAG_IS_POST) != 0;
|
bool is_channel_post = (flags & MESSAGE_FLAG_IS_POST) != 0;
|
||||||
bool is_legacy = (flags & MESSAGE_FLAG_IS_LEGACY) != 0;
|
bool is_legacy = (flags & MESSAGE_FLAG_IS_LEGACY) != 0;
|
||||||
bool hide_edit_date = (flags & MESSAGE_FLAG_HIDE_EDIT_DATE) != 0;
|
bool hide_edit_date = (flags & MESSAGE_FLAG_HIDE_EDIT_DATE) != 0;
|
||||||
|
bool is_from_scheduled = (flags & MESSAGE_FLAG_IS_FROM_SCHEDULED) != 0;
|
||||||
|
|
||||||
LOG_IF(ERROR, is_channel_message && dialog_type != DialogType::Channel)
|
LOG_IF(ERROR, is_channel_message && dialog_type != DialogType::Channel)
|
||||||
<< "is_channel_message is true for message received in the " << dialog_id;
|
<< "is_channel_message is true for message received in the " << dialog_id;
|
||||||
@ -10677,6 +10680,7 @@ std::pair<DialogId, unique_ptr<MessagesManager::Message>> MessagesManager::creat
|
|||||||
message->disable_notification = is_silent;
|
message->disable_notification = is_silent;
|
||||||
message->is_content_secret = is_content_secret;
|
message->is_content_secret = is_content_secret;
|
||||||
message->hide_edit_date = hide_edit_date;
|
message->hide_edit_date = hide_edit_date;
|
||||||
|
message->is_from_scheduled = is_from_scheduled;
|
||||||
message->views = views;
|
message->views = views;
|
||||||
message->legacy_layer = (is_legacy ? MTPROTO_LAYER : 0);
|
message->legacy_layer = (is_legacy ? MTPROTO_LAYER : 0);
|
||||||
message->content = std::move(message_info.content);
|
message->content = std::move(message_info.content);
|
||||||
@ -25520,6 +25524,9 @@ bool MessagesManager::update_message(Dialog *d, unique_ptr<Message> &old_message
|
|||||||
need_send_update = true;
|
need_send_update = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (old_message->is_from_scheduled != new_message->is_from_scheduled) {
|
||||||
|
old_message->is_from_scheduled = new_message->is_from_scheduled;
|
||||||
|
}
|
||||||
|
|
||||||
if (old_message->edit_date > 0) {
|
if (old_message->edit_date > 0) {
|
||||||
// inline keyboard can be edited
|
// inline keyboard can be edited
|
||||||
|
@ -915,6 +915,7 @@ class MessagesManager : public Actor {
|
|||||||
bool had_forward_info = false;
|
bool had_forward_info = false;
|
||||||
bool is_content_secret = false; // should be shown only while tapped
|
bool is_content_secret = false; // should be shown only while tapped
|
||||||
bool is_mention_notification_disabled = false;
|
bool is_mention_notification_disabled = false;
|
||||||
|
bool is_from_scheduled = false;
|
||||||
|
|
||||||
bool from_background = false; // for send_message
|
bool from_background = false; // for send_message
|
||||||
bool disable_web_page_preview = false; // for send_message
|
bool disable_web_page_preview = false; // for send_message
|
||||||
|
Loading…
Reference in New Issue
Block a user