handle a contextual event during publish