The Messenger of Allah ﷺ said, "Two men should not converse privately while relieving themselves, each looking at the other's private parts, for Allah detests that."Muhammad bin Yahya narrated to us, Salm bin Ibrahim al-Warraq narrated to us, Ikrima narrated to us from Yahya bin Abu Kathir from Iyad bin Hilal. Muhammad bin Yahya said, this is the correct version.Muhammad bin Humayd also narrated to us, Ali bin Abu Bakr narrated to us from Sufyan Thawri from Ikrima bin Ammar from Yahya bin Abu Kathir from Iyad bin Abdullah, a similar report.
حدثنا محمد بن يحيى حدثنا عبد الله بن رجاء أنبأنا عكرمة بن عمار عن يحيى بن أبي كثير عن هلال بن عياض
أن رسول الله ﷺ قال لا يتناجى اثنان على غائطهما ينظر كل واحد منهما إلى عورة صاحبه فإن الله عز وجل يمقت على ذلك حدثنا محمد بن يحيى حدثنا سلم بن إبراهيم الوراق حدثنا عكرمة عن يحيى بن أبي كثير عن عياض بن هلال قال محمد بن يحيى وهو الصواب و حدثنا محمد بن حميد حدثنا علي بن أبي بكر عن سفيان الثوري عن عكرمة بن عمار عن يحيى بن أبي كثير عن عياض بن عبد الله نحوه
[Its chain of transmission is daif] Reported by Abu Dawud in the Book of Purification, chapter on the dislike of speaking while relieving oneself, no. 15. Ibn Khuzayma, Ibn Hibban, Hakim, and Dhahabi graded it sahih.Ikrima is confused in his hadith from Yahya bin Abu Kathir.