automatic fetch_message inside js