Browse Source

Disable editing for stickers

master
Igor Zhukov 8 years ago
parent
commit
181921d7d3
  1. 12
      app/js/messages_manager.js

12
app/js/messages_manager.js

@ -886,7 +886,12 @@ angular.module('myApp.services') @@ -886,7 +886,12 @@ angular.module('myApp.services')
}
function canMessageBeEdited(message) {
var goodMedias = ['messageMediaPhoto', 'messageMediaDocument', 'messageMediaWebPage', 'messageMediaPending']
var goodMedias = [
'messageMediaPhoto',
'messageMediaDocument',
'messageMediaWebPage',
'messageMediaPending'
]
if (message._ != 'message' ||
message.deleted ||
message.fwd_from ||
@ -895,6 +900,11 @@ angular.module('myApp.services') @@ -895,6 +900,11 @@ angular.module('myApp.services')
message.fromID && AppUsersManager.isBot(message.fromID)) {
return false
}
if (message.media &&
message.media._ == 'messageMediaDocument' &&
message.media.document.sticker) {
return false
}
return true
}

Loading…
Cancel
Save