The California Supreme Court on Thursday handed down a mixed-bag decision for Facebook, Instagram and Twitter in a case centered on whether criminal defendants can have access to social media posts by witnesses and others involved in an alleged crime.

In a unanimous 59-page decision written by Chief Justice Tani Cantil-Sakauye, the court ruled that social media service providers must comply when receiving a subpoena for posts marked as public by the user. The court rejected arguments by the companies that they have discretion not to comply under the federal Stored Communications Act.