Ja'far bin Muhammad narrates from his father, from his grandfather, who said: When the Messenger of Allah (peace be upon him) passed away and people came to offer condolences, he heard a man saying: "There are those who offer condolences in every calamity from Allah, and there are successors for everyone who perishes, and there are inheritors for everyone who passes away. Place your trust in Allah, and have hope only in Him. Truly, the real afflicted one is the one who is deprived of reward."
Hadith Referenceمسند الإمام الشافعي / كتاب الجنائز / 603
Hadith Takhrijاسناده ضعيف جدا، فان القاسم بن عبدالله بن عمر متروك : اخرجه البيهقي : 4/ 60 ۔ وفي المعرفة السنن والآثار له (2188)۔
Abdullah bin Ja'far narrates that when the news of Ja'far (may Allah be pleased with him)'s martyrdom came, the Messenger of Allah (peace and blessings be upon him) said: Prepare food for the family of Ja'far, for a news has come to them that has preoccupied them or will preoccupy them. The narrator Sufyan was uncertain.
Hadith Referenceمسند الإمام الشافعي / كتاب الجنائز / 604
Hadith Takhrijاخرجه ابوداود، الجنائز، باب صنعة الطعام لأهل البيت (3122) والترمذى، الجنائز، باب ماجاء في الطعام يصنع لأهل الميت (998) وقال حسن صحيح وابن ماجة، الجنائز، باب ماجاء في الطعام يبعث الى اهل الميت (1610) وصححه الحلكم : 1/372 ۔ ووافقه الذهبي۔