Implement incoming confcall window.

This commit is contained in:
John Preston
2025-03-31 11:44:39 +04:00
parent 7c709fddba
commit a3ba99c682
11 changed files with 327 additions and 25 deletions
@@ -881,26 +881,17 @@ void SessionNavigation::resolveConferenceCall(
data.vid().v,
data.vaccess_hash().v);
call->processFullCall(result);
const auto confirmed = std::make_shared<bool>();
const auto join = [=] {
*confirmed = true;
Core::App().calls().startOrJoinConferenceCall({
.call = call,
.linkSlug = slug,
.joinMessageId = inviteMsgId,
});
};
const auto box = uiShow()->show(Box(
uiShow()->show(Box(
Calls::Group::ConferenceCallJoinConfirm,
call,
join));
box->boxClosing() | rpl::start_with_next([=] {
if (inviteMsgId && !*confirmed) {
_api.request(MTPphone_DeclineConferenceCallInvite(
MTP_int(inviteMsgId.bare)
)).send();
}
}, box->lifetime());
if (finished) {
finished(true);
}