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

Method showRichMessage

Telegram/SourceFiles/iv/iv_instance.cpp:1347–1370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1345}
1346
1347void Instance::showRichMessage(
1348 not_null<Window::SessionController*> controller,
1349 not_null<HistoryItem*> item,
1350 QString initialFragment) {
1351 const auto weak = base::make_weak(controller);
1352 const auto itemId = item->fullId();
1353 resolveRichMessage(controller, item, [=](std::shared_ptr<const RichPage> page) {
1354 const auto strong = weak.get();
1355 const auto current = strong
1356 ? strong->session().data().message(itemId)
1357 : nullptr;
1358 if (!page || !current) {
1359 if (strong && !page) {
1360 Ui::Toast::Show(tr::lng_iv_not_supported(tr::now));
1361 }
1362 return;
1363 }
1364 showRichMessage(
1365 not_null{ strong },
1366 not_null{ current },
1367 std::move(page),
1368 initialFragment);
1369 });
1370}
1371
1372void Instance::showRichMessage(
1373 not_null<Window::SessionController*> controller,

Calls 15

AppClass · 0.85
RichMessageKeyFunction · 0.85
OpenRichMessageChannelFunction · 0.85
JoinRichMessageChannelFunction · 0.85
PreparedContentHasAnchorFunction · 0.85
RichMessagePageIdFunction · 0.85
ActivateRichMessageMediaFunction · 0.85
CanShareMarkdownItemFunction · 0.85
FastShareMessageFunction · 0.85
MakeSessionShowFunction · 0.85

Tested by

no test coverage detected