mirror of
https://github.com/fabianonline/telegram_backup.git
synced 2024-11-22 08:46:15 +00:00
Replace FLOOD_WAIT check with the version used in download messages
This commit is contained in:
parent
004b650762
commit
3911af1f88
@ -316,7 +316,7 @@ class DownloadManager(internal var client: TelegramClient?, p: DownloadProgressI
|
||||
try {
|
||||
_downloadMedia()
|
||||
} catch (e: RpcErrorException) {
|
||||
if (e.getTag().startsWith("420: FLOOD_WAIT_")) {
|
||||
if (e.getCode() == 420) { // FLOOD_WAIT
|
||||
completed = false
|
||||
Utils.obeyFloodWaitException(e)
|
||||
} else {
|
||||
@ -428,7 +428,7 @@ class DownloadManager(internal var client: TelegramClient?, p: DownloadProgressI
|
||||
try {
|
||||
response = download_client!!.executeRpcQuery(req, dcID) as TLFile
|
||||
} catch (e: RpcErrorException) {
|
||||
if (e.getTag().startsWith("420: FLOOD_WAIT_")) {
|
||||
if (e.getCode() == 420) { // FLOOD_WAIT
|
||||
try_again = true
|
||||
Utils.obeyFloodWaitException(e)
|
||||
} else if (e.getCode() == 400) {
|
||||
|
Loading…
Reference in New Issue
Block a user