I asked the Messenger of Allah ﷺ about the saying of Allah, glorified is He, "For them are good tidings in the worldly life and in the Hereafter" [Yunus 10:64].He said, "It is the righteous dream that a Muslim sees or that is seen for him."
حدثنا علي بن محمد حدثنا وكيع عن علي بن المبارك عن يحيى بن أبي كثير عن أبي سلمة
سألت رسول الله ﷺ عن قول الله سبحانه {لهم البشرى في الحياة الدنيا وفي الآخرة} قال هي الرؤيا الصالحة يراها المسلم أو ترى له
[Hasan] Tirmidhi narrated it in "The Dream," chapter "His Saying, 'For Them Are Glad Tidings in the Life of This World,'" no. 2275, from the hadith of Yahya, through this route, and he said it is hasan. I say, Abu Salama did not hear it from Ubadah, rather he said, "I was informed on the authority of Ubadah," so the report is disconnected.