One of the things I have learned ahead of parenting is to be my kids best friend and your friend could have continued suffering silently if she didn't have you pour out her mind to.
You did a great job standing by her all through and that's the true definition of friendship.