The Messenger of Allah ﷺ said, regarding the verse "For them is good news in the worldly life" [Yunus 10:64], "It refers to the righteous dream by which the believer is given glad tidings. It is one of forty-six parts of prophethood. Whoever sees such a dream, let him relate it to a loved one. But whoever sees something other than that, it is only from Satan seeking to grieve him. Let him spit lightly to his left three times and remain silent, and let him not tell anyone about it."
عن رسول الله ﷺ أنه قال: {لهم البشرى في الحيوة الدنيا} [يونس: ٦٤] الرؤيا الصالحة يبشر بها المؤمن جزء من ستة وأربعين جزءا من النبوة، فمن رأى ذلك فليخبر بها وادا، ومن رأى سوى ذلك فإنما هو الشيطان ليحزنه، فلينفث عن يساره ثلاثا، وليسكت، ولا يخبر به أحد.
Tabari related it in his Tafsir (12/223), and Bayhaqi in Shuab (4764), through the route of Ibn Wahb, "Amr bin Harith told me that Darraj Abu Samh reported to him, from Abdul-Rahman bin Jubayr, from Abdullah bin Amr bin As," and he mentioned it. The wording given is Bayhaqi's, while Tabari's wording is abridged. Its chain is hasan because of Darraj Abu Samh, for he is truthful except regarding Abu Haytham. Amr bin Harith is Abu Umaya al-Masri, and Abdul-Rahman bin Jubayr is al-Masri the muezzin.Ahmad also related it (7044) from Hasan al-Ashyab, "Ibn Lahia told us, Darraj told us," in similar fashion, except that it contains, "a part out of forty-nine parts of prophethood." Abdullah bin Lahia has known criticism regarding him.Of similar meaning is what was reported from a man from the people of Egypt, who said, I asked Abu Darda about the words of Allah Almighty, "For them are glad tidings in the life of this world" [Yunus 10:64], and he said, "No one has asked me about it besides you, except for one man, since I asked the Messenger of Allah ﷺ. I asked the Messenger of Allah ﷺ, and he said, 'No one has asked me about it besides you since it was revealed. It is the righteous dream that a Muslim sees, or that is seen for him.'"Tirmidhi related it (2273) from Ibn Abu Umar, from Sufyan, from Muhammad bin Munkadir, from Ata bin Yasar, from a man from the people of Egypt, who said, I asked Abu Darda, and he mentioned it. There has been disagreement over the chain of this hadith. Daraqutni mentioned it in al-Ilal (1080) and confirmed this version as the correct one. Its chain contains an unnamed man.Other hadiths of similar meaning are mentioned in the Book of Faith, in the chapter on the cessation of prophethood after the prophethood of our Prophet ﷺ and the persistence of the glad tidings.As for his saying, "a part of prophethood," this refers to the confirmation and reinforcement of the matter of dreams, like the dreams of the prophets, for these are like revelation in their certainty. The other meaning is that it is a part among the parts of the knowledge of prophethoods, for the knowledge of prophethood remains, even though prophethood itself does not remain. As for the differing numbers given for the parts, this goes back to what Allah Almighty made known to His Prophet during the period of his prophethood, which was twenty-three years, and the most sound reckoning is forty-six parts, so when weighing the different versions, this one takes precedence over the others.