Handle getGroupCallStreamChannels errors.

This commit is contained in:
John Preston 2022-02-28 13:19:04 +03:00
parent e109b9e279
commit e7b5ab56e0

View file

@ -2601,8 +2601,17 @@ void GroupCall::requestCurrentTimeStart(
finish(0); finish(0);
} }
}); });
}).fail([=] { }).fail([=](const MTP::Error &error) {
finish(0); 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( }).handleAllErrors().toDC(
MTP::groupCallStreamDcId(_broadcastDcId) MTP::groupCallStreamDcId(_broadcastDcId)
).send(); ).send();