The Messenger of Allah ﷺ said, "Spitting in the mosque is a bad deed, and burying it is a good deed."
حدثنا زيد بن الحباب أخبرنا حسين بن واقد حدثنا أبو غالب أنه سمع
قال رسول الله ﷺ التفل في المسجد سيئة ودفنه حسنة
Its isnad is hasan, and the hadith was mentioned previously at 13883 and 13367.