Fix file references in webpage collages.

This commit is contained in:
John Preston 2019-11-29 12:09:15 +03:00
parent ae98e4ae44
commit b3a255b3f1

View File

@ -33,6 +33,12 @@ struct FileReferenceAccumulator {
}, [](const MTPDdocumentEmpty &data) { }, [](const MTPDdocumentEmpty &data) {
}); });
} }
void push(const MTPPage &data) {
data.match([&](const auto &data) {
push(data.vphotos());
push(data.vdocuments());
});
}
void push(const MTPWallPaper &data) { void push(const MTPWallPaper &data) {
data.match([&](const MTPDwallPaper &data) { data.match([&](const MTPDwallPaper &data) {
push(data.vdocument()); push(data.vdocument());
@ -57,6 +63,9 @@ struct FileReferenceAccumulator {
if (const auto photo = data.vphoto()) { if (const auto photo = data.vphoto()) {
push(*photo); push(*photo);
} }
if (const auto page = data.vcached_page()) {
push(*page);
}
}, [](const auto &data) { }, [](const auto &data) {
}); });
} }