Rep. Katie Hill (D-CA) did the right thing when she resigned from Congress this week. She lost all credibility when she had to admit having an affair with a subordinate on her congressional campaign — after demanding, during that campaign, that Judge Brett Kavanaugh be rejected from the Supreme Court based on flimsy allegations of decades-old sexual misconduct, without any sort of due process.

Her final act as a member of Congress was to vote for a sham impeachment inquiry whose rules allow Democrats to continue to conduct hearings in secret and to monopolize the witness list — a brazen departure from past precedent.

In her farewell speech, Hill claimed, obnoxiously, that her impeachment vote was “on behalf of the women of the United States of America.” She also claimed to be the victim of a “double standard” and a “misogynistic culture.”

That is demonstrably untrue.

Last year, former Rep. Joe Barton (R-TX) resigned after a woman with whom he had allegedly pursued an extramarital affair leaked explicit selfies that he had sent her. (Barton was already divorced by the time the scandal broke.)

If there is a double standard, it is on the Democratic side.

As the Palm Beach Post noted on Thursday, Rep. Alcee Hastings (D-FL) — who was impeached and removed from the federal judiciary in 1989 — has carried on an affair with an aide for years. He appears to be violating House rules — yet his party has never referred him to the House Ethics Committee, as it did with Hill.

Hill is a bully who denies basic fairness to her political opponents. But she is also a victim of “revenge porn.”

That might seem contradictory, but it is not.

It was wrong for Hill to impugn Kavanaugh — and men in general — for sexual misconduct. But it was also wrong for someone to leak Hill’s intimate photographs.

This was not an Anthony Weiner situation, where a member of Congress publicly (if inadvertently) tweeted a lewd photo of himself, and sent unsolicited photos to women on social media — including an underage girl, the crime for which he served time in federal prison.

Whoever leaked the photos sought to exploit her private life — cruelly, and unfairly.

She was involved with a woman outside her marriage — with her husband’s consent. That may seem eccentric, but she is openly bisexual. She was not living a lie.

Hill admitted that the woman had worked on her congressional campaign. Such relationships do happen — and are not barred by House rules, which focus on congressional staff.

According to a recent survey, work is the second most common way Americans meet their romantic partners.

Not all of those relationships involve bosses and employees — but there need to be clear rules and boundaries, regardless. Many argue that all such relationships are inherently exploitative.

Hill joined fellow Democrats in voting earlier this year to ban members from dating staff. If she violated that ban — and she denies doing so — that is her fault alone.

Still, at some point someone — perhaps her ex-husband, as she has claimed — decided to leak photographs of Hill to destroy her career and reputation. That, in itself, is simply immoral.

People — even politicians — are entitled to private lives, and even fantasy lives. They are human beings.

True, elected officials are leaders, and should behave responsibly. But some of the leaked photographs of Hill were apparently taken before she became a public figure.

In 2018, as in 2010, we saw many ordinary people come out of the woodwork to run for office. That is part of the beauty of the American political system.

That beauty is marred by the ugliness of the politics of personal destruction.

The truth is that we live in an era in which many people take intimate photographs of lovers, and for lovers. Some do it in the process of flirtation, which increasingly (and perhaps unfortunately) happens across smartphone apps. Some do it — especially in the military — to keep desire alive across long distances. Some — including religious couples — do it simply for the fun of it.

Cosmopolitan recently claimed that nine of ten millennial women have sent nude selfies. Katie Hill is in her early thirties.

Ironically, perhaps, it was a pro-Trump Republican, Rep. Matt Gaetz (R-FL), who defended Hill most vigorously. He told Fox News’ Martha MacCallum on Thursday evening that he believed Hill, like Sen. Al Franken (D-MN), had been sacrificed so that her party might preserve “a dagger for Republicans that they don’t like.”

Katie Hill deserves to be held accountable for her public behavior, including her own apparent double standards, but she did not deserve to be slandered merely for indulging privately in the pursuit of happiness.

Joel B. Pollak is Senior Editor-at-Large at Breitbart News. He earned an A.B. in Social Studies and Environmental Science and Public Policy from Harvard College, and a J.D. from Harvard Law School. He is a winner of the 2018 Robert Novak Journalism Alumni Fellowship. He is also the co-author of How Trump Won: The Inside Story of a Revolution, which is available from Regnery. Follow him on Twitter at @joelpollak.