summary refs log tree commit diff
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-01-13 13:44:19 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-01-13 13:44:19 +1100
commitff15dd8a9d90ae0ce422645b63fcfd0c0cf329f2 (patch)
treec42378086d4a784269079bd2c9c8492cecf394b2
parentDev/post refactor fixes (#927) (diff)
downloadserver-ff15dd8a9d90ae0ce422645b63fcfd0c0cf329f2.tar.xz
Dont send sessions replace or presence update for unidentified users
-rw-r--r--src/gateway/events/Close.ts3
1 files changed, 3 insertions, 0 deletions
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,