How to tell friends struggling with fertility about pregnancy?

Our friends have been TTC for over a year. In august they found out they basically have a 0% chance of conceiving their own kids. They have taken this very hard, as expected.

My boyfriend and I recently found out I’m expecting. He’s really excited to tell them but I’m super nervous as I know it will be a hit to them. He wants to tell them in person but I’ve suggested doing so over text to give them time to process their emotions alone. I know they’ll be happy for us but I also know it will make them sad for themselves.

What do you think is the best way to tell them?