Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
muslim:799cYaḥyá b. Ḥabīb al-Ḥārithī > Khālid / Ibn al-Ḥārith > Shuʿbah > Qatādah > Anas

I heard Anas saying that the Messenger of Allah ﷺ said to Ubayy the same thing.  

مسلم:٧٩٩cحَدَّثَنَا يَحْيَى بْنُ حَبِيبٍ الْحَارِثِيُّ حَدَّثَنَا خَالِدٌ يَعْنِي ابْنَ الْحَارِثِ حَدَّثَنَا شُعْبَةُ عَنْ قَتَادَةَ قَالَ سَمِعْتُ أَنَسًا يَقُولُ

قَالَ رَسُولُ اللَّهِ ﷺ لأُبَىٍّ بِمِثْلِهِ