});
// When any client comments, send that to all clients (including sender)
- socket.on('comment', (comment) => {
+ socket.on('comment', (comment_text) => {
+ comment = { name: socket.request.session.name,
+ text: comment_text }
io.emit('comment', comment);
state.comments.push(comment);
});