Node.js based forum software built for the modern web
feat: add socket.data.uid on connect
Barış Soner Uşaklıf026e740386d
diff --git a/src/socket.io/index.js b/src/socket.io/index.jsindex 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 fetchSocketssocket.ip = (socket.request.headers['x-forwarded-for'] ||socket.request.connection.remoteAddress || ''