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

Method discard

Telegram/SourceFiles/data/data_group_call.cpp:462–483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462void GroupCall::discard(const MTPDgroupCallDiscarded &data) {
463 const auto id = _id;
464 const auto peer = _peer;
465 crl::on_main(&peer->session(), [=] {
466 if (peer->groupCall() && peer->groupCall()->id() == id) {
467 if (const auto chat = peer->asChat()) {
468 chat->clearGroupCall();
469 } else if (const auto channel = peer->asChannel()) {
470 channel->clearGroupCall();
471 }
472 }
473 });
474 Core::App().calls().applyGroupCallUpdateChecked(
475 &peer->session(),
476 MTP_updateGroupCall(
477 MTP_flags(MTPDupdateGroupCall::Flag::f_peer),
478 peerToMTP(peer->id),
479 MTP_groupCallDiscarded(
480 data.vid(),
481 data.vaccess_hash(),
482 data.vduration())));
483}
484
485void GroupCall::processFullCallUsersChats(const MTPphone_GroupCall &call) {
486 call.match([&](const MTPDphone_groupCall &data) {

Callers 1

~ChatWidgetMethod · 0.45

Calls 10

AppClass · 0.85
MTP_flagsFunction · 0.85
peerToMTPFunction · 0.85
asChatMethod · 0.80
asChannelMethod · 0.80
sessionMethod · 0.45
groupCallMethod · 0.45
idMethod · 0.45
clearGroupCallMethod · 0.45

Tested by

no test coverage detected