Abdullah bin Umar reported,

One day, while the Messenger of Allah ﷺ was delivering a sermon, he noticed a glob of phlegm on the qiblah wall of the mosque. He became angry with the people and then scraped it off.The narrator said, I believe he said that the Prophet then called for some saffron and smeared it over the spot, saying, "When one of you prays, Allah is before his face, so let him not spit in front of him."

Abu Dawud 479

Sahih

حدثنا سليمان بن داود حدثنا حماد حدثنا أيوب عن نافع

عن ابن عمر قال

بينما رسول الله ﷺ يخطب يوما إذ رأى نخامة في قبلة المسجد فتغيظ على الناس ثم حكها قال وأحسبه قال فدعا بزعفران فلطخه به وقال إن الله قبل وجه أحدكم إذا صلى فلا يبزق بين يديه

أبو داود 479صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Prayer
Chapter
Dislike of spitting in the masjid
Numbering
Darussalam 479
Abu Dawud 479