The Messenger of Allah ﷺ said, "Messengership and prophethood have come to an end. There is no messenger after me, nor any prophet."This weighed heavily on the people, so he said, "But the bearers of glad tidings remain."They asked, "Messenger of Allah, what are the bearers of glad tidings?"He replied, "The dream of a Muslim. It is one of the parts of prophethood."
حدثنا الحسن بن محمد الزعفراني حدثنا عفان بن مسلم حدثنا عبد الواحد يعني ابن زياد حدثنا المختار بن فلفل حدثنا
قال رسول الله ﷺ إن الرسالة والنبوة قد انقطعت فلا رسول بعدي ولا نبي قال فشق ذلك على الناس فقال لكن المبشرات قالوا يا رسول الله وما المبشرات قال رؤيا المسلم وهي جزء من أجزاء النبوة
[Its chain of transmission is sahih]. Ahmad narrated it in 3/267 from Affan through the same chain, and Hakim graded it sahih according to the criteria of Muslim in 4/391, and Dhahabi agreed with him.There is also a narration on this subject from Abu Hurairah [mentioned previously at 2270, and Bukhari, no. 6990], Huzaifa bin Usayd [Tabarani in Kabir, 3/179, no. 3051], Ibn Abbas [Muslim, no. 479], Umm Kurz [Ibn Majah, no. 3896, and Ahmad, 6/381, and Humaydi, no. 348], and Abu Usayd [I did not find it].