Add beforeNotify callback that can halt notification