A funeral procession passed by the Messenger of Allah ﷺ, and the people spoke well of the deceased. He said, "It has become certain."Then another funeral procession passed by him, and the people spoke ill of the deceased. He said, "It has become certain."They asked, "Messenger of Allah, what has become certain?"He replied, "You are witnesses for one another."
حدثنا وكيع عن سفيان ومسعر عن إبراهيم بن عامر بن مسعود الجمحي قال سفيان عن عامر بن سعد وقال مسعر أظنه عن عامر بن سعد
مروا على رسول الله ﷺ بجنازة فأثنوا عليها خيرا فقال وجبت ثم مروا عليه بجنازة فأثنوا عليها شرا فقال وجبت فقالوا يا رسول الله ما وجبت قال بعضكم شهداء على بعض
Its isnad is sahih, through the route of Amir bin Saad, and it has already appeared under 389. The hadith was narrated by Bukhari 2/121, Abu Dawud 3233, Tirmidhi 2897, and Nasai 2/171.