The Prophet ﷺ said, "When a sin is committed on the earth, whoever witnesses it and detests it" — and on one occasion he said, "and condemns it" — "is like one who was absent from it, and whoever is absent from it but is pleased with it is like one who witnessed it."
عن النبي ﷺ قال: إذا عملت الخطيئة في الأرض، كان من شهدها فكرهها- وقال مرة: أنكرها- كان كمن غاب عنها، ومن غاب عنها فرضيها، كان كمن شهدها.
Abu Dawud (4345) and Tabarani in Al-Kabir (17/139) both narrated it through the route of Abu Bakr bin Ayyash, who said, our teacher Mughira bin Ziyad Mawsili narrated to us, from Adi bin Adi, from Irs bin Umayra Kindi, and he related it.Its chain is hasan because of Mughira bin Ziyad Mawsili and Abu Bakr bin Ayyash, for both of them give the hadith the grade of hasan. It has also been narrated as mursal by Abu Dawud (4346), and the ruling goes to whoever connected the chain.