Social media and politics go hand-in-hand nowadays, but some politicians are considering ditching their social media accounts to avoid being sued on First Amendment grounds for blocking people they consider annoying or disruptive. While that may not always seem fair, the courts have rightly and consistently sided with free speech.

In a series of legal decisions, including one in which a judge found that President Donald Trump could not block certain people from commenting on his Twitter account, courts have ruled correctly that access to public figures on social media is a constitutional right and that blocking commentary is unconstitutional.

That prompted a lawyer to advise the S.C. House Republican Caucus recently that lawmakers risk being sued and held responsible for their own legal bills if they block people who haven’t threatened or harassed them from their social media accounts. They should heed the advice.

Politics is admittedly a rough-and-tumble business, especially in this hyper-connected world, and public figures are expected to take their licks.

For instance, Abbie Mobley said her state representative, Lin Bennett, R-Charleston, blocked her on social media after she challenged her position against abortion. Ms. Mobley said her mother was also blocked after she “liked” her comment on Ms. Bennett’s account.

“She’s in the Statehouse representing me,” Ms. Mobley said. “I don’t understand why she won’t engage me. It’s just a lost opportunity to engage with a constituent.”

It doesn’t matter whether Rep. Bennett considers her account private. As long as she’s an elected representative and uses the social media platform for official business, she opens herself up to criticism, as the courts have ruled. (She was also recently called upon to apologize, and did, for posting a misleading photograph of Rep. Joe Cunningham that suggested he was unpatriotic.)

In a federal appeals court ruling in Virginia, a panel upheld a trial court ruling that equated a public figure’s social media account with a town hall meeting, which is an apt comparison. It ruled that citizens are free to express their opinions and seek redress of their grievances.

“The suppression of critical commentary regarding elected officials is the quintessential form of viewpoint discrimination against which the First Amendment guards,” U.S. District Judge James Cacheris wrote in the trial court decision.

That may be unfortunate for Ms. Bennett and some other politicians who feel they have been unfairly targeted, but the judge is right. Political speech cannot be a one-way street, and free speech carries the day unless it rises to the level of a criminal threat or unlawful harassment.

Public figures can still take legal action against social media commenters who libel, threaten or harass them, but it’s harder for them to win those cases.

Rep. Neal Collins, R-Easley, has been called expletives on social media and had his face Photo-shopped onto a figure of someone burning a U.S. flag, among other things, and he blocked a few people from his accounts. Now he’s received a letter from an attorney saying he can’t legally do that. And, as the law stands, he has little choice other than to open the floodgates or close his accounts.

The rise of social media has no doubt blurred the lines between what is tolerable and what is legal, and it’s unfortunate that political discourse too often degenerates into a dumpster fire. Nevertheless, the law stands rightly on the side of free speech.