A former Inver Grove Heights lunch lady admitted to sexting a middle-school student in court on Thursday in a case that sparked a First Amendment debate.

Krista A. Muccio, 44, pleaded guilty to one count of communicating with a minor describing sexual conduct in Dakota County court. Her plea was under the condition that a charge of possessing pornographic work involving minors be dropped. She is expected to serve 30 days in jail, pay fines and seek behavioral therapy.

In November 2014, the boy’s father was scanning through a folder of deleted images on the 15-year-old boy’s iPad and found nude photos sent from Muccio. Police investigated and found texts from Muccio saying she wanted to have sex with the boy, according to charges. Muccio admitted to sending the boy “pictures of stuff online and girls in bikinis” and that the boy sent her photos of his genitals in return. The two had been exchanging photos on Instagram since June that year.

Muccio sought to appeal the first count of communicating with a minor describing sexual conduct as her attorney filed an appeal that argued the state’s law prohibiting sexting minors was overbroad and potentially captured constitutionally protected speech.

In June 2016, the Minnesota Court of Appeals found the state’s sexting law unconstitutional, but the state’s Supreme Court overruled the free-speech appeal last March.

Muccio’s sentencing hearing is scheduled for April 6.

Trevor Squire is a University of Minnesota student on assignment for the Star Tribune.