While Joseph was in Liberty Jail, on or about the evening of the 8th of February 1839, six brethren visited the jail. In a sudden movement that appeared to the guards to be an escape attempt, the visitors (except Cyrus Daniels) were locked inside the jail. Word of the escape attempt brought a crowd of people to the jail who wildly demanded torture or death for all the prisoners. According to Alexander McRae, Joseph told them not to fear, that not a hair of their heads should be hurt, and that they should not lose any of their things, even to a bridle, saddle, or blanket; that everything should be restored to them.
The men all later were acquitted and received everything that was taken from them.
The brethren who visited Liberty Jail and were locked inside with the prisoners underwent a trial. Erastus Snow asked the Prophet whether or not he should employ a lawyer. The Prophet replied that he should plead his own case. "I do not understand law," Snow answered. The Prophet asked if he did not understand justice. "Go and plead for justice as hard as you can, and quote Blackstone and other authors now and then, and they will take it all for law." Snow did what he was told, and the result was as the Prophet said. The lawyers flocked around Snow and asked where he had studied law. They said they had never heard a better plea. Brother Snow was discharged, as were all the others.
[A Timeline of Joseph Smith's Prophecies: His Prophecies Fulfilled (https://amzn.to/42s0h3I)]