It was narrated that Talq bin 'Ali said:
"We went out as a delegation and when we arrived with the Messenger of Allah (ﷺ) he accepted our oath of allegiance and we prayed with him. When he had finished the prayer, a man who looked like a Bedouin came to him and said: 'O Messenger of Allah, what do you think about a man who touched his penis during the Salah?' He said: 'It is just a part of you,' or 'a piece of you.'"
أَخْبَرَنَا هَنَّادٌ، عَنْ مُلاَزِمٍ، قَالَ حَدَّثَنَا عَبْدُ اللَّهِ بْنُ بَدْرٍ، عَنْ قَيْسِ بْنِ طَلْقِ بْنِ عَلِيٍّ، عَنْ أَبِيهِ، قَالَ خَرَجْنَا وَفْدًا حَتَّى قَدِمْنَا عَلَى رَسُولِ اللَّهِ صلى الله عليه وسلم فَبَايَعْنَاهُ وَصَلَّيْنَا مَعَهُ فَلَمَّا قَضَى الصَّلاَةَ جَاءَ رَجُلٌ كَأَنَّهُ بَدَوِيٌّ فَقَالَ يَا رَسُولَ اللَّهِ مَا تَرَى فِي رَجُلٍ مَسَّ ذَكَرَهُ فِي الصَّلاَةِ قَالَ ‏ "‏ وَهَلْ هُوَ إِلاَّ مُضْغَةٌ مِنْكَ أَوْ بَضْعَةٌ مِنْكَ ‏"‏ ‏.‏
GradeSahih (Darussalam)
English reference : Vol. 1, Book 1, Hadith 165
Arabic reference : Book 1, Hadith 166