I heard the Messenger of Allah ﷺ say, "Two men should not go out to relieve themselves with their private parts exposed, conversing with one another, for indeed Allah detests that."
حدثنا عبد الرحمن حدثنا عكرمة بن عمار عن يحيى بن أبي كثير عن هلال بن عياض قال
سمعت رسول الله ﷺ قال لا يخرج الرجلان يضربان الغائط كاشفان عورتهما يتحدثان فإن الله يمقت على ذلك
Its chain of transmission is daif, it contains an unknown narrator, Hilal bin Ayyad, also said to be Ayyad bin Hilal, and also said to be Ayyad bin Abu Zuhayr, many have deemed him unknown.