Amr bin Sulaym narrates from Sayyiduna Abu Qatadah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "When any of you enters the mosque, let him not sit down before praying two rak'ahs."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجمعة / 5694