It is narrated from Sayyiduna Ibn Mas'ud (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "A dream is glad tidings from Allah, the Mighty and Majestic, and it is one of seventy parts of prophethood. And this fire of yours is one of seventy parts of the scorching heat of Hell. Whoever comes to the mosque waiting for the prayer is in prayer as long as he does not break his ablution, and whoever waits for one prayer after another prayer is in prayer as long as he does not break his ablution."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 10486