| 460 | } |
| 461 | |
| 462 | void 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 | |
| 485 | void GroupCall::processFullCallUsersChats(const MTPphone_GroupCall &call) { |
| 486 | call.match([&](const MTPDphone_groupCall &data) { |
no test coverage detected