On Tuesday, U.S. District Judge Phyllis Hamilton in Oakland, California, denied Facebook’s bid to dismiss a class action lawsuit filed by Facebook users Matthew Campbell and Michael Hurly in 2013, reports Reuters. The lawsuit charged the social media giant with violating its users’ privacy by scanning their private messages for targeted advertising.

Campbell v. Facebook Inc, U.S. District Court, Northern District of California, No. 13-5996, alleges that Facebook violated the Electronic Communications Privacy Act and federal and California laws by: scanning private messages for links to websites; counting those links as "likes" of the pages; and using those "likes" to collect user profiles that were then used to deliver targeted advertising. The lawsuit sought class action status on behalf of American Facebook users who may have sent or received private messages that included website addresses in the content.

The lawsuit asks for $10,000 in damages per user who may have sent or received messages with links in them and also wished to bar Facebook from intercepting messages, according to a Bloomberg report on the lawsuit in January. 

In its bid to dismiss the lawsuit, Facebook had argued that scanning users' messages was covered by an exception under the federal Electronic Communications Privacy Act, which it asserts allows for interceptions by service providers if they occur during “the ordinary course of business.” But U.S. District Judge Phyllis Hamilton said Facebook had "not offered a sufficient explanation of how the challenged practice falls within the ordinary course of its business."

Tuesday's ruling stated that Facebook stopped its private message scanning in October 2012, but Facebook acknowledges that it still analyzes messages to protect against viruses and spam. Google is under similar legal scrutiny for message scanning as well, according to Endgadget, although not of the class-action variety. 

The scanning “is a mechanism for Facebook to surreptitiously gather data in an effort to improve its marketing algorithms and increase its ability to profit from data about Facebook users,” the plaintiffs' attorney Michael Sobol wrote in the  complaint. Last January, Jackie Rooney, a spokeswoman for Facebook, reports Bloomberg, said the company deemed the allegations “without merit.”