It wasnarrated from Jabir that the Messenger of Allah (ﷺ) said:
"Whoeveris invited to eat when he is fasting, let him accept theinvitation;and if he wants to let him eat, and if he wants let himnot eat." (JA)
English reference (JA): Vol. 1, Book 7, Hadith 1751 (JA)
Arabic reference (JA): Book 7, Hadith 1823 (JA)