Fix on_get_web_page_instant_view.
GitOrigin-RevId: 6325584a6481566bde5202e818ef02301585d16c
This commit is contained in:
parent
9da6ecaf1f
commit
727d0f1c6f
@ -478,9 +478,6 @@ WebPageId WebPagesManager::on_get_web_page(tl_object_ptr<telegram_api::WebPage>
|
||||
page->document = std::move(parsed_document);
|
||||
}
|
||||
}
|
||||
if (web_page->flags_ & WEBPAGE_FLAG_HAS_INSTANT_VIEW) {
|
||||
on_get_web_page_instant_view(page.get(), std::move(web_page->cached_page_), web_page->hash_, owner_dialog_id);
|
||||
}
|
||||
if (web_page->flags_ & WEBPAGE_FLAG_HAS_DOCUMENTS) {
|
||||
for (auto &document : web_page->documents_) {
|
||||
int32 document_id = document->get_id();
|
||||
@ -493,6 +490,9 @@ WebPageId WebPagesManager::on_get_web_page(tl_object_ptr<telegram_api::WebPage>
|
||||
}
|
||||
}
|
||||
}
|
||||
if (web_page->flags_ & WEBPAGE_FLAG_HAS_INSTANT_VIEW) {
|
||||
on_get_web_page_instant_view(page.get(), std::move(web_page->cached_page_), web_page->hash_, owner_dialog_id);
|
||||
}
|
||||
|
||||
update_web_page(std::move(page), web_page_id, false, false);
|
||||
return web_page_id;
|
||||
@ -1265,7 +1265,9 @@ void WebPagesManager::on_get_web_page_instant_view(WebPage *web_page, tl_object_
|
||||
LOG(ERROR) << document.type << " has no remote location";
|
||||
}
|
||||
};
|
||||
add_document(web_page->document);
|
||||
if (!web_page->document.empty()) {
|
||||
add_document(web_page->document);
|
||||
}
|
||||
for (auto &document : web_page->documents) {
|
||||
add_document(document);
|
||||
}
|
||||
|
Reference in New Issue
Block a user