Sunan an-Nasa'i 1933
It was narrated that Abu Hurairah said:
"A funeral passed by the Prophet and they praised (the deceased). The Prophet ﷺ said: 'It is granted.' Then another funeral passed by and they criticized (the deceased). The Prophet ﷺ said: 'It is granted.' They said: 'O Messenger of Allah, you said in both cases, 'It is granted?' The Prophet ﷺ said: 'The angels are the witnesses of Allah in heaven, and you are the witnesses of Allah on Earth."'
أَخْبَرَنَا مُحَمَّدُ بْنُ بَشَّارٍ، قَالَ حَدَّثَنَا هِشَامُ بْنُ عَبْدِ الْمَلِكِ، قَالَ حَدَّثَنَا شُعْبَةُ، قَالَ سَمِعْتُ إِبْرَاهِيمَ بْنَ عَامِرٍ، وَجَدُّهُ، أُمَيَّةُ بْنُ خَلَفٍ قَالَ سَمِعْتُ عَامِرَ بْنَ سَعْدٍ، عَنْ أَبِي هُرَيْرَةَ، قَالَ مَرُّوا بِجَنَازَةٍ عَلَى النَّبِيِّ ﷺ فَأَثْنَوْا عَلَيْهَا خَيْرًا فَقَالَ النَّبِيُّ ﷺ " وَجَبَتْ " . ثُمَّ مَرُّوا بِجَنَازَةٍ أُخْرَى فَأَثْنَوْا عَلَيْهَا شَرًّا فَقَالَ النَّبِيُّ ﷺ " وَجَبَتْ " . قَالُوا يَا رَسُولَ اللَّهِ قَوْلُكَ الأُولَى وَالأُخْرَى " وَجَبَتْ " . فَقَالَ النَّبِيُّ ﷺ " الْمَلاَئِكَةُ شُهَدَاءُ اللَّهِ فِي السَّمَاءِ وَأَنْتُمْ شُهَدَاءُ اللَّهِ فِي الأَرْضِ " .