mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 06:35:14 +00:00
Request one participants slice on voice chat reload.
This commit is contained in:
@@ -190,27 +190,37 @@ void SessionNavigation::showPeerByLinkResolved(
|
||||
MTPchannels_GetFullChannel(peer->asChannel()->inputChannel)
|
||||
).done([=](const MTPmessages_ChatFull &result) {
|
||||
_session->api().processFullPeer(peer, result);
|
||||
if (const auto call = peer->groupCall()) {
|
||||
const auto id = call->id();
|
||||
_resolveRequestId = _session->api().request(
|
||||
MTPphone_GetGroupCall(call->input())
|
||||
).done([=](const MTPphone_GroupCall &result) {
|
||||
if (const auto now = peer->groupCall()
|
||||
; now && now->id() == id) {
|
||||
now->processFullCall(result);
|
||||
parentController()->startOrJoinGroupCall(
|
||||
peer,
|
||||
hash,
|
||||
SessionController::GroupCallJoinConfirm::Always);
|
||||
} else {
|
||||
bad();
|
||||
}
|
||||
}).fail([=](const MTP::Error &error) {
|
||||
bad();
|
||||
}).send();
|
||||
} else {
|
||||
const auto call = peer->groupCall();
|
||||
if (!call) {
|
||||
bad();
|
||||
return;
|
||||
}
|
||||
const auto join = [=] {
|
||||
parentController()->startOrJoinGroupCall(
|
||||
peer,
|
||||
hash,
|
||||
SessionController::GroupCallJoinConfirm::Always);
|
||||
};
|
||||
if (call->loaded()) {
|
||||
join();
|
||||
return;
|
||||
}
|
||||
const auto id = call->id();
|
||||
_resolveRequestId = _session->api().request(
|
||||
MTPphone_GetGroupCall(call->input())
|
||||
).done([=](const MTPphone_GroupCall &result) {
|
||||
if (const auto now = peer->groupCall()
|
||||
; now && now->id() == id) {
|
||||
if (!now->loaded()) {
|
||||
now->processFullCall(result);
|
||||
}
|
||||
join();
|
||||
} else {
|
||||
bad();
|
||||
}
|
||||
}).fail([=](const MTP::Error &error) {
|
||||
bad();
|
||||
}).send();
|
||||
}).send();
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user