Handle getGroupCallStreamChannels errors.

This commit is contained in:
John Preston 2022-02-28 13:19:04 +03:00
parent e109b9e279
commit e7b5ab56e0
1 changed files with 10 additions and 1 deletions

View File

@ -2601,8 +2601,17 @@ void GroupCall::requestCurrentTimeStart(
finish(0);
}
});
}).fail([=] {
}).fail([=](const MTP::Error &error) {
finish(0);
if (error.type() == u"GROUPCALL_JOIN_MISSING"_q
|| error.type() == u"GROUPCALL_FORBIDDEN"_q) {
for (const auto &[task, part] : _broadcastParts) {
_api.request(part.requestId).cancel();
}
setState(State::Joining);
rejoin();
}
}).handleAllErrors().toDC(
MTP::groupCallStreamDcId(_broadcastDcId)
).send();