Facebook is facing a new class action lawsuit for scanning private user messages to improve its targeted ads. Reuters reports that the company's effort to get the case dismissed were thwarted by U.S. District Judge Phyllis Hamilton, in a ruling on Tuesday in Oakland, California.

The lawsuit dates back to 2013, and alleges that Facebook scanned private chats for links to websites and equated them with public "likes." So, for example, if you sent your friend a link to a YouTube video, you might see more ads on Facebook related to that topic.

The company says it ended this practice in 2012, and now only scans private chats for spam and viruses. Facebook's lawyers also argued that its actions were protected under the Federal Electronic Communications Privacy Act. Regardless, the world's largest social network is heading to court, though it's unclear when the trial will begin.