Browse Source

Now quick forward only for channels

Closes #1185
master
Igor Zhukov 9 years ago
parent
commit
c62d167019
  1. 7
      app/js/controllers.js
  2. 6
      app/js/messages_manager.js

7
app/js/controllers.js

@ -1595,10 +1595,11 @@ angular.module('myApp.controllers', ['myApp.i18n']) @@ -1595,10 +1595,11 @@ angular.module('myApp.controllers', ['myApp.i18n'])
}
if (target.className &&
target.className.indexOf('im_message_date') != -1) {
if ($scope.historyState.canReply) {
selectedReply(messageID)
} else {
if (AppPeersManager.isChannel(peerID) &&
!AppPeersManager.isMegagroup(peerID)) {
quickForward(messageID)
} else {
selectedReply(messageID)
}
return false
}

6
app/js/messages_manager.js

@ -942,7 +942,11 @@ angular.module('myApp.services') @@ -942,7 +942,11 @@ angular.module('myApp.services')
return $q.reject()
}
var message = getMessage(fullMsgID)
if (!message || !message.pFlags || !message.pFlags.post) {
var channel = AppChatsManager.getChat(channelID)
if (!message ||
!message.pFlags ||
!message.pFlags.post ||
!channel.username) {
return $q.reject()
}
return MtpApiManager.invokeApi('channels.exportMessageLink', {

Loading…
Cancel
Save