Someone asked the Prophet ﷺ, "What about a man who loves a people but has not yet joined them?"He replied, "A person is with those he loves."
قيل للنبي ﷺ: الرجل يحب القوم ولما يلحق بهم؟ قال: المرء مع من أحب.
Bukhari narrated it in al-Adab (6170), and Muslim in al-Birr wal-Silah (2641), both through various routes from Amash, from Abu Waail, from Abu Musa, who related it.