I think he heard it from Jubayr bin Mutim, who said, "I said, 'Messenger of Allah, people claim that we have no rewards while in Makkah.'"I think he said, "They have lied. Your rewards will surely come to you, even if you were in a fox's hole."
قال حدثنا عفان قال حدثنا شعبة قال النعمان بن سالم أخبرني عن رجل سماه
أراه قد سمعه من جبير بن مطعم قال قلت يا رسول الله إن الناس يزعمون أنه ليس لنا أجور بمكة قال فأحسبه قال كذبوا لتأتينكم أجوركم ولو كنتم في جحر ثعلب
Its chain of transmission is daif, due to the unknown identity of the narrator from Jubayr, though he clarified this in another narration that the unknown narrator is the son of Aws bin Huzaifa, who is a companion. Accordingly, the hadith is sahih, and it is named in Abu Yaala 13/403, no. 17405. See Sunan al-Kubra of Bayhaqi 9/17, and Haythami graded it daif in 5/252 due to the unknown identity of the narrator.