From 9264035d675a6aef438e983938647fd9730d3095 Mon Sep 17 00:00:00 2001 From: Rory& Date: Wed, 17 Dec 2025 03:56:33 +0100 Subject: [PATCH] Fix session id shenanigs --- src/gateway/events/Connection.ts | 2 +- src/gateway/opcodes/Identify.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gateway/events/Connection.ts b/src/gateway/events/Connection.ts index 9b132d4b9..7ad371765 100644 --- a/src/gateway/events/Connection.ts +++ b/src/gateway/events/Connection.ts @@ -80,7 +80,7 @@ export async function Connection( } //Create session ID when the connection is opened. This allows gateway dump to group the initial websocket messages with the rest of the conversation. - const session_id = genSessionId(); + const session_id = "TEMP_" + genSessionId(); socket.session_id = session_id; //Set the session of the WebSocket object try { diff --git a/src/gateway/opcodes/Identify.ts b/src/gateway/opcodes/Identify.ts index 6309a00c1..287a92793 100644 --- a/src/gateway/opcodes/Identify.ts +++ b/src/gateway/opcodes/Identify.ts @@ -136,7 +136,7 @@ export async function onIdentify(this: WebSocket, data: Payload) { tokenData.session ?? Session.create({ user_id: this.user_id, - session_id: "TEMP_" + this.session_id, + session_id = this.session_id, }); this.session.status = identify.presence?.status || "online";