عَنْ عَلِيٍّ رَضِيَ اللَّهُ عَنْهُ قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ لِلْمُسْلِمِ عَلَى الْمُسْلِمِ مِنَ الْمَعْرُوفِ سِتٌّ يُسَلِّمُ عَلَيْهِ إِذَا لَقِيَهُ وَيُشَمِّتُهُ إِذَا عَطَسَ وَيَعُودُهُ إِذَا مَرِضَ وَيُجِيبُهُ إِذَا دَعَاهُ وَيَشْهَدُهُ إِذَا تُوُفِّيَ وَيُحِبُّ لَهُ مَا يُحِبُّ لِنَفْسِهِ وَيَنْصَحُ لَهُ بِالْغَيْبِ
It is narrated from Sayyiduna Ali (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: A Muslim has six rights over another Muslim in the form of goodness: when he meets him, he should greet him with Salam; when he sneezes, he should say "Yarhamukallah" (may Allah have mercy on you); when he falls ill, he should visit him; when he invites him, he should accept; when he passes away, he should participate in his funeral prayer; whatever he likes for himself, he should like for him as well, and in his absence, he should wish well for him.