The Messenger of Allah ﷺ saw spittle on the wall towards Qibla, and scratched it away and then turning to the people said: When any one of you prays, he must not spit in front of him, for Allah is in front of him when he is engaged in prayer.
أَنَّ رَسُولَ اللَّهِ ﷺ رَأَى بُصَاقًا فِي جِدَارِ الْقِبْلَةِ فَحَكَّهُ ثُمَّ أَقْبَلَ عَلَى النَّاسِ فَقَالَ إِذَا كَانَ أَحَدُكُمْ يُصَلِّي فَلاَ يَبْصُقْ قِبَلَ وَجْهِهِ فَإِنَّ اللَّهَ قِبَلَ وَجْهِهِ إِذَا صَلَّى