cleanup chat messages before sending to server and before sending to clients. don't send empty messages.