It is narrated from Sayyiduna Mu'awiyah bin Haydah (may Allah be pleased with him) that food would be brought to the Prophet (peace and blessings be upon him); if it was charity (sadaqah), he (peace and blessings be upon him) would not eat from it, and if it was a gift, he (peace and blessings be upon him) would eat from it.
Hadith Referenceالمعجم الكبير للطبراني / باب الميم / 17058