So Obama was running ahead of Trump to tell people how to deal with Trump.
Logan Act violation
The Logan Act (1 Stat. 613, 18 U.S.C. § 953, enacted January 30, 1799) is a United States federal law that criminalizes negotiation by unauthorized persons with foreign governments having a dispute with the United States.
https:// en.wikipedia.org/wiki/Logan_Act