It was narrated from Abu Hurairah that the:
Messenger of Allah (ﷺ) said : "Allah has forgiven my nation for the evil suggestions of their hearts, so long as they do not act upon it or speak of it, and for what they are forced to do."
English reference: Vol. 3, Book 10, Hadith 2044
Arabic reference: Book 10, Hadith 2122