Sayyiduna Ali bin Abi Talib (may Allah be pleased with him) said: When Friday comes, the devils go out and lead the people towards the markets, and these devils carry banners, while the angels sit at the doors of the mosques and record the names of the people according to their ranks (that is, the order of their arrival): who came first and who came after him, until the imam comes. Then whoever is near the imam, remains silent, listens attentively to the sermon and does nothing idle, receives two portions (kifl) of reward. Whoever is far from the imam, listens attentively to the sermon and does nothing idle, receives one portion of reward. Whoever is near the imam, engages in idle talk, does not remain silent and does not listen attentively to the sermon, incurs two portions of sin. And whoever is far from the imam, engages in idle talk, does not remain silent and does not listen attentively to the sermon either, incurs one portion of sin. Whoever says (to another person): Be quiet, has spoken, and whoever has spoken has no Friday prayer. Then he said: I heard your Prophet say it like this. (Allamah al-Haythami says:) I say: Imam Abu Dawud recorded part of this narration.
Imam Ahmad recorded this narration, and its chain contains a narrator whose name has not been mentioned.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الصلاة / 3081