Tehran’s prosecutor-general says courts have handed “rioters” jail terms of up to 10 years.