Fixed baseDcID
This commit is contained in:
parent
4d941520e8
commit
0cbaae7806
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<script type="text/javascript" src="js/lib/config.js"></script>
|
<script type="text/javascript" src="js/lib/config.js"></script>
|
||||||
<script type="text/javascript" src="js/lib/mtproto.js?4"></script>
|
<script type="text/javascript" src="js/lib/mtproto.js?5"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="js/util.js"></script>
|
<script type="text/javascript" src="js/util.js"></script>
|
||||||
<script type="text/javascript" src="js/app.js?3"></script>
|
<script type="text/javascript" src="js/app.js?3"></script>
|
||||||
|
@ -2244,6 +2244,8 @@ factory('MtpApiManager', function (AppConfigManager, MtpAuthorizer, MtpNetworker
|
|||||||
else if (error.code == 303) {
|
else if (error.code == 303) {
|
||||||
var newDcID = error.type.match(/^(PHONE_MIGRATE_|NETWORK_MIGRATE_)(\d+)/)[2];
|
var newDcID = error.type.match(/^(PHONE_MIGRATE_|NETWORK_MIGRATE_)(\d+)/)[2];
|
||||||
if (newDcID != dcID) {
|
if (newDcID != dcID) {
|
||||||
|
AppConfigManager.set({dc: baseDcID = dcID});
|
||||||
|
|
||||||
mtpGetNetworker(newDcID).then(function (networker) {
|
mtpGetNetworker(newDcID).then(function (networker) {
|
||||||
networker.wrapApiCall(method, params, options).then(function (result) {
|
networker.wrapApiCall(method, params, options).then(function (result) {
|
||||||
deferred.resolve(result);
|
deferred.resolve(result);
|
||||||
|
Loading…
Reference in New Issue
Block a user