Sahih al Bukhari 6169
Good Manners and Form (Al-Adab)
حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، حَدَّثَنَا جَرِيرٌ، عَنِ الأَعْمَشِ، عَنْ أَبِي وَائِلٍ، قَالَ قَالَ عَبْدُ اللَّهِ بْنُ مَسْعُودٍ ـ رضى الله عنه جَاءَ رَجُلٌ إِلَى رَسُولِ اللَّهِ صلى الله عليه وسلم فَقَالَ يَا رَسُولَ اللَّهِ كَيْفَ تَقُولُ فِي رَجُلٍ أَحَبَّ قَوْمًا وَلَمْ يَلْحَقْ بِهِمْ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " الْمَرْءُ مَعَ مَنْ أَحَبَّ ". تَابَعَهُ جَرِيرُ بْنُ حَازِمٍ وَسُلَيْمَانُ بْنُ قَرْمٍ وَأَبُو عَوَانَةَ عَنِ الأَعْمَشِ عَنْ أَبِي وَائِلٍ عَنْ عَبْدِ اللَّهِ عَنِ النَّبِيِّ صلى الله عليه وسلم.
Narrated `Abdullah bin Mas`ud:A man came to Allah's Messenger (ﷺ) and said, "O Allah's Messenger (ﷺ)! What do you say about a man who loves some people but cannot catch up with their good deeds?" Allah's Messenger (ﷺ) said, "Everyone will be with those whom he loves
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.