Mishkat al-Masabih
‘Ali said that God’s messenger had told them to stand at a funeral, but later he sat and ordered them to sit. Ahmad transmitted it.
وَعَنْ عَلِيٍّ قَالَ: كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ أَمَرَنَا بِالْقِيَامِ فِي الْجَنَازَةِ ثُمَّ جَلَسَ بَعْدَ ذَلِكَ وَأَمَرَنَا بِالْجُلُوسِ. رَوَاهُ أَحْمد
Reference