MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / ProcessPollMedia

Function ProcessPollMedia

Telegram/SourceFiles/data/data_poll.cpp:27–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25constexpr auto kReloadAfterAutoCloseDelay = crl::time(1000);
26
27void ProcessPollMedia(
28 not_null<Data::Session*> owner,
29 const MTPMessageMedia &media) {
30 media.match([&](const MTPDmessageMediaPhoto &media) {
31 if (const auto photo = media.vphoto()) {
32 photo->match([&](const MTPDphoto &) {
33 owner->processPhoto(*photo);
34 }, [](const auto &) {
35 });
36 }
37 }, [&](const MTPDmessageMediaDocument &media) {
38 if (const auto document = media.vdocument()) {
39 document->match([&](const MTPDdocument &) {
40 owner->processDocument(*document);
41 }, [](const auto &) {
42 });
43 }
44 }, [](const auto &) {
45 });
46}
47
48const PollAnswer *AnswerByOption(
49 const std::vector<PollAnswer> &list,

Callers 2

applyChangesMethod · 0.85
applyResultsMethod · 0.85

Calls 2

processDocumentMethod · 0.80
processPhotoMethod · 0.45

Tested by

no test coverage detected