Browse Source

Fixed mentions in supergroups

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

10
app/js/controllers.js

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

7
app/js/services.js

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

Loading…
Cancel
Save