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

Method processWebpage

Telegram/SourceFiles/data/data_session.cpp:3970–3992  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3968}
3969
3970not_null<WebPageData*> Session::processWebpage(const MTPWebPage &data) {
3971 switch (data.type()) {
3972 case mtpc_webPage:
3973 return processWebpage(data.c_webPage());
3974 case mtpc_webPageEmpty: {
3975 const auto result = webpage(data.c_webPageEmpty().vid().v);
3976 result->type = WebPageType::None;
3977 if (result->pendingTill > 0) {
3978 result->pendingTill = 0;
3979 result->failed = 1;
3980 notifyWebPageUpdateDelayed(result);
3981 }
3982 return result;
3983 } break;
3984 case mtpc_webPagePending:
3985 return processWebpage(data.c_webPagePending());
3986 case mtpc_webPageNotModified:
3987 LOG(("API Error: "
3988 "webPageNotModified is unexpected in Session::webpage()."));
3989 return webpage(0);
3990 }
3991 Unexpected("Type in Session::webpage().");
3992}
3993
3994not_null<WebPageData*> Session::processWebpage(const MTPDwebPage &data) {
3995 const auto result = webpage(data.vid().v);

Callers 7

ApplyChangesMethod · 0.80
ApplyPeerCloudDraftFunction · 0.80
PollMediaFromMTPFunction · 0.80
processReceivedPageMethod · 0.80
feedUpdateMethod · 0.80
CreateMediaMethod · 0.80
requestMethod · 0.80

Calls 5

TextWithEntitiesClass · 0.85
FullStoryIdClass · 0.85
WebPageCollageClass · 0.70
QStringClass · 0.50
typeMethod · 0.45

Tested by

no test coverage detected