mirror of
https://github.com/spacebarchat/server.git
synced 2026-10-17 13:01:09 +00:00
Fix session id shenanigs
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user