Extract accepting invitation to a method

For easier overriding in sublcasses. As 8fa5a88699479a2e1cc3e1d8f068297f99cbd668 did for invites.