parent
5b049aff59
commit
375379be6e
@ -1590,7 +1590,10 @@ angular.module('izhukov.utils', [])
|
||||
url = 'tg://addstickers?set=' + path[1];
|
||||
break;
|
||||
default:
|
||||
if (!path[1]) {
|
||||
if (path[1] && path[1].match(/^\d+$/)) {
|
||||
url = 'tg://resolve?domain=' + path[0] + '&post=' + path[1];
|
||||
}
|
||||
else if (!path[1]) {
|
||||
var domainQuery = path[0].split('?');
|
||||
url = 'tg://resolve?domain=' + domainQuery[0] + (domainQuery[1] ? '&' + domainQuery[1] : '');
|
||||
}
|
||||
|
@ -3077,6 +3077,7 @@ angular.module('myApp.services')
|
||||
openChatInviteLink: openChatInviteLink,
|
||||
convertMigratedPeer: convertMigratedPeer,
|
||||
getMessagePeer: getMessagePeer,
|
||||
getFullMessageID: getFullMessageID,
|
||||
getMessageThumb: getMessageThumb,
|
||||
clearDialogCache: clearDialogCache,
|
||||
wrapForDialog: wrapForDialog,
|
||||
|
@ -4231,7 +4231,7 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
||||
function handleTgProtoAddr (url, inner) {
|
||||
var matches;
|
||||
|
||||
if (matches = url.match(/^resolve\?domain=(.+?)(?:&(start|startgroup)=(.+))?$/)) {
|
||||
if (matches = url.match(/^resolve\?domain=(.+?)(?:&(start|startgroup|post)=(.+))?$/)) {
|
||||
AppPeersManager.resolveUsername(matches[1]).then(function (peerID) {
|
||||
|
||||
if (peerID > 0 && AppUsersManager.isBot(peerID) && matches[2] == 'startgroup') {
|
||||
@ -4248,10 +4248,17 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
||||
return true;
|
||||
}
|
||||
|
||||
$rootScope.$broadcast('history_focus', {
|
||||
peerString: AppPeersManager.getPeerString(peerID),
|
||||
startParam: matches[3]
|
||||
});
|
||||
var params = {
|
||||
peerString: AppPeersManager.getPeerString(peerID)
|
||||
};
|
||||
|
||||
if (matches[2] == 'start') {
|
||||
params.startParam = matches[3];
|
||||
} else {
|
||||
params.messageID = AppMessagesManager.getFullMessageID(parseInt(matches[3]), -peerID);
|
||||
}
|
||||
|
||||
$rootScope.$broadcast('history_focus', params);
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user