The Messenger of Allah ﷺ was once sitting in the mosque with people gathered around him when three men approached. Two of them came toward the Messenger of Allah ﷺ while the third walked away. When the two stood before the gathering of the Messenger of Allah ﷺ, they offered greetings of peace. One of them noticed a gap in the circle and sat down in it, while the other sat behind the group. The third had turned away and left.When the Messenger of Allah ﷺ finished, he said, "Shall I tell you about these three men? As for one of them, he sought refuge with Allah, so Allah gave him refuge. As for the second, he felt shy, so Allah was shy with him. As for the third, he turned away, so Allah turned away from him."
أن رسول الله ﷺ بينما هو جالس المسجد، والناس معه، إذ أقبل نفر ثلاثة، فأقبل اثنان إلى رسول الله ﷺ، وذهب واحد، فلما وقفا على مجلس رسول الله ﷺ سلما، فأما أحدهما، فرأى فرجة في الحلقة فجلس فيها، وأما الآخر فجلس خلفهم، وأماالثالث فأدبر ذاهبا، فلما فرغ رسول الله ﷺ قال: ألا أخبركم عن النفرالثلاثة: أما أحدهم فأوى إلى الله، فآواه الله، وأما الآخر فاستحيا، فاستحيا الله منه، وأما الآخر فأعرض، فأعرض الله عنه.
Malik reported it in the Book of Greetings (4) from Ishaq bin Abdullah bin Abu Talha, from Abu Mura, the freed slave of Aqeel bin Abu Talib, from Abu Waqid Laythi, and he mentioned it. Bukhari reported it in the Book of Knowledge (66), and Muslim in the Book of Greetings (2176), both of them through the route of Malik with the same chain.