Added logic to accept an invite.