mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-29 00:39:55 +00:00
Error handling changed, 'auto' keyword used for MTP types.
All errors that lead to MTP request resending by default error handler now can be handled differently. For example inline bot requests are not being resent on 5XX error codes. + extensive use of auto keyword in MTP types handling.
This commit is contained in:
@@ -384,7 +384,7 @@ void ProfileInner::blockDone(bool blocked, const MTPBool &result) {
|
||||
}
|
||||
|
||||
bool ProfileInner::blockFail(const RPCError &error) {
|
||||
if (mtpIsFlood(error)) return false;
|
||||
if (MTP::isDefaultHandledError(error)) return false;
|
||||
|
||||
_blockRequest = 0;
|
||||
return false;
|
||||
@@ -1364,7 +1364,7 @@ void ProfileInner::migrateDone(const MTPUpdates &updates) {
|
||||
}
|
||||
|
||||
bool ProfileInner::migrateFail(const RPCError &error) {
|
||||
if (mtpIsFlood(error)) return false;
|
||||
if (MTP::isDefaultHandledError(error)) return false;
|
||||
Ui::hideLayer();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user