From Sahih Muslim (Hadith 5327):
Anas b. Malik rdported that a tailor invited Allah's Messenger (ﷺ) to a feast. There has been an addition to this that Thabit said:I heard Anas saying that any meal that was prepared for me after that I tried that it should contain pumpkin
Reference: Muslim 5327