This commit is contained in:
@@ -72,11 +72,13 @@ export default function (fastify: FastifyInstance) {
|
|||||||
const namespace = fastify.io.of('/webrtc')
|
const namespace = fastify.io.of('/webrtc')
|
||||||
const sockets = await namespace.fetchSockets()
|
const sockets = await namespace.fetchSockets()
|
||||||
|
|
||||||
|
console.log(sockets)
|
||||||
|
|
||||||
const found = sockets.find(socket => socket.id === req.user!.id)
|
const found = sockets.find(socket => socket.id === req.user!.id)
|
||||||
|
|
||||||
if (found) {
|
if (found) {
|
||||||
found.data.displayName = input.displayName
|
found.data.displayName = input.displayName
|
||||||
|
console.log('found.', found)
|
||||||
namespace.emit('clientChanged', found.id, socketToClient(found))
|
namespace.emit('clientChanged', found.id, socketToClient(found))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user