Mishkat al-Masabih 732
وَعَنْ عَمْرِو بْنِ شُعَيْبٍ عَنْ أَبِيهِ عَنْ جَدِّهِ قَالَ: نَهَى رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ عَنْ تَنَاشُدِ الْأَشْعَارِ فِي الْمَسْجِدِ وَعَنِ الْبَيْعِ وَالِاشْتِرَاءِ فِيهِ وَأَنْ يَتَحَلَّقَ النَّاسُ يَوْمَ الْجُمُعَةِ قَبْلَ الصَّلَاةِ فِي الْمَسْجِدِ. رَوَاهُ أَبُو دَاوُد وَالتِّرْمِذِيّ
And from ʿAmr ibn Shuʿayb, from his father, from his grandfather, who said: The Messenger of Allah ﷺ forbade reciting poems to one another in the mosque, selling and buying in it, and people sitting in circles on the day of Jumuʿah before the prayer in the mosque. Reported by Abu Dawud and at-Tirmidhi.