This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user