Changed Chatclient to onMessage method