Mishkat al-Masabih 4614, 4615
Abu Huraira reported God’s messenger as saying:
‘‘When the time draws near* a believer’s vision can hardly be false. A believer’s vision is a forty-sixth part of prophecy, and what pertains to prophecy cannot be false." 
Muhammad b. Sirin said he held that visions were of three types: ideas which come from within, terrifying caused by the devil, and good news from God; so when one sees anything he dislikes he should not tell it to anyone, but should get up and pray. He said he disliked seeing a shackle on the neck in sleep, but that people were pleased by a fetter, as it is said that a fetter indicates being firmly established in the religion. 

(Bukhari and Muslim.) 
Bukhari said that Qatada, Yunus, Hushaim** and Abu Hilal transmitted it on the authority of Ibn Sirin who quoted Abu Huraira's authority. Yunus said he thought that what was said about the fetter comes from the Prophet, but Muslim said he did not know whether it was in the tradition, or whether Ibn Sirin said it. 
In a version there is something to the same effect, and the words “he disliked seeing a shackle on the neck ..." to the end have been inserted in the tradition.

* The suggestions made are that this means when the last hour draws near, at the equinox, or when the Mahdi comes.
** Bukhari, Ta'bir, 26, has Hisham.
وَعَنْ أَبِي هُرَيْرَةَ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «إِذَا اقْتَرَبَ الزَّمَانُ لَمْ يَكَدْ يَكْذِبُ رُؤْيَا الْمُؤْمِنِ وَرُؤْيَا الْمُؤْمِنِ جُزْءٌ مِنْ سِتَّةٍ وَأَرْبَعِينَ جُزْءًا مِنَ النُّبُوَّةِ وَمَا كَانَ مِنَ النُّبُوَّةِ فَإِنَّهُ لَا يَكْذِبُ» . قَالَ مُحَمَّدُ بْنُ سِيرِينَ: وَأَنَا أَقُولُ: الرُّؤْيَا ثَلَاثٌ: حَدِيثُ النَّفْسِ وَتَخْوِيفُ الشَّيْطَانِ وَبُشْرَى مِنَ اللَّهِ فَمَنْ رَأَى شَيْئًا يَكْرَهُهُ فَلَا يَقُصَّهُ عَلَى أَحَدٍ وَلْيَقُمْ فَلْيُصَلِّ قَالَ: وَكَانَ يُكْرَهُ الْغُلُّ فِي النَّوْمِ وَيُعْجِبُهُمُ الْقَيْدُ وَيُقَال: الْقَيْد ثبات فِي الدّين
قَالَ البُخَارِيّ: رَوَاهُ قَتَادَة وَيُونُس وَهِشَام وَأَبُو هِلَالٍ عَنِ ابْنِ سِيرِينَ عَنْ أَبِي هُرَيْرَةَ وَقَالَ يُونُسُ: لَا أَحْسَبُهُ إِلَّا عَنِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فِي الْقَيْدِ
وَقَالَ مُسْلِمٌ: لَا أَدْرِي هُوَ فِي الْحَدِيثِ أَمْ قَالَهُ ابْنُ سِيرِينَ؟ وَفِي رِوَايَةٍ نَحْوُهُ وَأَدْرَجَ فِي الْحَدِيثِ قَوْلَهُ: «وَأَكْرَهُ الْغُلَّ. . .» إِلَى تَمام الْكَلَام