Move notification/invitation stuff to helper method