From dd3a97f056acb35ddda30dee48574da9ef51e3b7 Mon Sep 17 00:00:00 2001 From: Mathium05 <73901602+MathMan05@users.noreply.github.com> Date: Tue, 9 Sep 2025 09:31:34 -0500 Subject: [PATCH 1/2] don't filter channels --- src/gateway/opcodes/Identify.ts | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts index 6f2ca79f..9f0ed34b 100644 --- a/src/gateway/opcodes/Identify.ts +++ b/src/gateway/opcodes/Identify.ts @@ -271,18 +271,6 @@ export async function onIdentify(this: WebSocket, data: Payload) { // filter guild channels we don't have permission to view // TODO: check if this causes issues when the user is granted other roles? member.guild.channels = member.guild.channels - .filter((channel) => { - const perms = Permissions.finalPermission({ - user: { - id: member.id, - roles: member.roles.map((x) => x.id), - }, - guild: member.guild, - channel, - }); - - return perms.has("VIEW_CHANNEL"); - }) .map((channel) => { channel.position = member.guild.channel_ordering.indexOf( channel.id, From c873b7074e20e2b4b9c848dc79373d46cc0e2bd5 Mon Sep 17 00:00:00 2001 From: Mathium05 <73901602+MathMan05@users.noreply.github.com> Date: Tue, 9 Sep 2025 17:30:24 -0500 Subject: [PATCH 2/2] Update Identify.ts --- src/gateway/opcodes/Identify.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts index 9f0ed34b..5e2e28a2 100644 --- a/src/gateway/opcodes/Identify.ts +++ b/src/gateway/opcodes/Identify.ts @@ -268,9 +268,22 @@ export async function onIdentify(this: WebSocket, data: Payload) { // Generate guilds list ( make them unavailable if user is bot ) const guilds: GuildOrUnavailable[] = members.map((member) => { - // filter guild channels we don't have permission to view - // TODO: check if this causes issues when the user is granted other roles? member.guild.channels = member.guild.channels + /* + //TODO maybe implement this correctly, by causing create and delete events for users who can newly view and not view the channels, along with doing these checks correctly, as they don't currently take into account that the owner of the guild is always able to view channels, with potentially other issues + .filter((channel) => { + const perms = Permissions.finalPermission({ + user: { + id: member.id, + roles: member.roles.map((x) => x.id), + }, + guild: member.guild, + channel, + }); + + return perms.has("VIEW_CHANNEL"); + }) + */ .map((channel) => { channel.position = member.guild.channel_ordering.indexOf( channel.id,