Fix get_web_page_file_ids.

GitOrigin-RevId: cb8c7067a05e1136ae8588df3aee5e3327de00c3
This commit is contained in:
levlam 2019-02-07 21:05:40 +03:00
parent caf713367c
commit d03c74e9f7

View File

@ -3743,6 +3743,11 @@ void WebPagesManager::append_rich_text_file_ids(const RichText &rich_text, vecto
if (rich_text.type == RichText::Type::Icon) { if (rich_text.type == RichText::Type::Icon) {
CHECK(rich_text.document_file_id.is_valid()); CHECK(rich_text.document_file_id.is_valid());
file_ids.push_back(rich_text.document_file_id); file_ids.push_back(rich_text.document_file_id);
auto thumbnail_file_id =
G()->td().get_actor_unsafe()->documents_manager_->get_document_thumbnail_file_id(rich_text.document_file_id);
if (thumbnail_file_id.is_valid()) {
file_ids.push_back(thumbnail_file_id);
}
} else { } else {
for (auto &text : rich_text.texts) { for (auto &text : rich_text.texts) {
append_rich_text_file_ids(text, file_ids); append_rich_text_file_ids(text, file_ids);