I’ve been best friends with both of these girls since 4th and 5th grade, I’ll use the names Emma and Lily to address them

One day I was on the phone with my best friend Emma and Emma said “don’t tell Lily but I secretly hate her, she’s so annoying” I didn’t say anything at the time which I regret but after this I told Lily that Emma said she hates her. Lily starts bursting out in tears. She’s basically sobbing at this point, and I feel really bad about this. Anyways after a few hours everyone in our friend group finds about this and calls me an asshole for telling Lily what Emma said. 

I don’t think I did anything wrong, I would wanna know if someone was being a fake friend to me.