Abu Hurairah reported,

A man passed by the Messenger of Allah ﷺ while he was sitting in a gathering and said, "Peace be upon you."The Prophet ﷺ said, "Ten good deeds."Then another man passed by and said, "Peace be upon you and the mercy of Allah."He said, "Twenty good deeds."Then another man passed by and said, "Peace be upon you and the mercy of Allah and His blessings."He said, "Thirty good deeds."Then a man got up from the gathering and left without giving the greeting of peace. The Prophet ﷺ said, "How quickly your companion forgot! When one of you comes to a gathering, let him give the greeting of peace. If he wishes to sit, let him sit. And when he gets up to leave, let him give the greeting of peace, for the first is no more deserving than the last."

Azami 12190

Sahih

عن أبي هريرة

أن رجلا مر على رسول الله ﷺ، وهو في مجلس، فقال: سلام عليكم. فقال: عشر حسنات. ثم مر رجل آخر فقال: سلام عليكم ورحمة الله. فقال: عشرون حسنة، فمر رجل آخر فقال: سلام عليكم ورحمة الله وبركاته. فقال: ثلاثون حسنة. فقام رجل من المجلس ولم يسلم، فقال النبي ﷺ: ما أوشك ما نسي صاحبكم! إذا جاء أحدكم إلى المجلس فليسلم، فإن بدا له أن يجلس فليجلس، فإن قام فليسلم، فليست الأولى بأحق من الآخرة.

الأعظمي 12190صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Tafsir of the great Quran
Chapter
Virtues of Surah Baqarah
Section
His saying, "And when you are greeted with a greeting, greet with one better than it or return it. Indeed, Allah is ever over all things an Accountant."
Numbering
Jami al-Kamil 12190 (2nd edition)
Azami 12190