Flashback to 2017:
The Secret Correspondence Between Donald Trump Jr. and WikiLeaks
This correspondence went on throughout the campaign and after the election up to as late as July of 2017.
In April of 2017, then CIA Director Mike Pompeo said that WikiLeaks was a 'Hostile Intelligence Service' often abetted by state foreign actors like Russia.
So Trump Junior knew that while he was dealing with WikiLeaks.