1
0
mirror of https://github.com/KubaPro010/fm-dx-webserver.git synced 2026-02-26 22:13:53 +01:00

hotfix for chat history IPs

This commit is contained in:
Marek Farkaš
2025-01-16 23:28:36 +01:00
parent 3f607effe3
commit 3b9f91502e

View File

@@ -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));
});