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:
parent
67e0438bdc
commit
06ae335d1b
@ -244,7 +244,10 @@ export async function onIdentify(this: WebSocket, data: Payload) {
|
|||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
...x,
|
...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
|
// add back user, which we don't fetch from db
|
||||||
// TODO: For guild profiles, this may need to be changed.
|
// TODO: For guild profiles, this may need to be changed.
|
||||||
|
|||||||
Reference in New Issue
Block a user