A federal appeals court found that law enforcement violated a Google user’s constitutional rights when it opened email attachments the platform flagged as child pornography through an automated system.

The ruling comes as Apple Inc. faced backlash from privacy advocates in August after announcing a feature that scans photos on its devices for child sexual abuse materials.