2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Update API scheme.

This commit is contained in:
John Preston
2020-11-26 14:04:00 +03:00
parent 0537d4c199
commit 858ee0e8c4
5 changed files with 18 additions and 14 deletions

View File

@@ -205,14 +205,15 @@ void GroupCall::finish(FinishType type) {
|| state == State::Failed) {
return;
}
if (!joined()) {
if (!_mySsrc) {
setState(finalState);
return;
}
setState(hangupState);
_api.request(MTPphone_LeaveGroupCall(
inputCall()
inputCall(),
MTP_int(_mySsrc)
)).done([=](const MTPUpdates &result) {
// Here 'this' could be destroyed by updates, so we set Ended after
// updates being handled, but in a guarded way.