From 7e950e1b880161d52d46f6dd82c2a1abe829aa5e Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 11 Jun 2024 17:22:50 +0300 Subject: [PATCH] Don't check that on_external_update_message_content doesn't load new messages. --- td/telegram/WebPagesManager.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/td/telegram/WebPagesManager.cpp b/td/telegram/WebPagesManager.cpp index 3ba7f246de8f..6c9b3d788fb5 100644 --- a/td/telegram/WebPagesManager.cpp +++ b/td/telegram/WebPagesManager.cpp @@ -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 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);