Wa `alaykum As-Salamu wa Rahmatullahi wa Barakatuh
This hadith is not of the well-attested category; it has some weak chain in transmission. Even if one accepts it as sound, it should be interpreted in such a way as it agrees with the general principles of the Quran.
Feeding the poor is one of the primary teachings of the Quran. It is an essential trait of true believers: We read in Surah al-Insan: “They feed the poor, orphans and the prisoners – even though they cherish it dearly (because of their dire need).”
The prisoners mentioned are the pagans taken in war. Moreover, in one of the early Makkan Surahs, namely, Surat al-Ma`oon, those who are slack in doing so are considered as being slack in faith or faking the Prayer!. Also, nowhere we find a distinction between Muslim and non-Muslim.
Thanks to this Quranic imperative, when the Prophet, peace be upon him, arrived in Madinah, he addressed the people saying: .
“O, people! Spread the greeting of peace with everyone, feed the poor, foster the ties of kinship, and pray when people are asleep: You can enter paradise easily.”
Abdullah ibn Salam, the Jewish rabbi of Madinah, reported the story and he soon converted to Islam and became one of the eminent companions of the Prophet, peace be upon him.
It is a well-known fact that the majority of the people of Madinah then were non-Muslims. So, we cannot take a dubious report you cited above to contradict such an essential Quranic imperative.
As for the order not to keep company with the corrupt, it should not be taken to mean we are not allowed to befriend non-Muslims; it is merely a warning against cozying up to the wicked and cherishing their companionship at the risk of being corrupted by them.
So, we cannot say that Muslims are not allowed to befriend non-Muslims. Islam spread all over the world because of Muslims interacting and befriending people regardless of race, religion, and ethnicity.
Historians, Muslims, and non-Muslims tell us that one of the main reasons for the spread of Islam was the openness of Muslims and their egalitarian attitude towards the local populations.
Almighty Allah knows best.
Views expressed by hosts/guests on this program (live dialogue, Facebook sessions, etc.) are their own and their appearance on the program does not imply an endorsement of them or any entity they represent.