Site > Chat > Add messages sending

This commit is contained in:
brunosimon
2017-08-14 23:02:02 +02:00
parent 2b0dec5d0a
commit 3aacc7fcc1
4 changed files with 40 additions and 4 deletions
+15 -1
View File
@@ -14,13 +14,19 @@ export default
pendingUser()
{
return this.$store.state.chat.pendingUser
},
pendingMessage()
{
return this.$store.state.chat.pendingMessage
}
},
watch:
{
project: 'onProjectChange',
pendingUser: 'onPendingUser'
pendingUser: 'onPendingUser',
pendingMessage: 'onPendingMessage'
},
created()
@@ -105,6 +111,14 @@ export default
{
this.chatSocket.emit('update_user', value)
}
},
onPendingMessage(value)
{
if(value)
{
this.chatSocket.emit('message', value)
}
}
}
}