I am attempting to implement channels for my connection handler service. However, with the following code:
chatInput.addEventListener("keypress", event => {
if(event.keyCode === 13){
console.log(channel)
console.log(chatInput.value)
channel.push("new_msg", {body: chatInput.value})
console.log(channel.body)
chatInput.value = ""
}
})
I get this console output:
Channel {state: "joined", topic: "room:lobby", params: {…}, socket: Socket, bindings: Array(4), …}
socket.js:72 fgfdg
socket.js:74 undefined
After hitting the enter key in the test chat window.
How is it that the channel is successfully created, the message is being correctly created in the value property and yet the value is not being appended to the channel body?