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

Function ParseEntry

Telegram/SourceFiles/api/api_websites.cpp:20–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18namespace {
19
20[[nodiscard]] Websites::Entry ParseEntry(
21 not_null<Data::Session*> owner,
22 const MTPDwebAuthorization &data) {
23 auto result = Websites::Entry{
24 .hash = data.vhash().v,
25 .bot = owner->user(data.vbot_id()),
26 .platform = qs(data.vplatform()),
27 .domain = qs(data.vdomain()),
28 .browser = qs(data.vbrowser()),
29 .ip = qs(data.vip()),
30 .location = qs(data.vregion()),
31 };
32 result.activeTime = data.vdate_active().v
33 ? data.vdate_active().v
34 : data.vdate_created().v;
35 result.active = Authorizations::ActiveDateString(result.activeTime);
36 return result;
37}
38
39} // namespace
40

Callers 1

reloadMethod · 0.70

Calls 2

qsFunction · 0.85
userMethod · 0.45

Tested by

no test coverage detected