From 53ced431994bb56c0b42461456e73eea8c8a8aee Mon Sep 17 00:00:00 2001 From: Christoph Guttandin Date: Sun, 8 Dec 2024 17:20:55 +0100 Subject: [PATCH] feat: add clientId to init message --- src/app.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.ts b/src/app.ts index 23c8932..ec63530 100644 --- a/src/app.ts +++ b/src/app.ts @@ -30,7 +30,7 @@ server.on('connection', (connection) => { const sendMessage = (message: object) => connection.send(JSON.stringify(message)); activeConnections.set(id, sendMessage); - sendMessage({ events: [], origin, type: 'init' }); + sendMessage({ client: { id }, events: [], origin, type: 'init' }); origin += 1;