In a censorship case filed against YouTube by LGBTQ content creators, the U.S. Justice Department is defending the law that protects internet companies from lawsuits -- the same statute President Donald Trump has threatened to revoke.

Trump targeted the 1996 law in an executive order last week as he escalated a fight with Twitter after it tagged two of his tweets as potentially misleading. But three weeks earlier, the Justice Department weighed into the YouTube case and urged a federal judge not to declare the law unconstitutional after the content creators said it allows the Google video-sharing site to violate their free-speech rights.

The content makers accuse YouTube of using unlawful policies and algorithms to restrict the videos they post and strip them of ad revenue. The company denies discriminating against creators and claims it’s immune from the suit under section 230 of the Communications Decency Act, which shields tech platforms from being sued over content that users post on their sites.

At a hearing Tuesday, U.S. Magistrate Judge Virginia DeMarchi said she’ll issue a ruling in coming weeks on whether to let the case proceed.

The Justice Department’s view is “not surprising” as courts have ruled that social media platforms aren’t government bodies and people don’t have constitutional rights against them, said Nathaniel Persily, a professor at Stanford Law School.

“It will be very interesting to see in the future whether the admonition in the executive order to conduct investigations on companies on viewpoint-based discrimination would then lead the DOJ not to take positions like this in these cases,” Persily said.

YouTube was sued last year by media company Divino Group, which produces content for the LGBTQ community, and a dozen creators, including Greg Scarnici, an associate producer for “Saturday Night Live.”

Divino Group on Monday asked the court to address Trump’s executive order because it directs the Justice Department to “act in a manner that is substantially different from the arguments advanced” in the government’s filing in the YouTube case.

At the hearing, Justice Department attorney Indraneel Sur noted that the executive order states that it isn’t “enforceable.”

The provisions of the order “are all points about policy, essentially directing various executive branch actors to various tings, but don’t go into any question of constitutionality,” Sur said.

Courts have thrown out other censorship cases targeting social media companies. The U.S. Court of Appeals in San Francisco in February dismissed a suit by conservative media company PragerU alleging YouTube unlawfully censored its videos because of the political views they espoused. The court ruled that although YouTube is like a “public square” on the internet, it’s beyond the reach of the First Amendment.

Peter Obstler, who represented PragerU, had argued YouTube is a state actor because it performs a public function. As the attorney for Divino Group, he’s trying a different approach -- arguing that YouTube is discriminating against LGBTQ creators based on their personal sexual orientations even before looking at their content.

YouTube has engaged in a pattern of deleting thumbnail images created by LGBTQ video makers and blocking viewers from posting comments on their content, according to Divino Group. A content maker who complained about YouTube’s practices was told by a YouTube supervisor that “company policy” deemed LGBTQ content as “sexually explicit,” solely because a video involved “the gay thing,” according to the complaint.

Such actions to restrain and interfere with content made by LGBTQ creators “have little, if anything, to do with filtering the actual content of the videos uploaded to the YouTube platform,” Obstler said in a court filing.

YouTube Chief Executive Officer Susan Wojcicki told Bloomberg Television last week the online video giant operates without prejudice and is open to all opinions. “We have worked extraordinarily hard to make sure that all of our policies and systems are built in a fair and neutral and consistent way,” she said in response to Trump’s executive order.

Divino Group’s claim that YouTube violates First Amendment rights is a “stretch,” Persily said. But there may be some “wiggle room” to prove discrimination by YouTube under the plaintiffs’ state law claims, he said.

DeMarchi told Obstler at the hearing that California’s civil rights law outlawing discrimination is “the only one that I think gives you a leg to stand on.”

The case is Divino Group LLC v. Google LLC, 19-cv-04749, U.S. District Court, Northern District of California (San Jose).