The Messenger of Allah ﷺ said, "When the end of time draws near, the dreams of a believer will hardly ever prove false, and the most truthful in dreams among them will be the most truthful in speech. The dream of a Muslim is one of forty-six parts of prophethood. Dreams are of three kinds. A good dream is glad tidings from Allah, a distressing dream comes from Satan, and another kind reflects what a person has been thinking about. So when one of you sees something he dislikes, let him get up, spit, and not tell anyone about it.I like to see a fetter in a dream, but I dislike seeing a chain around the neck. A fetter signifies steadfastness in religion."He said, this is a good and authentic hadith.
حدثنا نصر بن علي حدثنا عبد الوهاب الثقفي حدثنا أيوب عن محمد بن سيرين
قال رسول الله ﷺ إذا اقترب الزمان لم تكد رؤيا المؤمن تكذب وأصدقهم رؤيا أصدقهم حديثا ورؤيا المسلم جزء من ستة وأربعين جزءا من النبوة والرؤيا ثلاث فالرؤيا الصالحة بشرى من الله والرؤيا من تحزين الشيطان والرؤيا مما يحدث بها الرجل نفسه فإذا رأى أحدكم ما يكره فليقم فليتفل ولا يحدث بها الناس قال وأحب القيد في النوم وأكره الغل القيد ثبات في الدين قال وهذا حديث حسن صحيح
Agreed upon [by Bukhari and Muslim]. Muslim narrated it in "Vision," chapter on the vision being from Allah and that it is a part of prophethood, hadith no. 2263, from the hadith of Abdul-Wahhab Thaqafi. Bukhari narrated it, hadith no. 7017, from the hadith of Muhammad bin Sirin, with the same wording.