rpl::producer<int> KickedCountValue( not_null<ChannelData*> channel) { using Flag = Notify::PeerUpdate::Flag; return Notify::PeerUpdateValue( channel, Flag::BannedUsersChanged | Flag::ChannelRightsChanged ) | rpl::map([channel] { return channel->canViewBanned() ? channel->kickedCount() : 0; }); }
bool ManagePeerBox::Available(not_null<ChannelData*> channel) { // canViewMembers() is removed, because in supergroups you // see them in profile and in channels only admins can see them. // canViewAdmins() is removed, because in supergroups it is // always true and in channels it is equal to canViewBanned(). return false // || channel->canViewMembers() // || channel->canViewAdmins() || channel->canViewBanned() || channel->canEditInformation() || HasRecentActions(channel); }