added flash message after publish