Messaged baby daddy

So my boyfriend left me when he found out he got me pregnant and he blocked me on everything and then 2 months later comes back saying he wants to be in both our lives and he loves me and wants me back and I said he hurt me too much and I can’t take him back but we can talk about you seeing our baby and then he got abusvie down the phone saying I was a whore and I probably cheated on him and I’m disgusting blah blah so I haven’t spoke to him since then but I’ve posted the gender of my baby on the internet and I’m wonder if he’s somehow seen it (snakey friends) and if he knows then I know not to let certain friends see my posts of my child in the future so I sent him a text saying “jw did you hear what gender I’m having” was this wrong of me to do? I just want to know how much privacy I really have online