Update updateText to format the received messages on the chat widget