Thanks to a growing number of state and local government officials, not to mention national actors like President Trump, questions abound these days about the constitutionality of public officials blocking people on social media.

The answers to those questions are complicated and depend on the facts of any given case. But, as we explain in a brief we filed in a Virginia lawsuit this week, the proper framework for courts to use in considering these cases should ensure that as our democracy increasingly moves online, the Constitution applies with no less force on the internet than it does offline.

Two main principles should govern these cases: First, individuals do not lose their First Amendment rights just by virtue of gaining public office, no matter how powerful they are. Second, when they act on behalf of the government, elected officials are also subject to the limits that the First Amendment imposes on them as government actors.

To answer this conundrum, courts must begin by asking which role a public official embodies on a given social media account: that of a private speaker or a government actor. If the answer is “private speaker,” she can limit her audience and curate the messages on the page, just like any other member of the public. But if the answer is “government actor,” the First Amendment dictates that she can’t prohibit access to her social media in three specific circumstances.

First, once she intentionally opens up her social media for public conversation, she can’t stop people from joining in because of the views they express on the topics at hand. Second, if she generally allows individuals to ask for government services through her social media account, she can’t block critical voices from doing so. And, finally, if she uses her account to publicly share government information, she can’t prevent people from actually being able to see her posts because of their viewpoints.

This is all for good reason. Allowing a government actor to ban critics from speaking in public forums would silence and chill dissent, warp the public conversation, and skew public perception. And enabling government actors to block critics from petitioning them for services or seeing public information would mean punishing them for speaking out or holding critical views.

How does a court apply that test to specific facts? Let’s consider the Virginia case. There, a chairwoman of the board of supervisors of Loudoun County, Va., created an “official chairwoman” Facebook page. She uses that official page to share information with constituents, give them a space to discuss “any issues,” and find out who needs emergency relief during snowstorms. She generally keeps the page open to all, but she briefly blocked the plaintiff in the case — a constituent who criticized members of the board she chairs.

In this circumstance, we think the chairwoman is clearly a “government actor” because of the contents of the page and its links to her activity as a public official. That leads to the next question: Does she offer the page as a public forum, a way to petition her for public services, or as a space to share government information? Her posts inviting “any” constituent to comment on “any issues” suggest that she has at least opened it up as a place for public discussion. That means that she violated the First Amendment by blocking a constituent from commenting on her page because he expressed criticism of her colleagues.

Let’s try one more. What about President Trump? @realDonaldTrump is clearly an official government account, by the Department of Justice’s own admission. That means Trump cannot claim that the First Amendment does not apply to the digital acts conducted on that account. The second part of the test depends on the facts that will be found by the court: namely, whether President Trump has opened his feed up as a forum for public discussion. If the answer is yes, his blocking of users violates the Constitution. If the answer is no, the public is still entitled to see his tweets, since he issues official decisions — like his intention to ban transgender people from serving in the military — through that account. However, given Twitter’s current policies, even those “blocked” by a certain account, or those without a Twitter account at all, can still see public tweets. So it may be a social media company’s specific technology that dictates the ultimate constitutional result in that case.

More often than not, the First Amendment traffics in nuance, detail, and government intent. In applying it to the internet, we should expect nothing less.