Open links starting with https://telegram.me/ in the same window closes #1042

This commit is contained in:
Ihor Polyakov 2016-01-30 09:56:17 +07:00
parent 5f1f7d7846
commit 89717bca88

View File

@ -4228,7 +4228,11 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
type: 'JUMP_EXT_URL', type: 'JUMP_EXT_URL',
url: url url: url
}).then(function () { }).then(function () {
window.open(url, '_blank'); var target = '_blank';
if (url.search('https://telegram.me/') === 0) {
target = '_self';
}
window.open(url, target);
}); });
return true; return true;
} }