Browse Source

Fixed baseDcID

master
Igor Zhukov 11 years ago
parent
commit
0cbaae7806
  1. 2
      app/index.html
  2. 2
      app/js/lib/mtproto.js

2
app/index.html

@ -33,7 +33,7 @@ @@ -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>

2
app/js/lib/mtproto.js

@ -2244,6 +2244,8 @@ factory('MtpApiManager', function (AppConfigManager, MtpAuthorizer, MtpNetworker @@ -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);

Loading…
Cancel
Save