´It was narrated that Umm Ayyub said:` “I made some food for the Prophet (ﷺ) in which there were some vegetables. He did not eat it, and he said: ‘I do not like to annoy my companion.’”
Hadith Referenceسنن ابن ماجه / كتاب الأطعمة / 3364
1؎: It is stated in Fath al-Bari that onions, garlic, and leek are lawful, but whoever eats them, it is disliked for him to go to the mosque. The jurists have also considered radish to be similar to them, and any vegetable that has a foul odor is likewise included. The majority hold the view that this is a tanzihiyyah (discouraged but not sinful) dislike. Furthermore, the mouths of those who smoke beedi, cigarettes, cigars, etc., or chew tobacco, also generally emit a bad odor, which causes harm and discomfort to people both inside and outside the mosque. Therefore, caution regarding this is also necessary.
Sayyida Umm Ayyub Ansariyyah (may Allah be pleased with her) narrates: When the Prophet (peace and blessings be upon him) stayed with us, we cooked vegetables for him as food. He did not like it. The Prophet (peace and blessings be upon him) said to his companions: "You people eat it, for I am not like you. I do not like to cause discomfort to my companion (i.e., the angel)."
Shaykh Muhammad Ibrahim bin Basheer
Benefit: This hadith proves that anything which, when eaten or used, causes bad breath to emanate from the mouth is disliked, such as: onions, garlic, hookah, cigarettes, etc. It should be noted that there is no harm in eating onions and garlic after cooking them, because the odor is eliminated thereby. Furthermore, it is also understood that Allah Ta'ala has placed sensory perception (quwwat-e-hiss) in Jibreel Amin (alayhis salam) as well, which is why he too experiences discomfort. Some hadith scholars (muhaddithin) and successors (tabi'in) have seen the Noble Prophet (sallallahu alayhi wa sallam) in their dreams. Some people, however, fabricate false dreams themselves and go around impressing others; one should not fall for their deceptions.
Source: Musnad al-Humaydi: Commentary by Muhammad Ibrahim bin Bashir, Page: 342