The Prophet ﷺ delivered a sermon and mentioned the story contained in the hadith. Abu Shah said, "Write it down for me, Messenger of Allah."The Messenger of Allah ﷺ said, "Write it down for Abu Shah."The hadith contains a longer story.
حدثنا يحيى بن موسى ومحمود بن غيلان قالا حدثنا الوليد بن مسلم حدثنا الأوزاعي عن يحيى بن أبي كثير عن أبي سلمة
أن النبي ﷺ خطب فذكر القصة في الحديث قال أبو شاه اكتبوا لي يا رسول الله فقال رسول الله ﷺ اكتبوا لأبي شاه وفي الحديث قصة
No references are available.
Agreed upon (by Bukhari and Muslim). Bukhari narrated it in the Book of Lost Property, Chapter on how the lost property of the people of Makkah is announced, hadith no. 2434, from Yahya bin Musa, and Muslim, hadith no. 1355, from the hadith of Walid bin Muslim, with the same wording.