mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Handle MSG_VOICE_TOO_LONG for voice messages.
This commit is contained in:
@@ -78,12 +78,14 @@ void Transcribes::load(not_null<HistoryItem*> item) {
|
||||
_session->data().requestItemResize(item);
|
||||
}
|
||||
});
|
||||
}).fail([=] {
|
||||
}).fail([=](const MTP::Error &error) {
|
||||
auto &entry = _map[id];
|
||||
entry.requestId = 0;
|
||||
entry.pending = false;
|
||||
entry.failed = true;
|
||||
if (const auto item = _session->data().message(id)) {
|
||||
if (error.type() == qstr("MSG_VOICE_TOO_LONG")) {
|
||||
entry.toolong = true;
|
||||
} else if (const auto item = _session->data().message(id)) {
|
||||
_session->data().requestItemResize(item);
|
||||
}
|
||||
}).send();
|
||||
|
@@ -25,6 +25,7 @@ public:
|
||||
QString result;
|
||||
bool shown = false;
|
||||
bool failed = false;
|
||||
bool toolong = false;
|
||||
bool pending = false;
|
||||
mtpRequestId requestId = 0;
|
||||
};
|
||||
|
Reference in New Issue
Block a user