Ok, say I did not attend mass one Sunday, and it was totally my fault. Next Sunday I went to mass and recieved Holy Communion. Shortly after, I went to confession and told the priest that I had missed mass. However, at that time, I really did not even know the difference between mortal and venial sins, or that missing mass was a mortal sin, I just knew that it was bad.
I recently learned that missing Sunday mass is a mortal sin, and thus I should not have recieved Holy Communion before going to confession. Is that then a sin for having recieved the Eucharist after commiting a mortal sin even if I did not know it was a mortal sin?