|
|
@ -255,32 +255,30 @@ export default class AppGroupPermissionsTab extends SliderSuperTabEventable { |
|
|
|
//dom.lastMessageSpan.innerHTML = 'Can Add Users and Pin Messages';
|
|
|
|
//dom.lastMessageSpan.innerHTML = 'Can Add Users and Pin Messages';
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
this.listenerSetter.add(rootScope, 'apiUpdate', (update: Update) => { |
|
|
|
this.listenerSetter.add(rootScope, 'updateChannelParticipant', (update: Update.updateChannelParticipant) => { |
|
|
|
if(update._ === 'updateChannelParticipant') { |
|
|
|
const needAdd = update.new_participant?._ === 'channelParticipantBanned' && !update.new_participant.banned_rights.pFlags.view_messages; |
|
|
|
const needAdd = update.new_participant?._ === 'channelParticipantBanned' && !update.new_participant.banned_rights.pFlags.view_messages; |
|
|
|
const li = list.querySelector(`[data-peer-id="${update.user_id}"]`); |
|
|
|
const li = list.querySelector(`[data-peer-id="${update.user_id}"]`); |
|
|
|
if(needAdd) { |
|
|
|
if(needAdd) { |
|
|
|
if(!li) { |
|
|
|
if(!li) { |
|
|
|
add(update.new_participant as ChannelParticipant.channelParticipantBanned, false); |
|
|
|
add(update.new_participant as ChannelParticipant.channelParticipantBanned, false); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
setSubtitle(li, update.new_participant as ChannelParticipant.channelParticipantBanned); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(update.prev_participant?._ !== 'channelParticipantBanned') { |
|
|
|
|
|
|
|
++exceptionsCount; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if(li) { |
|
|
|
setSubtitle(li, update.new_participant as ChannelParticipant.channelParticipantBanned); |
|
|
|
li.remove(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(update.prev_participant?._ === 'channelParticipantBanned') { |
|
|
|
if(update.prev_participant?._ !== 'channelParticipantBanned') { |
|
|
|
--exceptionsCount; |
|
|
|
++exceptionsCount; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
if(li) { |
|
|
|
|
|
|
|
li.remove(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
setLength(); |
|
|
|
if(update.prev_participant?._ === 'channelParticipantBanned') { |
|
|
|
|
|
|
|
--exceptionsCount; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setLength(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
const setLength = () => { |
|
|
|
const setLength = () => { |
|
|
|