Muhajir came to the Prophet ﷺ while he was urinating. He saluted him. The Prophet ﷺ did not return the salutation to him until he performed ablution. He then apologised to him, saying: I disliked remembering Allah except in the state of purification. (Using translation from Abū Dāʾūd 17)
أَنَّهُ أَتَى النَّبِيَّ ﷺ وَهُوَ يَبُولُ فَسَلَّمَ عَلَيْهِ فَلَمْ يَرُدَّ عَلَيْهِ حَتَّى تَوَضَّأَ ثُمَّ اعْتَذَرَ إِلَيْهِ وَقَالَ إِنِّي كَرِهْتُ أَنْ أَذْكُرَ اللَّهَ إِلَّا عَلَى طُهْرٍ أَوْ قَالَ عَلَى طَهَارَةٍ «»