summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2025-12-17 03:56:33 +0100
committerRory& <root@rory.gay>2025-12-17 03:56:33 +0100
commit9264035d675a6aef438e983938647fd9730d3095 (patch)
tree390c6c51ed629fcc0c7e5b01565bc80483cdcf85
parentforgot to clean up (diff)
downloadserver-ts-9264035d675a6aef438e983938647fd9730d3095.tar.xz
Fix session id shenanigs
-rw-r--r--src/gateway/events/Connection.ts2
-rw-r--r--src/gateway/opcodes/Identify.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gateway/events/Connection.ts b/src/gateway/events/Connection.ts

index 9b132d4b..7ad37176 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 6309a00c..287a9279 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";