that's classic #reappropriation
so, a slur is used on you:
what do you do?
you smile and embrace the insult and turn the term into one of pride
happens for individuals
happens for groups
it's quite powerful
"queer" is a classic example
so is "yankee" believe it or not
thousands of other examples
https://en.wikipedia.org/wiki/Reappropriation