The Prophet ﷺ forbade gathering in circles on Friday before the prayer, and he forbade buying and selling within the mosque.
أخبرنا إسحق بن إبراهيم قال أخبرني يحيى بن سعيد عن ابن عجلان
أن النبي ﷺ نهى عن التحلق يوم الجمعة قبل الصلاة وعن الشراء والبيع في المسجد
Ahmad Dawud narrated it in his Sunan, Prayer, chapter on forming circles before the prayer on Friday, no. 1079, from the hadith of Yahya Qattan, with the same wording. It is also found in Kubra, no. 793, and Tirmidhi graded it hasan, no. 322.Ibn Ajlan explicitly stated that he heard it directly, as found in Ahmad, 2/179.