The Messenger of Allah ﷺ said, "Whoever is invited to a meal while fasting should accept the invitation. If he wishes, he may eat, and if he wishes, he may refrain."
حدثنا أحمد بن يوسف السلمي حدثنا أبو عاصم أنبأنا ابن جريج عن أبي الزبير
قال رسول الله ﷺ من دعي إلى طعام وهو صائم فليجب فإن شاء طعم وإن شاء ترك