We said to the Messenger of Allah ﷺ, "You send us out, and we stop at the homes of people who do not show us hospitality. What is your view on this?"The Messenger of Allah ﷺ said to us, "If you stop at a people's place and they provide for you what is fitting for a guest, then accept it. But if they do not, then take from them the guest's due that is owed to you."
حدثنا محمد بن رمح أنبأنا الليث بن سعد عن يزيد بن أبي حبيب عن أبي الخير
قلنا لرسول الله ﷺ إنك تبعثنا فننزل بقوم فلا يقرونا فما ترى في ذلك قال لنا رسول الله ﷺ إن نزلتم بقوم فأمروا لكم بما ينبغي للضيف فاقبلوا وإن لم يفعلوا فخذوا منهم حق الضيف الذي ينبغي لهم
Bukhari narrated it in Mazalim, chapter "Retribution for the wronged person when he finds the property of his wrongdoer," hadith 2461/6137, from the hadith of Layth, through this same chain. Muslim narrated it in Luqatah, chapter "Hospitality and the like," hadith 1727, from Muhammad bin Rumh, through this same chain.Ali bin Muhammad told us, he said, Umm told us...