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
This commit is contained in:
Zane Helton 2025-06-29 18:42:15 -04:00 committed by Rory&
parent 67e0438bdc
commit 06ae335d1b

View File

@ -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.