Don't make publish function perform two duties.