The Messenger of Allah ﷺ said, "When one of you arrives at a gathering, let him give the greeting of peace, and when he wishes to leave, let him give the greeting of peace. The first is no more deserving than the last."
قال رسول الله ﷺ: إذا انتهى أحدكم إلى المجلس فليسلم، فإذا أراد أن يقوم فليسلم، فليست الأولى بأحق من الآخرة.
Reported by Abu Dawud (5208), Tirmidhi (2706), Bukhari in Adab al-Mufrad (1007, 1008), and Ahmad (7142), and Ibn Hibban graded it sahih (494-496), all of them through various routes from Muhammad bin Ajlan, from Saeed bin Abu Saeed Maqburi, from Abu Hurairah, who related it.Tirmidhi said, "This is a hasan hadith. This hadith has also been narrated from Ibn Ajlan, from Saeed Maqburi, from his father, from Abu Hurairah, from the Prophet ﷺ."I say, the correct view is that of those who said, from Saeed Maqburi, from Abu Hurairah, as Daraqutni stated in Ilal (10/390), for a large number of narrators reported it from Ibn Ajlan in this way, and its isnad is hasan because of Ibn Ajlan.Yaqub bin Zayd Taymi corroborated him on this version. It was reported by Bukhari in Adab al-Mufrad (986), and Ibn Hibban graded it sahih (493), both of them through the route of Yaqub, from Maqburi, from Abu Hurairah, and his wording is longer, and it is mentioned in its proper place.