This function sends a message on PUBSUB_CHANNEL. This happens when the user presses enter in the chat input or when clicking the send button. In this function, we create a message object with ev being set to message and the value being the text the user wants to send. We also include a nickname if needed. Once we have the message object, we need to convert it into a string with JSON in it, and encode it as a Buffer (node.pubsub.publish only supports Buffers as messages). Once we have the stringified JSON for our message, we can finally send it on the PUBSUB_CHANNEL topic. Finally, we clear the currentMessage and also the value of our $chatMessage input