The Messenger of Allah ﷺ forbade buying and selling in the mosque, announcing lost property in it, and reciting poetry in it. He also forbade gathering in circles before the prayer on Friday.
أن رسول الله ﷺ نهى عن الشراء والبيع في المسجد، وأن تنشد فيه ضالة، وأن ينشد فيه شعر، ونهى عن التحلق قبل الصلاة يوم الجمعة.
Abu Dawud (1079) narrated it from Musaddad, who said, Yahya narrated to us, from Ibn Ajlan, from Amr bin Shuayb, from his father, from his grandfather, and he mentioned something similar. Tirmidhi (322) and Nasai (716) both narrated it from Qutayba, who said, Layth narrated to us, from Ibn Ajlan, with the same chain, but Tirmidhi did not mention the announcing of lost property, just as Nasai narrated it in abbreviated form, limiting it to the prohibition against reciting poetry in the masjid.Ibn Majah (749) narrated it through another route from Abu Khalid Ahmar, from Ibn Ajlan, and mentioned in it the prohibition against buying and selling, and against reciting poetry in masjids. Its isnad is hasan because of Ibn Ajlan and Amr bin Shuayb. Tirmidhi also graded it hasan. Ibn Khuzayma graded it sahih (1306), narrating the full hadith from Abu Khalid similar to the hadith of Yahya, just as he also narrated it from the hadith of Yahya bin Saeed with a similar wording (1304).