The Messenger of Allah ﷺ said, "Dreams are of three kinds. Some are terrors from Satan meant to grieve the son of Adam, some reflect what a man preoccupies himself with while awake and then sees in his sleep, and some are one part of forty-six parts of prophethood."I asked him, "Did you yourself hear this from the Messenger of Allah ﷺ?"He replied, "Yes, I heard it from the Messenger of Allah ﷺ. I heard it from the Messenger of Allah ﷺ."
حدثنا هشام بن عمار حدثنا يحيى بن حمزة حدثنا يزيد بن عبيدة حدثني أبو عبيد الله مسلم بن مشكم
عن رسول الله ﷺ قال إن الرؤيا ثلاث منها أهاويل من الشيطان ليحزن بها ابن آدم ومنها ما يهم به الرجل في يقظته فيراه في منامه ومنها جزء من ستة وأربعين جزءا من النبوة قال قلت له أنت سمعت هذا من رسول الله ﷺ قال نعم أنا سمعته من رسول الله ﷺ أنا سمعته من رسول الله ﷺ
[Sahih] Tabarani narrated it, 18/63, 64, no. 118, from the hadith of Yahya through this route. Ibn Hibban graded it sahih, no. 1794, as did Busiri, and it has a corroborating witness.