diff --git a/server/routes/user.ts b/server/routes/user.ts index bef5c56..1f498f1 100644 --- a/server/routes/user.ts +++ b/server/routes/user.ts @@ -72,11 +72,13 @@ export default function (fastify: FastifyInstance) { const namespace = fastify.io.of('/webrtc') const sockets = await namespace.fetchSockets() + console.log(sockets) + const found = sockets.find(socket => socket.id === req.user!.id) if (found) { found.data.displayName = input.displayName - + console.log('found.', found) namespace.emit('clientChanged', found.id, socketToClient(found)) }