It is reported that ‘Amr b. Maymūn said:
The Companions of Allāh’s Messenger – Allāh’s peace and blessings be upon him – used to say, “The mosques are the houses of Allāh on Earth, and it is a right from Allāh that He will honor those who visit Him in [His houses].”
Ibn Al-Mubārak, Al-Zuhd wa Al-Raqā`iq 4:159.