Updated chat listener to new API.