AITA for telling my cousin that I won’t be attending his wedding if my girlfriend is not invited?

So my girlfriend (23F) and I (25M) have been dating for about 4 years. When I first introduced her to my friends, I noticed that she was getting along really well with my cousin, Dan (25M). They had a similar sense of humor and common interests. Seeing my girlfriend challenge him to a shots competition and get him drunk on tequila was the highlight of our first New Year’s together. It made me really happy to see them become friends, since me and Dan are very close as well.

Dan started dating Joana (24F) a year and a half ago, and they got engaged last December. He called me last week and asked me if I wanted to be the best man at his wedding. Obviously I said yes. While we were talking, I mentioned how excited my girlfriend was for them and the wedding. That was the moment when he got quiet. I asked him if something happened, and he said that he and Joana decided to have a small wedding, with only family and close friends, and that no partners were allowed if they were not married or at least engaged. I got angry and asked how they could even think of this rule without taking our relationship into consideration. Dan told me that while he wanted my girlfriend there, if they made an exeption for us, then other people would expect it as well, so there was nothing he could do.

When I told my girlfriend about what happened, she was visibly hurt. So 2 days ago I texted Joana and asked her if she Dan discussed about our ‘situation’. She said that she doesn’t want a stranger at their wedding and that she doesn’t consider her family, regardless of how serious our relationship is. I snapped and told Joana that most of Dan’s family (therefore mine) see my girlfriend as part of the family more that they see her, since she didn’t bother to build relationships with relatives other than Dan’s parents.

Well, Joana got mad and told my cousin about what happened. He called me an asshole and told me that I have to apologise if don’t want to be replaced as best man. I told him to do it, because I won’t be attending the wedding if my girlfriend isn’t invited. Dan hasn’t spoken to me since and my girlfriend keeps telling me that I should just apologise, because she doesn’t want to be the reason why I don’t have a relationship with my cousin anymore.

AITA?