Skip to content

Commit

Permalink
Don't check that on_external_update_message_content doesn't load new …
Browse files Browse the repository at this point in the history
…messages.
  • Loading branch information
levlam committed Jun 11, 2024
1 parent 9571515 commit 7e950e1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions td/telegram/WebPagesManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1514,14 +1514,13 @@ void WebPagesManager::on_web_page_changed(WebPageId web_page_id, bool have_web_p
}
}

bool is_ok = (have_web_page ? web_page_messages_[web_page_id].size() == message_full_ids.size()
: web_page_messages_.count(web_page_id) == 0);
if (!is_ok) {
// don't check that on_external_update_message_content doesn't load new messages
if (!have_web_page && web_page_messages_.count(web_page_id) != 0) {
vector<MessageFullId> new_message_full_ids;
for (const auto &message_full_id : web_page_messages_[web_page_id]) {
new_message_full_ids.push_back(message_full_id);
}
LOG_CHECK(is_ok) << have_web_page << ' ' << message_full_ids << ' ' << new_message_full_ids;
LOG(FATAL) << message_full_ids << ' ' << new_message_full_ids;
}
}
auto get_it = pending_get_web_pages_.find(web_page_id);
Expand Down

0 comments on commit 7e950e1

Please sign in to comment.