Fixed baseDcID

This commit is contained in:
Igor Zhukov 2014-01-22 10:23:22 +04:00
parent 4d941520e8
commit 0cbaae7806
2 changed files with 3 additions and 1 deletions

View File

@ -33,7 +33,7 @@
<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/app.js?3"></script>

View File

@ -2244,6 +2244,8 @@ factory('MtpApiManager', function (AppConfigManager, MtpAuthorizer, MtpNetworker
else if (error.code == 303) {
var newDcID = error.type.match(/^(PHONE_MIGRATE_|NETWORK_MIGRATE_)(\d+)/)[2];
if (newDcID != dcID) {
AppConfigManager.set({dc: baseDcID = dcID});
mtpGetNetworker(newDcID).then(function (networker) {
networker.wrapApiCall(method, params, options).then(function (result) {
deferred.resolve(result);