Added addMessageToChat and getChat to Endpoint.