Facebook's sending of an automated text message regarding a suspicious login to a person who had not opted in for such messages is not the equivalent of a robocall by a telemarketer, the Supreme Court ruled unanimously today.

You may not have heard about this case given all the far more grievous wrongs that Facebook has committed in recent years, but a man named Noah Duguid has been coming after the company for seven years now after he claims to have received numerous unwanted texts about an account he did not even have on the platform. The offending text messages date back to 2014, and as CNBC reports, Duguid and his attorneys have been using the case to argue that Facebook violated the 1991 Telephone Consumer Protection Act, which banned unsolicited robocalls by automated dialers.

The law explicitly prohibits calls made by an "automatic telephone dialing system," which is described in the text of the law as a device that can "store or produce telephone numbers to be called, using a random or sequential number generator" and then dial those numbers. And the case ended up hinging on that comma in the last part, and a grammar textbook, and whether Facebook was just storing or actually randomly generating Duguid's phone number.

Duguid said that Facebook continued to send messages to his phone about an account he did not have, telling him about login attempts on a new device or browser, even after the company had told him "Facebook texts are now off." So he decided to bring a class action lawsuit over the matter, on behalf of him and all other aggrieved non-users of Facebook who have received such texts.

As the Associated Press reports, Facebook has been arguing in federal district court and an appeals court prior to this reaching the Supreme Court that Duguid had no case because Facebook uses no such number generator — and the reason it had Duguid's cellphone number at all was likely because it previously belonged to a Facebook user who had opted in for text alerts.

But here's where it gets real grammar-nerdy.

Justice Sonia Sotomayor, writing for the majority, pointed to a grammatical construction known as the "series-qualifier canon." "As several leading treatises explain," Sotomayor writes, a "qualifying phrase separated from antecedents by a comma is evidence that the qualifier is supposed to apply to all the antecedents instead of only to the immediately preceding one."

The appeals court had ruled that Facebook was in the wrong because it had a device that had "stored" Duguid's number, and that the phrasing of the law separated "store" from "produce" with regard to the "random or sequential number generator."

That makes no logical sense, Sotomayor writes. She uses the example of a made-up sentence in which a teacher tells students they "must not complete or check any homework to be turned in for a grade, using online homework-help websites.”

"It would be strange to read that rule as prohibiting students from completing homework altogether, with or without online support," Sotomayor wrote.

This would mean that the law does not prohibit Facebook from storing a cellphone number — in this case, apparently, one that used to belong to someone else — and sending a text to it, even if it's in error.

Justice Samuel Alito wrote a separate but concurring opinion in the case, agreeing with most of Sotomayor's argument, but saying he objected to what he called "heavy reliance" of late on the series-qualifier canon. He said this particular mode of grammatical parsing had come to play "a prominent role in our statutory interpretation cases."

Sotomayor countered in a footnote that, unfortunately, there will likely always be arguments about phrases like this, and "Difficult ambiguities in statutory text will inevitably arise, despite the best efforts of legislators writing in 'English prose.'"

Anyway, Facebook wins, grammar wins, and I can't believe this took up so much of the courts' time.