A 20-year-old man in bed with his girlfriend reacted violently when she received text messages from another man, a court heard.
Alan Shardlow, of Redruth Drive, Mansfield, got up in the middle of the night to go and sort out a former school friend, Nottingham Crown Court was told.
Shardlow arrived with two other men at the house in Mansfield just after 5am. The victim went to the backdoor and was confronted by Shardlow who punched him hard in the face.
A second victim, who was asleep on a sofa, was punched to the head by two men, one of them Jason McGinn.
Shardlow admitted assault causing actual bodily harm, while McGinn (22), of Flintham Court, Mansfield, was convicted after a trial. A charge of burglary faced by both men was dropped by the prosecution.
Shardlow had no prior convictions and was ashamed and remorseful, said his barrister Martin Elwick.
Shardlow was sentenced to four months custody suspended for a year, while McGinn was given nine months also suspended for a year. Both have to do 60 hours work for the community.