Two girls aged 17 and 18, were taken to Royal Stoke University Hospital with respiratory and abdominal issues.
Christopher Wardle, 25, formerly of Barrack Road, Newcastle-upon-Tyne, and Spencer Benham, 23, of Wilberforce Road, Leicester, pleaded guilty to possessing a prohibited weapon.
They were sentenced at Stafford Crown Court on 15 July.
More on this story and others from Staffordshire
Twelve people, who were inside the restaurant at the time, were also examined by paramedics after reporting "varying degrees of respiratory and stomach irritation", West Midlands Ambulance Service said.
Two men who set off a canister in a fast-food restaurant have been jailed for 10 months each.