I've never been happy about taking revenge. I've only done it a few times, and each time I've just felt terrible about what I've done. Sometimes this is because when I've found out more details it's turned out that the person wasn't fully responsible for what happened, or had things going on in their life that made them act in ways they probably wouldn't have otherwise. Other times the revenge ends up being out of proportion to the first "wrong". When I've taken violent revenge - and this has only been a couple of times when I was young - it's quite horrible watching somebody in agony that you have caused, and the guilt has lasted longer than it would have taken to get over whatever wrong they did me. It's actually left me in tears trying to help the person I've punched unnecessarily hard in the kidneys or kicked in the shins with steel toe caps after a 10 metre run up. (I'm talking 25 years ago here, I don't do these things now! Unless you really piss me off

no I don't do that.)
I've found forgiving people to be quite an empowering thing. I'm not coming at this from a Christian perspective, don't get me wrong. But it is just quite a nice feeling to be able to let bygones be bygones, and if the person is a friend, it often strengthens the friendship. I recommend it, it can be very difficult, but because of that you also have the sense of achievement of overcoming your less attractive impulses.
The other alternative, if you can't forgive them, is simply to remove them from your social circle. Again not always easy, but at least you're not constantly reminded of how you were fucked over. I suppose if it's something serious they're likely to do again to others, then there is no harm in
discreetly letting people know that the person has certain unpleasant proclivities they should watch out for.