عَنْ عَبْدِ اللَّهِ بْنِ مَسْعُودٍ رَضِيَ اللَّهُ عَنْهُ قَالَ قَالَ رَجُلٌ لِرَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ كَيْفَ لِي أَنْ أَعْلَمَ إِذَا أَحْسَنْتُ وَإِذَا أَسَأْتُ فَقَالَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ إِذَا سَمِعْتَ جِيرَانَكَ يَقُولُونَ قَدْ أَحْسَنْتَ فَقَدْ أَحْسَنْتَ وَإِذَا سَمِعْتَهُمْ يَقُولُونَ قَدْ أَسَأْتَ فَقَدْ أَسَأْتَ
Hazrat Abdullah (may Allah be pleased with him) narrates that a man said: O Messenger of Allah! When I do a good deed and when I do a bad deed, how will I know that I have done good or bad? The Prophet (peace and blessings be upon him) said: When you hear your neighbors saying that you have done good, then you have done good; and when you hear them saying that you have done bad, then you have done bad.