From f21bc22a79a727bd72820bf201dbd54714b36547 Mon Sep 17 00:00:00 2001 From: Eduard Kuzmenko Date: Thu, 4 Feb 2021 02:11:34 +0200 Subject: [PATCH] Handle FILE_MIGRATE_[0-9] errors --- src/lib/mtproto/apiManager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/mtproto/apiManager.ts b/src/lib/mtproto/apiManager.ts index 7264099e..d1cb3a5b 100644 --- a/src/lib/mtproto/apiManager.ts +++ b/src/lib/mtproto/apiManager.ts @@ -355,7 +355,7 @@ export class ApiManager { this.invokeApi(method, params, options).then(deferred.resolve, rejectPromise); }, rejectPromise); } else if(error.code == 303) { - const newDcId = +error.type.match(/^(PHONE_MIGRATE_|NETWORK_MIGRATE_|USER_MIGRATE_)(\d+)/)[2]; + const newDcId = +error.type.match(/^(PHONE_MIGRATE_|NETWORK_MIGRATE_|USER_MIGRATE_|FILE_MIGRATE_)(\d+)/)[2]; if(newDcId != dcId) { if(options.dcId) { options.dcId = newDcId;