Fixed confirm for opening URL from verified bots
This commit is contained in:
parent
e9770d2746
commit
82786e91ce
@ -232,7 +232,7 @@ angular.module('myApp.directives', ['myApp.filters'])
|
|||||||
}
|
}
|
||||||
|
|
||||||
var scope = $scope.$new(true)
|
var scope = $scope.$new(true)
|
||||||
scope.markup = AppMessagesManager.wrapReplyMarkup(message.reply_markup)
|
scope.markup = AppMessagesManager.wrapReplyMarkup(message.reply_markup, message.fromID)
|
||||||
scope.messageId = message.mid
|
scope.messageId = message.mid
|
||||||
messageKeyboardCompiled(scope, function (clonedElement) {
|
messageKeyboardCompiled(scope, function (clonedElement) {
|
||||||
$('.im_message_keyboard', element).replaceWith(clonedElement)
|
$('.im_message_keyboard', element).replaceWith(clonedElement)
|
||||||
|
@ -2319,7 +2319,7 @@ angular.module('myApp.services')
|
|||||||
return messagesForHistory[msgID] = message
|
return messagesForHistory[msgID] = message
|
||||||
}
|
}
|
||||||
|
|
||||||
function wrapReplyMarkup (replyMarkup) {
|
function wrapReplyMarkup (replyMarkup, fromID) {
|
||||||
if (!replyMarkup ||
|
if (!replyMarkup ||
|
||||||
replyMarkup._ == 'replyKeyboardHide') {
|
replyMarkup._ == 'replyKeyboardHide') {
|
||||||
return false
|
return false
|
||||||
@ -2340,7 +2340,9 @@ angular.module('myApp.services')
|
|||||||
angular.forEach(markupRow.buttons, function (markupButton) {
|
angular.forEach(markupRow.buttons, function (markupButton) {
|
||||||
markupButton.rText = RichTextProcessor.wrapRichText(markupButton.text, {noLinks: true, noLinebreaks: true})
|
markupButton.rText = RichTextProcessor.wrapRichText(markupButton.text, {noLinks: true, noLinebreaks: true})
|
||||||
if (markupButton._ == 'keyboardButtonUrl') {
|
if (markupButton._ == 'keyboardButtonUrl') {
|
||||||
markupButton.pUrl = RichTextProcessor.wrapUrl(markupButton.url, 1)
|
var from = AppUsersManager.getUser(fromID)
|
||||||
|
var unsafe = !(from && from.pFlags && from.pFlags.verified)
|
||||||
|
markupButton.pUrl = RichTextProcessor.wrapUrl(markupButton.url, unsafe)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -2800,13 +2800,13 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
|
|||||||
showCallbackMessage(callbackAnswer.message, callbackAnswer.pFlags.alert)
|
showCallbackMessage(callbackAnswer.message, callbackAnswer.pFlags.alert)
|
||||||
}
|
}
|
||||||
else if (typeof callbackAnswer.url === 'string') {
|
else if (typeof callbackAnswer.url === 'string') {
|
||||||
LocationParamsService.openUrl(callbackAnswer.url)
|
var url = RichTextProcessor.wrapUrl(callbackAnswer.url, true)
|
||||||
|
LocationParamsService.openUrl(url)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function gameButtonClick (id) {
|
function gameButtonClick (id) {
|
||||||
console.trace()
|
|
||||||
var message = AppMessagesManager.getMessage(id)
|
var message = AppMessagesManager.getMessage(id)
|
||||||
var peerID = AppMessagesManager.getMessagePeer(message)
|
var peerID = AppMessagesManager.getMessagePeer(message)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user