Members of the media and a Democratic congressman freaked out over President Donald Trump congratulating Russian president Vladimir Putin on his electoral victory.

Unfortunately for them, President Barack Obama did the same thing when he was in office.

Trump confirmed on Tuesday that he called Putin to congratulate him on his win in the latest election. The election was hardly free and fair, but there is precedent for U.S. presidents making the same diplomatic move to congratulate Putin.

In 2012, according to the White House, “President Obama called Russian President-elect and Prime Minister Putin to congratulate him on his recent victory in the Russian Presidential election.”

“President Obama and President-Elect Putin agreed that the successful reset in relations should be built upon during the coming years,” the WH statement said at the time.

Nonetheless, CNN’s Zachary Cohen suggested that Trump’s congratulatory call indicated some kind of dictatorial link, tweeting, “Both Trump and Kim Jong Un have now congratulated Putin on his election win.”

Both Trump and Kim Jong Un have now congratulated Putin on his election win. — Zachary Cohen (@ZcohenCNN) March 20, 2018

the Kremlin put out its summary of Putin’s phone call with Trump before the White House did, saying that Trump congratulated Putin on winning his authoritarian “election” https://t.co/78Zu04qRz6 — Edward-Isaac Dovere (@IsaacDovere) March 20, 2018

“Trump just congratulated [Putin] on his ‘re-election,'” Rep. Ruben Gallego said with snark, despite the fact that his own former party leader made the same move.

Putin’s running an authoritarian regime. Trump just congratulated him on his “re-election.” https://t.co/uAiBDEcNER — Ruben Gallego (@RepRubenGallego) March 20, 2018

Moscow says Trump congratulated Putin on his “election” victory; didn’t bring up Kremlin murder of ex-spy in UK via nerve agent. https://t.co/0fxgddgeZX — Jesse Lehrich (@JesseLehrich) March 20, 2018

“Trump just congratulated Putin on his reelection. You know, the one where he disqualified & imprisoned a guy who would’ve beat him,” Scott Dworkin, co-founder of The Democratic Coalition un-ironically tweeted.

Trump just congratulated Putin on his reelection. You know, the one where he disqualified & imprisoned a guy who would’ve beat him. Congratulating Putin does nothing but make the election look like it was legit. It wasn’t. It was a complete farce. Just like Trump’s. #NewElection — Scott Dworkin (@funder) March 20, 2018

Trump ‘congratulated’ Putin on his electoral victory just days after the UK concluded that Russian intelligence tried to murder two people and hospitalized a policeman with the use of a weapon of mass destruction on British soil. https://t.co/tzJMeZWFHM — Adam Rawnsley (@arawnsley) March 20, 2018

Follow Amber on Twitter