Reregister edited scheduled messages.
GitOrigin-RevId: 72d2f5804fb6fb7dc5e4fb026dd1ef6640ee63f6
This commit is contained in:
parent
63f8828003
commit
24e2dcd590
@ -27281,7 +27281,7 @@ bool MessagesManager::update_message(Dialog *d, Message *old_message, unique_ptr
|
||||
|
||||
if (update_message_content(dialog_id, old_message, std::move(new_message->content), true,
|
||||
message_id.is_yet_unsent() && new_message->edit_date == 0,
|
||||
!is_scheduled && get_message(d, message_id) != nullptr)) {
|
||||
get_message(d, message_id) != nullptr)) {
|
||||
need_send_update = true;
|
||||
}
|
||||
|
||||
@ -27311,10 +27311,6 @@ bool MessagesManager::update_message_content(DialogId dialog_id, Message *old_me
|
||||
unique_ptr<MessageContent> new_content,
|
||||
bool need_send_update_message_content, bool need_merge_files,
|
||||
bool is_message_in_dialog) {
|
||||
if (old_message->message_id.is_scheduled()) {
|
||||
is_message_in_dialog = false;
|
||||
}
|
||||
|
||||
bool is_content_changed = false;
|
||||
bool need_update = false;
|
||||
unique_ptr<MessageContent> &old_content = old_message->content;
|
||||
|
@ -580,7 +580,7 @@ void PollManager::register_poll(PollId poll_id, FullMessageId full_message_id, c
|
||||
}
|
||||
LOG(INFO) << "Register " << poll_id << " from " << full_message_id << " from " << source;
|
||||
bool is_inserted = poll_messages_[poll_id].insert(full_message_id).second;
|
||||
LOG_CHECK(is_inserted) << source << " " << poll_id << full_message_id;
|
||||
LOG_CHECK(is_inserted) << source << " " << poll_id << " " << full_message_id;
|
||||
if (!td_->auth_manager_->is_bot() && !is_local_poll_id(poll_id) && !get_poll_is_closed(poll_id)) {
|
||||
update_poll_timeout_.add_timeout_in(poll_id.get(), 0);
|
||||
}
|
||||
@ -597,7 +597,7 @@ void PollManager::unregister_poll(PollId poll_id, FullMessageId full_message_id,
|
||||
LOG(INFO) << "Unregister " << poll_id << " from " << full_message_id << " from " << source;
|
||||
auto &message_ids = poll_messages_[poll_id];
|
||||
auto is_deleted = message_ids.erase(full_message_id);
|
||||
LOG_CHECK(is_deleted) << source << " " << poll_id << full_message_id;
|
||||
LOG_CHECK(is_deleted) << source << " " << poll_id << " " << full_message_id;
|
||||
if (message_ids.empty()) {
|
||||
poll_messages_.erase(poll_id);
|
||||
update_poll_timeout_.cancel_timeout(poll_id.get());
|
||||
|
@ -657,7 +657,7 @@ void WebPagesManager::register_web_page(WebPageId web_page_id, FullMessageId ful
|
||||
|
||||
LOG(INFO) << "Register " << web_page_id << " from " << full_message_id << " from " << source;
|
||||
bool is_inserted = web_page_messages_[web_page_id].insert(full_message_id).second;
|
||||
LOG_CHECK(is_inserted) << source << " " << web_page_id << full_message_id;
|
||||
LOG_CHECK(is_inserted) << source << " " << web_page_id << " " << full_message_id;
|
||||
|
||||
if (!td_->auth_manager_->is_bot() && !have_web_page_force(web_page_id)) {
|
||||
LOG(INFO) << "Waiting for " << web_page_id << " needed in " << full_message_id;
|
||||
@ -673,7 +673,7 @@ void WebPagesManager::unregister_web_page(WebPageId web_page_id, FullMessageId f
|
||||
LOG(INFO) << "Unregister " << web_page_id << " from " << full_message_id << " from " << source;
|
||||
auto &message_ids = web_page_messages_[web_page_id];
|
||||
auto is_deleted = message_ids.erase(full_message_id);
|
||||
LOG_CHECK(is_deleted) << source << " " << web_page_id << full_message_id;
|
||||
LOG_CHECK(is_deleted) << source << " " << web_page_id << " " << full_message_id;
|
||||
|
||||
if (message_ids.empty()) {
|
||||
web_page_messages_.erase(web_page_id);
|
||||
|
Loading…
Reference in New Issue
Block a user