TABARANI 1454:
from Muḥammad b. ʿAbd al-Raḥman b. Thawbān from his father from his grandfather Thawbān —
[Machine] I heard the Messenger of Allah ﷺ say: "Whoever among you sees someone reciting poetry in the mosque, say 'May Allah make you successful' three times. And whoever sees someone reciting something deviant in the mosque, say 'I have not found it' three times. And whoever sees someone buying or selling in the mosque, say 'May Allah not bless your business.' This is what the Messenger of Allah ﷺ said to us."
الطبراني ١٤٥٤:
عن محمد بن عبد الرحمن بن ثوبان عن أبيه عن جده ثوبان —
سَمِعْتُ رَسُولَ اللهِ ﷺ يَقُولُ مَنْ رَأَيْتُمُوهُ يَنْشُدُ شِعْرًا فِي الْمَسْجِدِ فَقُولُوا فَضَّ اللهُ فَاكَ ثَلَاثَ مَرَّاتٍ وَمَنْ رَأَيْتُمُوهُ يَنْشُدُ ضَالَّةً فِي الْمَسْجِدِ فَقُولُوا لَا وَجَدْتَهَا ثَلَاثَ مَرَّاتٍ وَمَنْ رَأَيْتُمُوهُ يَبِيعُ ويَبْتَاعُ فِي الْمَسْجِدِ فَقُولُوا لَا أَرْبَحَ اللهُ تِجَارَتَكَ كَذَلِكَ قَالَ لَنَا رَسُولُ اللهِ ﷺ
hadithunlocked.com