Yahya related to me from Malik from Yahya ibn Said from Wafid ibn Amr ibn Said ibn Muadh from Nafi ibn Jubayr ibn Mutim from Masud ibn al-Hakam from AIi ibn Abi Talib that the Messenger of Allah ﷺ used to stand up when a funeral procession passed by, and then sit down again afterwards.
أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ يَقُومُ فِي الْجَنَائِزِ ثُمَّ جَلَسَ بَعْدُ