Depo shot

Summer
I started the depo shot yesterday, very painful periods to the point that I vomit and passed out because of the pain. My Gyn thinks I have classic endometriosis. 😰 Anyways she didn't tell me when the shot would be affective so that same day while having sex my partner finished inside me. Should I be safe?