Amir b. Sa'd reported on the authority of his father that Messenger of Allah ﷺ came with a group of his Companions and he passed by the mosque of Banu Mu'awiya. The rest of the hadith is the same.
أَنَّهُ أَقْبَلَ مَعَ رَسُولِ اللَّهِ ﷺ فِي طَائِفَةٍ مِنْ أَصْحَابِهِ فَمَرَّ بِمَسْجِدِ بَنِي مُعَاوِيَةَ بِمِثْلِ حَدِيثِ ابْنِ نُمَيْرٍ