The Prophet ﷺ met him while he was in a state of major ritual impurity. He said, "I slipped away quietly and went to perform the full ablution, then I came back."The Prophet ﷺ asked, "Where were you?" or "Where did you go?"I replied, "I was in a state of major ritual impurity."He said, "The Muslim does not become impure."
حدثنا إسحق بن منصور حدثنا يحيى بن سعيد القطان حدثنا حميد الطويل عن بكر بن عبد الله المزني عن أبي رافع
أن النبي ﷺ لقيه وهو جنب قال فانبجست أي فانخنست فاغتسلت ثم جئت فقال أين كنت أو أين ذهبت قلت إني كنت جنبا قال إن المسلم لا ينجس
Agreed upon [by Bukhari and Muslim]. Bukhari recorded it in the Book of Ghusl, chapter on the sweat of one in a state of major impurity and that the Muslim does not become impure, hadith no. 283, and Muslim recorded it in the Book of Menstruation, chapter on the proof that the Muslim does not become impure, hadith no. 371, from the hadith of Yahya Qattan, with this wording.On this subject there is also a report from Huzaifa [Muslim, hadith no. 372] and from Ibn Abbas [we did not find it].