A funeral procession passed by the Prophet ﷺ, and the people spoke well of the deceased. The Prophet ﷺ said, "It has been confirmed."Then another funeral procession passed by, and the people spoke ill of the deceased. The Prophet ﷺ said, "It has been confirmed."They asked, "Messenger of Allah, you said about the first and the second, 'It has been confirmed.'"The Prophet ﷺ replied, "The angels are Allah's witnesses in the heavens, and you are Allah's witnesses on the earth."
أخبرنا محمد بن بشار قال حدثنا هشام بن عبد الملك قال حدثنا شعبة قال سمعت إبراهيم بن عامر وجده أمية بن خلف قال سمعت عامر بن سعد
مروا بجنازة على النبي ﷺ فأثنوا عليها خيرا فقال النبي ﷺ وجبت ثم مروا بجنازة أخرى فأثنوا عليها شرا فقال النبي ﷺ وجبت قالوا يا رسول الله قولك الأولى والأخرى وجبت فقال النبي ﷺ الملائكة شهداء الله في السماء وأنتم شهداء الله في الأرض
[Sahih] Narrated by Abu Dawud, in the book of Funerals, chapter on praising the deceased, no: 3233, from the hadith of Shubah with this wording. It is also found in Sunan al-Kubra, no: 2060, and its chain of transmission is hasan. It has a corroborating narration agreed upon by Bukhari and Muslim, Bukhari, no: 2642, and Muslim, no: 949/60b, from the hadith of Thabit, from Anas , with this wording. 60b