diff --git a/controllers/workspace/socketChat.ts b/controllers/workspace/socketChat.ts index f419d79..5e10889 100644 --- a/controllers/workspace/socketChat.ts +++ b/controllers/workspace/socketChat.ts @@ -23,7 +23,7 @@ const socketChat = (socket: Socket) => { }); // TODO: πŸ’š/chat#sendMessage - μ±„νŒ… λ©”μ‹œμ§€ 보내기/μ €μž₯ - socket.on('sendMessage', async ({ room, name, message }) => { + socket.on('sendMessage', async ({ room, name, message, chatLength }) => { console.log('πŸ’š/chat#sendMessage-', { room, name, message }); try { const nowProject = await Projects.findOne({ @@ -45,7 +45,7 @@ const socketChat = (socket: Socket) => { }); await chat.save(); socket.to(room).emit('sendMessage', { ...chat }); - socket.emit('nowMessageId', { id: chat.id }); + socket.emit('nowMessageId', { id: chat.id, chatLength }); } catch (err) { console.log('πŸ’š/chat#sendMessage-err:', err.message); }