I heard the Messenger of Allah ﷺ say, "The Muslim has five rights upon his fellow Muslim: returning the greeting of peace, visiting the sick, following funeral processions, accepting invitations, and responding to the one who sneezes."
سمعت رسول الله ﷺ يقول: حق المسلم على المسلم خمس: رد السلام، وعيادة المريض، واتباع الجنائز، وإجابة الدعوة، وتشميت العاطس.
Bukhari narrated it in the Book of Funerals (1240), and Muslim in the Book of Greetings (2162), both from the hadith of Ibn Shihab, who said, Saeed bin Musayab informed me that Abu Hurairah said, then he mentioned it.Muslim also narrated it through another route, from Ala, from his father, from Abu Hurairah, and in it, "The right of the Muslim upon the Muslim is six," and the sixth being, "and when he asks your advice, advise him," and in it, instead of returning the greeting, "when you meet him, greet him with peace."Bukhari also narrated it in Adab al-Mufrad (519) through a third route, from Umar bin Abu Salama, from his father, from Abu Hurairah, and in it, "Three things, all of them are a right upon every Muslim," and he mentioned three of them, "visiting the sick, attending the funeral, and saying to the sneezer who praises Allah ."However, Ibn Majah narrated it (1435) through the route of Muhammad bin Amr, from Abu Salama, from Abu Hurairah, and he mentioned in it the five, just like the hadith of Zuhri. This is more sahih because it agrees with Zuhri. So perhaps Umar bin Abu Salama shortened it.