He heard the Messenger of Allah ﷺ say, "Hosting a guest for one night is an obligation upon every Muslim. If a guest is left without hospitality at someone's doorstep, it becomes a debt owed to him. If he wishes, he may demand it, and if he wishes, he may waive it."
حدثنا يحيى بن سعيد قال حدثنا شعبة حدثني منصور عن الشعبي
أنه سمع رسول الله ﷺ يقول ليلة الضيف واجبة على كل مسلم فإن أصبح بفنائه محروما كان دينا له عليه إن شاء اقتضاه وإن شاء تركه