2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Added MEDIA_NEW_INVALID error handler. Disabled edit media with webp.

This commit is contained in:
23rd
2019-04-02 19:24:34 +03:00
parent 92f95fa9eb
commit 84858b8940
2 changed files with 26 additions and 3 deletions

View File

@@ -4644,7 +4644,8 @@ void ApiWrap::editUploadedPhoto(
applyUpdates(result);
}).fail([=](const RPCError &error) {
QString err = error.type();
if (err == qstr("MESSAGE_NOT_MODIFIED")) {
if (err == qstr("MESSAGE_NOT_MODIFIED")
|| err == qstr("MEDIA_NEW_INVALID")) {
item->returnSavedMedia();
_session->data().sendHistoryChangeNotifications();
} else {
@@ -4707,7 +4708,8 @@ void ApiWrap::editUploadedDocument(
applyUpdates(result);
}).fail([=](const RPCError &error) {
QString err = error.type();
if (err == qstr("MESSAGE_NOT_MODIFIED")) {
if (err == qstr("MESSAGE_NOT_MODIFIED")
|| err == qstr("MEDIA_NEW_INVALID")) {
item->returnSavedMedia();
_session->data().sendHistoryChangeNotifications();
} else {