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

Method processBotApp

Telegram/SourceFiles/data/data_session.cpp:4482–4501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4480}
4481
4482BotAppData *Session::processBotApp(
4483 PeerId botId,
4484 const MTPBotApp &data) {
4485 return data.match([&](const MTPDbotApp &data) {
4486 const auto result = botApp(data.vid().v);
4487 result->botId = botId;
4488 result->shortName = qs(data.vshort_name());
4489 result->title = qs(data.vtitle());
4490 result->description = qs(data.vdescription());
4491 result->photo = processPhoto(data.vphoto());
4492 result->document = data.vdocument()
4493 ? processDocument(*data.vdocument()).get()
4494 : nullptr;
4495 result->accessHash = data.vaccess_hash().v;
4496 result->hash = data.vhash().v;
4497 return result.get();
4498 }, [](const MTPDbotAppNotModified &) {
4499 return (BotAppData*)nullptr;
4500 });
4501}
4502
4503not_null<PollData*> Session::poll(PollId id) {
4504 auto i = _polls.find(id);

Callers 2

resolveAppMethod · 0.80

Calls 2

qsFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected