Updated endpoint_chat to use id method and self. Removed use of connected_callback.