Hadithcore
Mishkat al-Masabih, 732

‘Amr b. Shu'aib on his father’s authority reported his grandfather as saying that God’s Messenger prohibited the recitation of poems in a mosque, buying and selling in it, and sitting in a circle in a mosque on Friday before the prayer. Abu Dawud and Tirmidhi transmitted it.

وَعَنْ عَمْرِو بْنِ شُعَيْبٍ عَنْ أَبِيهِ عَنْ جَدِّهِ قَالَ: نَهَى رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ عَنْ تَنَاشُدِ الْأَشْعَارِ فِي الْمَسْجِدِ وَعَنِ الْبَيْعِ وَالِاشْتِرَاءِ فِيهِ وَأَنْ يَتَحَلَّقَ النَّاسُ يَوْمَ الْجُمُعَةِ قَبْلَ الصَّلَاةِ فِي الْمَسْجِدِ. رَوَاهُ أَبُو دَاوُد وَالتِّرْمِذِيّ

References1 variant
In-Book Reference
Book 4, Hadith 161