feat(assist): fixed get projectID approach

This commit is contained in:
Alexander 2025-03-24 15:35:47 +01:00
parent 60b4225159
commit cb4e318650

View file

@ -87,8 +87,12 @@ async function onConnect(socket) {
let debugLogs = false;
if (socket.handshake.query.identity === IDENTITIES.session) {
// console.log(JSON.stringify(socket.handshake.query));
console.log("projectToTrack: " + projectToTrack + ", socketProject: " + socket.handshake.query.sessionInfo?.projectID);
debugLogs = projectToTrack == socket.handshake.query.sessionInfo?.projectID;
let sessInfo = socket.handshake.query.sessionInfo;
if (typeof sessInfo === "string") {
sessInfo = JSON.parse(socket.handshake.query.sessionInfo);
}
// console.log("projectToTrack: " + projectToTrack + ", socketProject: " + sessInfo);
debugLogs = projectToTrack == sessInfo.projectID;
} else if (socket.handshake.query.identity === IDENTITIES.agent) {
debugLogs = projectToTrack == String(socket.handshake.query.projectId);
}