Someone said to the Messenger of Allah ﷺ, "What do you think of a man who does a good deed and people praise him for it?"He replied, "That is the immediate good tidings for the believer."In another wording, "and people love him for it" instead of "and people praise him for it."
قيل لرسول الله ﷺ: أرأيت الرجل يعمل العمل من الخير، ويحمده الناس عليه؟ قال: تلك عاجل بشرى المؤمن. وفي لفظ: ويحبه الناس عليه بدل ويحمده الناس عليه.
Muslim narrated it in the Chapter on Divine Decree (2642:166) through multiple routes from Hammad bin Zayd, from Abu Imran Jawni, from Abdullah bin Samit, from Abu Dharr, and he mentioned it.He also narrated it through multiple routes from Shubah, from Abu Imran, similarly, except that in the version narrated by most of the transmitters from Shubah it reads, "and the people love him for it."