Drunk Texting an Ex

My boyfriend went out with his friends one night a while back and ended up drunk texting his ex and flirting with her. She was making the first moves (she's engaged btw) and just being super inappropriate. I ended up seeing her send a kissy face (after he passed out from drinking) and saw the rest of the conversation and got pissed off at my boyfriend. He didn't even realize what he did until I said something about it later. As soon as he saw what happened he blocked her and deleted every trace of her and told me I meant everything to him. He said he couldn't lose me and he loves me so much. I forgave him but the situation kind of messed with my trust for a bit. There's never been a repeat of that problem again...did I do the right thing and did that mean anything?