Did I act right???

So a quick backstory... my friend and her boyfriend got together this summer. She was always competing with me about stuff - who got their drivers license first, who has more expensive makeup, who moved out first etc. We're both 20-21, and well I moved in with my boyfriend of 3 years this April. She always had smth to say about this in the style "you'll break up" and I just ignored her. Me and my boo get along very well with her boyfriend, they actually know each other since they were little kids so we always laughed and made jokes whenever we would hang out - she was always so mad/jealous that me and her BF got along so well and would throw insane tantrums at us. She has some psycho trust issues with him and would yell at him when we were hanging out etc., I was actually embaressed for her. So last month I had some pregnancy scares (late period, positive test) and she literally told me that I was lying and that everything was in my head (?). Guess what, this month she told me that she forgot to take the pill so often that she believes she's pregnant and that she told her BF about it. I knew she was lying because the guy told me that he doesn't want kids yet, so I went out with him alone and told him EVERYTHING. He (and his sister) thanked me for the info and for caring about him and his life, but this "friend" started to threaten me over messenger and blocked me everywhere - I'm really scared she'll do something to me (physically). So now we're waiting for tommorrow, when she has the appointment to see if she's pregnant or not (we're all praying that she's not because her BF wanted to break up with her anyways). I feel really guilty, but on the other hand she was becoming more and more psycho and just focused so hard on being pregnant that she lost all touch with reality, so I know I acted right when I told him. Idk if I acted right, I know it wasn't my call to make but she literally wanted to force him to stay with her (they were having some troubles because of her jealousy and psycho acting) because of the child and I just couldn't stand there and do nothing.