From b3a255b3f1bffa2ed003954d517568f10f6ec706 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 29 Nov 2019 12:09:15 +0300 Subject: [PATCH] Fix file references in webpage collages. --- Telegram/SourceFiles/data/data_file_origin.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Telegram/SourceFiles/data/data_file_origin.cpp b/Telegram/SourceFiles/data/data_file_origin.cpp index b2932a5b9e..05ccf3f5ec 100644 --- a/Telegram/SourceFiles/data/data_file_origin.cpp +++ b/Telegram/SourceFiles/data/data_file_origin.cpp @@ -33,6 +33,12 @@ struct FileReferenceAccumulator { }, [](const MTPDdocumentEmpty &data) { }); } + void push(const MTPPage &data) { + data.match([&](const auto &data) { + push(data.vphotos()); + push(data.vdocuments()); + }); + } void push(const MTPWallPaper &data) { data.match([&](const MTPDwallPaper &data) { push(data.vdocument()); @@ -57,6 +63,9 @@ struct FileReferenceAccumulator { if (const auto photo = data.vphoto()) { push(*photo); } + if (const auto page = data.vcached_page()) { + push(*page); + } }, [](const auto &data) { }); }