Twitter sued the U.S. government last week to protect the identity of an anonymous user who had been tweeting critical things about President Donald Trump and his administration.
The move, and the fact that the government then rescinded its request for the user’s information, earned Twitter some praise online and in the press for standing up for free speech.
But this kind of pushback from Twitter is not uncommon. In fact, the company has a long history of taking legal action to protect anonymous users and their personal information.
In 2012, Twitter fought the New York district attorney to protect tweets sent by an Occupy Wall Street protester, and in 2014 it sued the U.S. government so that it could share these kinds of user information requests more publicly. Then in 2015, Twitter successfully protected the identity of two anonymous users who were being sued for defamation.
And the company also gets into legal fights where it doesn’t even have a stake. In early 2016, Twitter signed an amicus brief alongside Google in support of PubPeer, a website that allows people to comment anonymously on scholarly articles. PubPeer was being sued by a professor who received unflattering anonymous comments about his work.
In the brief, Twitter wrote that it was trying to ensure “that the first amendment right to speak anonymously is appropriately protected” and wanted to keep people from unfairly retaliating “against those whose opinions they dislike.”
In the company’s public transparency report for the second half of 2016, Twitter says that in 39 percent of user information requests, it either “did not comply with the request at all or only partially complied.” A lot of these legal skirmishes don’t get public attention because most legal challenges to the government are filed and kept under seal, according to a source familiar with Twitter’s efforts.
On the flip side, Twitter’s stance on free speech and user anonymity has gotten the company in trouble at times, too. It still has serious abuse issues and has been dealing with them for years. The fact that users can create accounts anonymously and pretty much say whatever they want (free speech!) means that Twitter has long had trouble eliminating nasty internet trolls.
The company has been trying more aggressively, though, recently giving users more controls over what they see. So while the comments may still exist, they might not necessarily reach their intended targets.
All of this is to say that Twitter — which gets justifiably smacked around for business problems — has long been a champion of free speech and protecting anonymous internet users. Thus, kudos are well deserved.
This article originally appeared on Recode.net.