Are we doing it wrong?

When i found out i’m pregnant the only people knows about the situation is my husband and my friend. So i find out that my friend told his boyfriend about the situation which is fine with me because i already expect it’s going to happen , i just warned her if ever the boyfriend will find out just tell him not to talk about it to people specially my husband’s family cause we haven’t announce it yet. One day my MIL Called my husband that my friend’s boyfriend was telling them that i am pregnant. Of course that’s not how i want them to find out but the damage is done. The whole family was thrilled and keep asking question, since i’m not ready to tell we just told them no i’m not. Are we doing it wrong? Or should we just proceed and tell the family? I’m very upset about the situation.