mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-07-26 07:23:02 +02:00
Added handle of flood errors on requesting to check chat invite.
Fixed #29368.
This commit is contained in:
parent
900ac46583
commit
64df9222dd
2 changed files with 7 additions and 1 deletions
|
@ -437,6 +437,12 @@ void CheckChatInvite(
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, [=](const MTP::Error &error) {
|
}, [=](const MTP::Error &error) {
|
||||||
|
if (MTP::IsFloodError(error)) {
|
||||||
|
if (const auto strong = weak.get()) {
|
||||||
|
strong->show(Ui::MakeInformBox(tr::lng_flood_error()));
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (error.code() != 400) {
|
if (error.code() != 400) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -324,7 +324,7 @@ void ApiWrap::checkChatInvite(
|
||||||
request(base::take(_checkInviteRequestId)).cancel();
|
request(base::take(_checkInviteRequestId)).cancel();
|
||||||
_checkInviteRequestId = request(MTPmessages_CheckChatInvite(
|
_checkInviteRequestId = request(MTPmessages_CheckChatInvite(
|
||||||
MTP_string(hash)
|
MTP_string(hash)
|
||||||
)).done(std::move(done)).fail(std::move(fail)).send();
|
)).done(std::move(done)).fail(std::move(fail)).handleFloodErrors().send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ApiWrap::checkFilterInvite(
|
void ApiWrap::checkFilterInvite(
|
||||||
|
|
Loading…
Add table
Reference in a new issue