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 the same. Tirmidhi (322) and Nasai (716) both narrated it from Qutayba, who said, Layth narrated to us, from Ibn Ajlan, with the same wording. Tirmidhi did not mention the seeking of a lost item, and Nasai narrated it in abridged form, limiting it to the prohibition of 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 of buying and selling, and of reciting poetry in masjids. Its chain is hasan, on account of Ibn Ajlan and Amr bin Shuayb, for both are truthful narrators. Tirmidhi also graded it hasan, and Ibn Khuzayma (1306) graded it sahih, narrating it from the hadith of Abu Khalid with the complete wording, similar to the hadith of Yahya.His saying, "He forbade forming circles," means people gathering for learning and discussion on Friday in the masjid, because someone who comes early to the masjid should prefer to occupy himself with prayer, supplication, and remembrance. Some scholars have understood this to mean that if the masjid is small and the gathering takes up the whole space available to those present, then it is disliked, but if the masjid is large and some people form a circle for learning and discussion, then there is no harm in it, as it has been established that some of the companions used to talk in the masjid until they heard the door open for the imam to come out, at which point they would sit down.