It was narrated that Abu Jabirah bin Dahhak said:
(Allah's saying) Nor insult one another by nicknames(Surah Al Hujarat 49:11) was revealed concerning us, the Ansar. When the Prophet(ﷺ) came to us, a man among us would have two or three names, and the Prophet(ﷺ) might call him by one of those names, only to be told: O Messenger of Allah(ﷺ), he does not like that name. Then: Nor insult one another by nicknames. was revealed.