mirror of
https://github.com/spacebarchat/client.git
synced 2024-11-22 02:12:38 +01:00
filter channel list by view permission
This commit is contained in:
parent
b6a9f12d2b
commit
9a9819cc51
@ -146,7 +146,9 @@ export default class Guild {
|
||||
|
||||
@computed
|
||||
get channels() {
|
||||
const guildChannels = this.app.channels.all.filter((channel) => this.channels_.has(channel.id));
|
||||
const guildChannels = this.app.channels.all.filter(
|
||||
(channel) => this.channels_.has(channel.id) && channel.hasPermission("VIEW_CHANNEL"),
|
||||
);
|
||||
const topLevelChannels = guildChannels.filter((channel) => !channel.parentId);
|
||||
const sortedChannels = topLevelChannels
|
||||
.sort(compareChannels)
|
||||
|
Loading…
Reference in New Issue
Block a user