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.'"
English reference: Vol. 1, Book 1, Hadith 165
Arabic reference: Book 1, Hadith 166