From 53634a928ce3d4e7ad739e27b6ef0639a227e145 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=91=D0=B0=D0=B1?= =?UTF-8?q?=D1=83=D1=88=D0=BA=D0=B8=D0=BD?= Date: Mon, 31 Mar 2025 17:29:05 +0200 Subject: [PATCH] removed config from NEW_AGENTS --- assist/utils/socketHandlers.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assist/utils/socketHandlers.js b/assist/utils/socketHandlers.js index ea5c2ffae..f58504e88 100644 --- a/assist/utils/socketHandlers.js +++ b/assist/utils/socketHandlers.js @@ -42,7 +42,7 @@ const findSessionSocketId = async (io, roomId, tabId) => { }; async function getRoomData(io, roomID) { - let tabsCount = 0, agentsCount = 0, tabIDs = [], agentIDs = [], agentsInfo = [], config = null; + let tabsCount = 0, agentsCount = 0, tabIDs = [], agentIDs = [], config = null; const connected_sockets = await io.in(roomID).fetchSockets(); if (connected_sockets.length > 0) { for (let socket of connected_sockets) { @@ -52,7 +52,6 @@ async function getRoomData(io, roomID) { } else { agentsCount++; agentIDs.push(socket.id); - agentsInfo.push(socket.handshake.query.agentInfo); if (socket.handshake.query.config !== undefined) { config = socket.handshake.query.config; } @@ -123,7 +122,8 @@ async function onConnect(socket) { // Stats startAssist(socket, socket.handshake.query.agentID); } - socket.to(socket.handshake.query.roomId).emit(EVENTS_DEFINITION.emit.NEW_AGENT, socket.id, { ...socket.handshake.query.agentInfo, config: socket.handshake.query.config }); + io.to(socket.id).emit(EVENTS_DEFINITION.emit.WEBRTC_CONFIG, socket.handshake.query.config); + socket.to(socket.handshake.query.roomId).emit(EVENTS_DEFINITION.emit.NEW_AGENT, socket.id, { ...socket.handshake.query.agentInfo }); } // Set disconnect handler