The Prophet ﷺ said, "When you are three, two of you should not converse privately to the exclusion of the other until you mingle with more people, for that would sadden him."
قال النبي ﷺ: إذا كنتم ثلاثة، فلا يتناجى رجلان دون الآخر حتى تختلطوا بالناس، أجل أن يحزنه.
Bukhari narrated it in the Book of Seeking Permission (6290), and Muslim in the Book of Greetings (2184:37), both through the route of Mansur, from Abu Waail, from Abdullah, who mentioned it.