From f026e740386d666634565fb1a2407a6de47a6c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 25 Aug 2023 14:46:51 -0400 Subject: [PATCH] feat: add socket.data.uid on connect --- src/socket.io/index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/socket.io/index.js b/src/socket.io/index.js index c128cc414c..80fe78271a 100644 --- a/src/socket.io/index.js +++ b/src/socket.io/index.js @@ -76,6 +76,7 @@ Sockets.init = async function (server) { function onConnection(socket) { socket.uid = socket.request.uid; + socket.data.uid = socket.uid; // socket.data is shared between nodes via fetchSockets socket.ip = ( socket.request.headers['x-forwarded-for'] || socket.request.connection.remoteAddress || ''