From 06ae335d1b52b21b6da064a1bbcb5d7aad253b61 Mon Sep 17 00:00:00 2001 From: Zane Helton Date: Sun, 29 Jun 2025 18:42:15 -0400 Subject: [PATCH] Remove @everyone role from `onIdentify` This prevents the @everyone role from leaking into places that might display it on the frontend. The @everyone role is still visible when needed, but `merged_members` (aka GuildMembers) won't include the role. Resolves: #1213 --- src/gateway/opcodes/Identify.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts index 5e2e28a2..9543a397 100644 --- a/src/gateway/opcodes/Identify.ts +++ b/src/gateway/opcodes/Identify.ts @@ -244,7 +244,10 @@ export async function onIdentify(this: WebSocket, data: Payload) { return [ { ...x, - roles: x.roles.map((x) => x.id), + // filter out @everyone role + roles: x.roles + .filter((r) => r.id !== x.guild.id) + .map((x) => x.id), // add back user, which we don't fetch from db // TODO: For guild profiles, this may need to be changed.