From 3b9f91502e874eb12eec06f2db57aea229d4ae05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Farka=C5=A1?= Date: Thu, 16 Jan 2025 23:28:36 +0100 Subject: [PATCH] hotfix for chat history IPs --- server/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/index.js b/server/index.js index 7db7dd7..ed74388 100644 --- a/server/index.js +++ b/server/index.js @@ -506,7 +506,8 @@ chatWss.on('connection', (ws, request) => { // Send chat history to the newly connected client storage.chatHistory.forEach(function(message) { - message.history = true; // Adding the history parameter + message.history = true; + !request.session.isAdminAuthenticated ? delete message.ip : null; ws.send(JSON.stringify(message)); });