mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-05 00:46:08 +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:
@@ -835,7 +835,7 @@ void AppClass::chatPhotoCleared(PeerId peer, const MTPUpdates &updates) {
|
||||
|
||||
void AppClass::selfPhotoDone(const MTPphotos_Photo &result) {
|
||||
if (!App::self()) return;
|
||||
const MTPDphotos_photo &photo(result.c_photos_photo());
|
||||
const auto &photo(result.c_photos_photo());
|
||||
App::feedPhoto(photo.vphoto);
|
||||
App::feedUsers(photo.vusers);
|
||||
cancelPhotoUpdate(App::self()->id);
|
||||
@@ -851,7 +851,7 @@ void AppClass::chatPhotoDone(PeerId peer, const MTPUpdates &updates) {
|
||||
}
|
||||
|
||||
bool AppClass::peerPhotoFail(PeerId peer, const RPCError &error) {
|
||||
if (mtpIsFlood(error)) return false;
|
||||
if (MTP::isDefaultHandledError(error)) return false;
|
||||
|
||||
LOG(("Application Error: update photo failed %1: %2").arg(error.type()).arg(error.description()));
|
||||
cancelPhotoUpdate(peer);
|
||||
|
Reference in New Issue
Block a user