Muhajir bin Qunfud reported,

He came to the Prophet ﷺ while he was relieving himself and greeted him with salaam, but the Prophet عليه السلام did not respond until he had performed ablution. Then he apologized to him, saying, "I disliked to mention the name of Allah عز وجل except in a state of purity," or he said, "in a state of cleanliness."

Azami 1678

Sahih

عن المهاجر بن قنفذ

أنه أتى النبي ﷺ وهو يبول، فسلم عليه، فلم يرد عليه السلام حتى توضأ، ثم اعتذر إليه فقال: إني كرهت أن أذكر الله عز وجل إلا على طهر. أو قال: على طهارة.

الأعظمي 1678صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Wudu
Section
Wudu for returning the greeting
Numbering
Jami al-Kamil 1678 (2nd edition)
Azami 1678