Save author name on send

This commit is contained in:
Gabe Kangas 2020-06-02 14:27:11 -07:00
parent 90e7e9082b
commit f6153c983f

View file

@ -24,6 +24,7 @@ function setupApp() {
methods: { methods: {
submitChatForm: function (e) { submitChatForm: function (e) {
const message = new Message(this.message) const message = new Message(this.message)
localStorage.author = message.author
const messageJSON = JSON.stringify(message) const messageJSON = JSON.stringify(message)
window.ws.send(messageJSON) window.ws.send(messageJSON)
e.preventDefault() e.preventDefault()