The Messenger of Allah ﷺ came in to visit her, and there was a man with her. The face of the Messenger of Allah ﷺ changed, as though it troubled him.She said, "Messenger of Allah, he is my brother."The Messenger of Allah ﷺ said, "Consider carefully who your brothers are, for nursing counts only when it satisfies hunger."
حدثنا بهز قال حدثنا شعبة قال حدثنا أشعث بن سليم أنه سمع أباه يحدث عن مسروق
أن رسول الله ﷺ دخل عليها وعندها رجل قال فتغير وجه رسول الله ﷺ كأنه شق عليه فقالت يا رسول الله أخي فقال رسول الله ﷺ انظرن ما إخوانكن فإنما الرضاعة من المجاعة
Its isnad is sahih. Bukhari related it, 9/146, no. 5102, Abu Dawud, 2/548, no. 2058, Nasai, 6/102, no. 3312, Darimi, 2/210, no. 2256, and Ibn Majah, 1/626, no. 1945, all of them in the chapter on marriage, and Muslim in the chapter on breastfeeding, 2/1078, no. 1455.