Mosques and places of Prayer - Section 1 Mishkat al-Masabih 707
Arabic hadith text
وَعَنْ جَابِرٍ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «مَنْ أَكَلَ مِنْ هَذِهِ الشَّجَرَةِ الْمُنْتِنَةِ فَلَا يَقْرَبَنَّ مَسْجِدَنَا فَإِنَّ الْمَلَائِكَةَ تَتَأَذَّى مِمَّا يَتَأَذَّى مِنْهُ الْإِنْسُ»
Translation
Jabir reported God’s Messenger as saying, “If anyone eats of this offensive tree* he must not approach our mosque, for the angels are harmed by the same things as men.” * Bukhari At’ima, 49, shows the Prophet’s objection to onions and garlic. One of these may be meant here.(Bukhari and Muslim.)