const login = req.session.user.login
this.socket.emit('new-message', {
chat: {
name: this.$route.params.id
},
user: {
name: this.UserInfo.login
},
message: this.NewMessage,
});
socket.on('new-message', data => {
io.emit('update-chat', {
user: data.user.name,
message: data.message,
date: date,
});
});