Browse Source

Fixed mentions in supergroups

Closes #1584
master
Igor Zhukov 7 years ago
parent
commit
c168a26382
  1. 8
      app/js/controllers.js
  2. 7
      app/js/services.js

8
app/js/controllers.js

@ -2512,8 +2512,14 @@ angular.module('myApp.controllers', ['myApp.i18n']) @@ -2512,8 +2512,14 @@ angular.module('myApp.controllers', ['myApp.i18n'])
})
var chatParticipantsPromise
if (peerID < 0) {
if (AppPeersManager.isChannel(peerID)) {
chatParticipantsPromise = AppProfileManager.getChannelParticipants(-peerID)
} else {
chatParticipantsPromise = AppProfileManager.getChatFull(-peerID).then(function (chatFull) {
var participantsVector = (chatFull.participants || {}).participants || []
return (chatFull.participants || {}).participants || []
})
}
chatParticipantsPromise = chatParticipantsPromise.then(function (participantsVector) {
var ids = []
angular.forEach(participantsVector, function (participant) {
ids.push(participant.user_id)

7
app/js/services.js

@ -1208,8 +1208,11 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils']) @@ -1208,8 +1208,11 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
if (filter._ == 'channelParticipantsRecent') {
var chat = AppChatsManager.getChat(id)
if (chat.pFlags.kicked ||
chat.pFlags.broadcast && !chat.pFlags.creator && !chat.admin_rights) {
if (chat &&
chat.pFlags && (
chat.pFlags.kicked ||
chat.pFlags.broadcast && !chat.pFlags.creator && !chat.admin_rights
)) {
return $q.reject()
}
}

Loading…
Cancel
Save