The Messenger of Allah ﷺ said, "When one of you enters the mosque, he is considered to be in prayer as long as the prayer is what keeps him there. The angels send blessings upon one of you as long as he remains in the place where he prayed, saying, 'Allah, forgive him. Allah, have mercy on him. Allah, accept his repentance,' so long as he does not break his wudu in it and does not cause harm in it."
حدثنا أبو بكر بن أبي شيبة حدثنا أبو معاوية عن الأعمش عن أبي صالح
قال رسول الله ﷺ إن أحدكم إذا دخل المسجد كان في صلاة ما كانت الصلاة تحبسه والملائكة يصلون على أحدكم ما دام في مجلسه الذي صلى فيه يقولون اللهم اغفر له اللهم ارحمه اللهم تب عليه ما لم يحدث فيه ما لم يؤذ فيه