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.
darimi:2803ʿAmr b. ʿĀṣim > Ḥammād b. Salamah > ʿĀṣim > Abū Ṣāliḥ > Abū Hurayrah

[Machine] The Prophet (pbuh) said, "Where is so-and-so?" A man among them winked at him, so he said, "Indeed, he is here." Then the Prophet (pbuh) said, "Didn't he participate in the Battle of Badr?" They replied, "Yes." He then said, "Perhaps Allah looked favorably upon the people of Badr and said, 'Do as you please, for I have forgiven you.'"  

الدارمي:٢٨٠٣حَدَّثَنَا عَمْرُو بْنُ عَاصِمٍ حَدَّثَنَا حَمَّادُ بْنُ سَلَمَةَ عَنْ عَاصِمٍ عَنْ أَبِي صَالِحٍ عَنْ أَبِي هُرَيْرَةَ

أَنَّ النَّبِيَّ ﷺ قَالَ «أَيْنَ فُلَانٌ؟» فَغَمَزَهُ رَجُلٌ مِنْهُمْ فَقَالَ إِنَّهُ وَإِنَّهُ فَقَالَ النَّبِيُّ ﷺ «أَلَيْسَ قَدْ شَهِدَ بَدْرًا؟» قَالُوا بَلَى قَالَ فَلَعَلَّ اللَّهَ اطَّلَعَ عَلَى أَهْلِ بَدْرٍ فَقَالَ اعْمَلُوا مَا شِئْتُمْ فَقَدْ غَفَرْتُ لَكُمْ  


See similar narrations below:

Collected by Abū Dāwūd, Ḥākim
abudawud:4654[Chain 1] Mūsá b. Ismāʿīl > Ḥammād b. Salamah [Chain 2] Aḥmad b. Sinān > Yazīd b. Hārūn > Ḥammād b. Salamah > ʿĀṣim > Abū Ṣāliḥ > Abū Hurayrah

Perhaps Allah, and Ibn Sinan’s version has : Allah looked at the participants of the battle of Badr (with mercy) and said : Do whatever you wish ; I have forgiven you.  

أبو داود:٤٦٥٤حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ حَدَّثَنَا حَمَّادُ بْنُ سَلَمَةَ ح وَحَدَّثَنَا أَحْمَدُ بْنُ سِنَانٍ حَدَّثَنَا يَزِيدُ بْنُ هَارُونَ أَخْبَرَنَا حَمَّادُ بْنُ سَلَمَةَ عَنْ عَاصِمٍ عَنْ أَبِي صَالِحٍ عَنْ أَبِي هُرَيْرَةَ قَالَ

قَالَ رَسُولُ اللَّهِ ﷺ قَالَ مُوسَى فَلَعَلَّ اللَّهَ وَقَالَ ابْنُ سِنَانٍ اطَّلَعَ اللَّهُ عَلَى أَهْلِ بَدْرٍ فَقَالَ اعْمَلُوا مَا شِئْتُمْ فَقَدْ غَفَرْتُ لَكُمْ  

hakim:6968Abū al-ʿAbbās Muḥammad b. Aḥmad al-Maḥbūbī > Saʿīd b. Masʿūd > Yazīd b. Hārūn > Ḥammād b. Salamah > ʿĀṣim b. Abū Ṣāliḥ > Abū Hurayrah

[Machine] The Prophet ﷺ said: "Indeed, Allah the Exalted looked upon the people of Badr and said, 'Do whatever you wish, for I have forgiven you.'"  

الحاكم:٦٩٦٨أَخْبَرَنِي أَبُو الْعَبَّاسِ مُحَمَّدُ بْنُ أَحْمَدَ الْمَحْبُوبِيُّ ثَنَا سَعِيدُ بْنُ مَسْعُودٍ ثَنَا يَزِيدُ بْنُ هَارُونَ أَنْبَأَ حَمَّادُ بْنُ سَلَمَةَ عَنْ عَاصِمِ بْنِ أَبِي صَالِحٍ عَنْ أَبِي هُرَيْرَةَ

أَنَّ النَّبِيَّ ﷺ قَالَ إِنَّ اللَّهَ تَعَالَى اطَّلَعَ عَلَى أَهْلِ بَدْرٍ فَقَالَ اعْمَلُوا مَا شِئْتُمْ فَقَدْ غَفَرْتُ لَكُمْ  

«هَذَا حَدِيثٌ صَحِيحُ الْإِسْنَادِ وَلَمْ يُخَرِّجَاهُ بِهَذَا اللَّفْظِ عَلَى الْيَقِينِ أَنَّ اللَّهَ اطَّلَعَ عَلَيْهِمْ فَغَفَرَ لَهُمْ إِنَّمَا أَخْرَجَاهُ عَلَى الظَّنِّ وَمَا يُدْرِيكَ لَعَلَّ اللَّهَ تَعَالَى اطَّلَعَ عَلَى أَهْلِ بَدْرٍ» صحيح