A man came to the Messenger of Allah ﷺ and asked, "Messenger of Allah, when will the Hour come?"The Prophet ﷺ then rose for the prayer. After he finished his prayer, he said, "Where is the one who asked about the Hour?"The man replied, "It is I, Messenger of Allah."He asked, "What have you prepared for it?"The man said, "Messenger of Allah, I have not prepared much in the way of prayer or fasting, except that I love Allah and His Messenger."The Messenger of Allah ﷺ said, "A person will be with those he loves, and you will be with those you love."I have never seen the Muslims rejoice over anything after Islam itself as much as they rejoiced over this.
حدثنا علي بن حجر أخبرنا إسمعيل بن جعفر عن حميد
جاء رجل إلى رسول الله ﷺ فقال يا رسول الله متى قيام الساعة فقام النبي ﷺ إلى الصلاة فلما قضى صلاته قال أين السائل عن قيام الساعة فقال الرجل أنا يا رسول الله قال ما أعددت لها قال يا رسول الله ما أعددت لها كبير صلاة ولا صوم إلا أني أحب الله ورسوله فقال رسول الله ﷺ المرء مع من أحب وأنت مع من أحببت فما رأيت فرح المسلمون بعد الإسلام فرحهم بهذا
Grading, sahih. Ahmad reported it (3/104) from the hadith of Humayd Tawil with this chain, and Ibn Hibban graded it sahih (Al-Ihsan, 105). The hadith has supporting narrations in Bukhari, no. 3688, 6167, 6171, 7153, and Muslim, no. 2639, and others.