✨ Site > Chat > Add messages sending
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user