diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-01-05 17:40:46 +1100 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-01-05 17:42:36 +1100 |
commit | 9cc9df985c516705f6b4212a338da3dbdd3c8391 (patch) | |
tree | 9e9eb74c27b855a49d3d6943f422f135a2e52746 /src | |
parent | migration stuff again (diff) | |
download | server-9cc9df985c516705f6b4212a338da3dbdd3c8391.tar.xz |
Don't send private user data in ready event
Diffstat (limited to 'src')
-rw-r--r-- | src/gateway/opcodes/Identify.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts index d1daff04..6244288d 100644 --- a/src/gateway/opcodes/Identify.ts +++ b/src/gateway/opcodes/Identify.ts @@ -175,10 +175,11 @@ export async function onIdentify(this: WebSocket, data: Payload) { })) as any as UserGuildSettings[]; const channels = recipients.map((x) => { - // @ts-ignore - x.channel.recipients = x.channel.recipients?.map((x) => x.user); //TODO is this needed? check if users in group dm that are not friends are sent in the READY event - users = users.concat(x.channel.recipients as unknown as User[]); + users = users.concat( + x.channel.recipients?.map((x) => x.user.toPublicUser()) || [], + ); + // users = users.concat(x.channel.recipients); if (x.channel.isDm()) { x.channel.recipients = x.channel.recipients!.filter( (x) => x.id !== this.user_id, |