Did I do right by not paying?

My friends and I went to a cafe. We were 3 people. All of us ordered one tea each, and they ordered 2 coffees. I paid my share and one of my friends asked the other to cover for her since she's broke. She said no problem and did it. Later, after I left, my friend calls and tells me that the bill hasn't been paid fully and I need to pay more. I asked how and why, and she said that I have to cover for my friend, when she never even asked me to do it directly, and that her friend paid her 25 for the coffee in cash so she kept it. I was like huh? And since I myself didn't have a lot of money on me, I just went to the cafe, explained everything and moved on. The next day my friend texted me and asked why I didn't pay, I just ignored. Was I wrong?

Did I do right by not paying?
Post Opinion