Sulayk al-Ghatafani came while the Messenger of Allah ﷺ was delivering the sermon. The Prophet ﷺ asked him, "Did you pray two rakahs before coming?"He replied, "No."The Prophet said, "Then pray two rakahs and keep them brief."
حدثنا داود بن رشيد حدثنا حفص بن غياث عن الأعمش عن أبي صالح عن أبي هريرة وعن أبي سفيان
جاء سليك الغطفاني ورسول الله ﷺ يخطب فقال له النبي ﷺ أصليت ركعتين قبل أن تجيء قال لا قال فصل ركعتين وتجوز فيهما
[Its chain of transmission is daif]. Ibn Mulaqqin graded it sahih in Tuhfat al-Muhtaj, 1/399, kh 434. Hafs bin Ghiyath was described by Ahmad and Daraqutni as engaging in tadlis of the first rank among those who practice concealment, according to Hafiz. I did not find an explicit statement that he actually heard it, and according to the more correct view, a mudallis's use of "an" (from) is not relied upon outside the Sahihayn.Muslim narrated it in the Book of Friday Prayer, chapter on the greeting while the imam is delivering the sermon, hadith 875, through the route of Amash with the same wording, but he did not mention the phrase "before he comes."