Browse Source

Added http checks for im

Closes #575
master
Igor Zhukov 10 years ago
parent
commit
c0458bb563
  1. 5
      app/js/controllers.js

5
app/js/controllers.js

@ -612,8 +612,13 @@ angular.module('myApp.controllers', ['myApp.i18n']) @@ -612,8 +612,13 @@ angular.module('myApp.controllers', ['myApp.i18n'])
}, function (error) {
if (error.code == 401) {
MtpApiManager.logOut()['finally'](function () {
if (location.protocol == 'http:' &&
Config.App.domains.indexOf(location.hostname) != -1) {
location = 'https://web.telegram.org/#/login';
} else {
location.hash = '/login';
AppRuntimeManager.reload();
}
});
error.handled = true;
}

Loading…
Cancel
Save