test handling of chat messages