Naya Rivera will receive joint custody of her 2-year old son Josey, splitting legal and physical custody with soon to be ex-husband Ryan Dorsey.

According to official court documents obtained by the Blast, the two have agreed to consult, "on all major decisions related to the child’s health, education, and welfare." The report also claims this agreement is temporary and that the Rivera and Dorsey will finalize a permanent plan in the future.

Rivera has had a rough last several months. In November, the former Glee star was arrested in West Virginia on domestic battery charges for an incident in which she struck Dorsey in the head and lip while the two were walking down the street with their child. The incident was reportedly captured by Dorsey on a cell phone video he gave to authorities. Rivera only spent a couple of hours in jail before being released after posting $1,000 bond. On a lighter note, the incident provoked a pretty hilarious response from former fiancé Big Sean

Just weeks after her arrest, Rivera would file for divorce from Dorsey, citing "irreconcilable differences." That wasn't even the first time the couple have split. Back in November 2016, Rivera also filed for divorce before reversing her decision this past October.

A rep for Rivera told Page Six that "the family is working together peacefully and all matters have been amicably resolved."

Also Watch