TABARANI 5911:
from Sahl b. Saʿd al-Sāʿidī —
[Machine] "The Prophet ﷺ said, 'Whoever enters my mosque to learn or teach something good, he is like a Mujahid in the way of Allah. And whoever enters it for anything else from the people's conversations, he is like someone who sees something he likes but it is something else.'"
الطبراني ٥٩١١:
عن سهل بن سعد الساعدي —
أَنَّ النَّبِيَّ ﷺ قَالَ «مَنْ دَخَلَ مَسْجِدِي هَذَا لِيَتَعَلَّمَ خَيْرًا أَوْ لِيُعَلِّمَهُ كَانَ بِمَنْزِلَةِ الْمُجَاهِدِ فِي سَبِيلِ اللهِ وَمَنْ دَخَلَهُ لِغَيْرِ ذَلِكَ مِنْ أَحَادِيثِ النَّاسِ كَانَ بِمَنْزِلَةِ مَنْ يَرَى مَا يُعْجِبُهُ وَهُوَ شَيْءٌ غَيْرُهُ»
hadithunlocked.com