Ali Rafati, for the youth, said the teenager was “petrified” about going to prison.

The 17-year-old himself added: “I am extremely sorry for what has been said. It is completely out of line from me and I should have stayed out of it. It is not my battle to fight. I did not really have a reason to get involved. It was the heat of the moment.

“I will not do anything like this again.”

The youth said that he knew Vidler.

His Honour Judge Ian Lawrie QC

Judge Lawrie called the youth an “idiot” and blamed the “ignorance of youth” for his message.

He added that he could send the teenager to prison for 14 days but would spare him because of his age and good character.

The judge gave the 17-year-old a reprimand, which will not be recorded as a conviction.