The Stuttgart Congress of 1907 saw socialists from across the world gather for a week to debate issues from war to the economy to migration. They were members of the Socialist International — at that time including the Labour Party — and the issue of immigration at the turn of the 20th century was being debated in similar ways to today.
For the actual debate between the delegates — which is quite spicy in some places, especially between the US and Japanese comrades — click here.
This is the text of the motion that was adopted by those socialists on the subject of migration
Stuttgart Congress motion on migration 
The immigration and emigration of workers are phenomena that are just as inseparable from the essence of capitalism as unemployment, overproduction and workers’ underconsumption. They are often a way of reducing the workers’ participation in the production process and on occasion assume abnormal proportions as a result of political, religious and national persecution.
The congress does not seek a remedy to the potentially impending consequences for the workers from immigration and emigration in any economic or political exclusionary rules, because these are fruitless and reactionary by nature. This is particularly true of a restriction on the movement and the exclusion of foreign nationalities or races.
Instead, the congress declares it to be the duty of organised labour to resist the depression of its living standards that often occurs in the wake of the mass import of unorganised labour. In addition the congress declares it to be the duty of organised labour to prevent the import and export of strike-breakers. The congress recognises the difficulties which in many cases fall upon the proletariat in a country that is at a higher stage of capitalist development, as a result of the mass immigration of unorganised workers accustomed to lower living standards and from countries with a predominantly agrarian and agricultural culture, as well as the dangers that arise for it as a result of a specific form of immigration. However, congress does not believe that preventing particular nations or races from immigrating — something that is also reprehensible from the point of view of proletarian solidarity — is a suitable means of fighting these problems. It therefore recommends the following measures:
I. For the country of immigration
1. A ban on the export and import of those workers who have agreed on a contract that deprives them of the free disposal over their labour-power and wages.
2. Statutory protection of workers by shortening the working day, introducing a minimum wage rate, abolishing the sweat system and regulating home working
3. Abolition of all restrictions which prevent certain nationalities or races from staying in a country or which exclude them from the social, political and economic rights of the natives or impede them in exercising those rights. Extensive measures to facilitate naturalisation.
4. In so doing, the following principles should generally apply in the trade unions of all countries:
(a) unrestricted access of immigrant workers to the trade unions of all countries
(b) facilitating access by setting reasonable admission fees
© the ability to change from the trade union of one country to another for free, upon the fulfilment of all liabilities in the previous union
(d) striving to establish an international trade union cartel, which will make it possible to implement these principles and needs internationally.
5. Support for trade union organisations in those countries from which immigration primarily stems.
II. For the country of origin
1. The liveliest trade union agitation.
2. Education of the workers and the public on the true state of the working conditions in the country of origin.
3. An active agreement of the trade unions with the unions in the country of immigration for the purpose of a common approach towards the matter of immigration and emigration.
4. Since the emigration of labour is often artificially stimulated by railway and steamship companies, by land speculators and other bogus outfits, and by issuing false and scurrilous promises to the workers, the congress demands:
l The monitoring of the shipping agencies, the emigration bureaus, and potentially legal or administrative measures against them to prevent emigration being abused in the interests of such capitalist enterprises.
Reorganisation of the transport sector, especially ships; the appointment of inspectors with disciplinary powers, recruited from the ranks of unionised workers in the country of origin and the country of immigration, to oversee regulations; welfare for newly arrived immigrants, so that they do not fall prey to exploitation by the parasites of capital from the outset.
Since the transport of migrants can only be statutorily regulated on an international level, the congress commissions the International Socialist Bureau to develop proposals to reorganise these matters, in which the furnishings and the equipment of ships must be standardised, as well as the minimum amount of airspace for every migrant. Particular emphasis should be placed on individual migrants arranging their passage directly with the company, without the intervention of any intermediate contractor.
These proposals shall be passed on to the party leaderships for the purposes of legislative application and for propaganda.