From 3bbf997295d8c0c24ee6b4c87b5581f0b8a0ce94 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Fri, 13 Jan 2023 13:44:19 +1100 Subject: Dont send sessions replace or presence update for unidentified users --- src/gateway/events/Close.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gateway/events/Close.ts b/src/gateway/events/Close.ts index 82d16234..271b592b 100644 --- a/src/gateway/events/Close.ts +++ b/src/gateway/events/Close.ts @@ -18,6 +18,9 @@ export async function Close(this: WebSocket, code: number, reason: string) { if (this.session_id) { await Session.delete({ session_id: this.session_id }); + } + + if (this.user_id) { const sessions = await Session.find({ where: { user_id: this.user_id }, select: PrivateSessionProjection, -- cgit 1.4.1