Authentication
Anonymous chatting is supported for non authenticated users, in order to have a proper username accompany the chat message you should first ensure that user is authenticated via the appropriate endpoint.
let payload = [
"message": "[AnyBot] \(message)",
"robot_name": "AnyBot",
"robot_id": "123456",
"secret": "iknowyourelookingatthisthatsfine"
]
socket.emit("chat_message", payload)