He reported that the Prophet ﷺ saw some phlegm on the prayer wall of the mosque while he was leading the people in prayer, so he scraped it off. After finishing the prayer, he said, "When one of you is in prayer, Allah is before his face, so none of you should spit in front of himself during the prayer."This was narrated by Musa bin Uqba and Ibn Abu Rawwad from Nafi.
حدثنا قتيبة بن سعيد قال حدثنا ليث عن نافع
أنه قال رأى النبي ﷺ نخامة في قبلة المسجد وهو يصلي بين يدي الناس فحتها ثم قال حين انصرف إن أحدكم إذا كان في الصلاة فإن الله قبل وجهه فلا يتنخمن أحد قبل وجهه في الصلاة رواه موسى بن عقبة وابن أبي رواد عن نافع