The Messenger of Allah ﷺ saw some spittle on the wall of the qiblah and scraped it off. Then he turned to the people and said, "When one of you is praying, let him not spit in front of his face, for Allah is before his face when he prays."
أخبرنا قتيبة عن مالك عن نافع
أن رسول الله ﷺ رأى بصاقا في جدار القبلة فحكه ثم أقبل على الناس فقال إذا كان أحدكم يصلي فلا يبصقن قبل وجهه فإن الله عز وجل قبل وجهه إذا صلى
Muslim reported it in "Masajid," hadith no. 51/547 (see the previous hadith from Qutayba), and Bukhari in "Salah," in the chapter on scratching off spit with the hand from the masjid, hadith no. 406, from the hadith of Malik with this wording. It is also in the Muwatta (Yahya's version), 1/194, and in the Kubra, hadith no. 803.