Imam Bukhari narrates: 'Abdullah bin Yusuf narrated to us the hadeeth, he said: Imam Malik informed us, from Nafi', from Hazrat 'Abdullah bin 'Umar (may Allāh be pleased with them both)
that the Messenger of Allāh ﷺ saw spit on the wall of the Qiblah, so he scraped it off, then turning towards the people he said: When any one of you prays, let him not spit in front of himself, because when he prays, Allāh is in front of him.
حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ، قَالَ أَخْبَرَنَا مَالِكٌ، عَنْ نَافِعٍ، عَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ،. أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم رَأَى بُصَاقًا فِي جِدَارِ الْقِبْلَةِ فَحَكَّهُ، ثُمَّ أَقْبَلَ عَلَى النَّاسِ فَقَالَ " إِذَا كَانَ أَحَدُكُمْ يُصَلِّي، فَلاَ يَبْصُقْ قِبَلَ وَجْهِهِ، فَإِنَّ اللَّهَ قِبَلَ وَجْهِهِ إِذَا صَلَّى ".
Reference: Sahih Al Bukhari 406