(1) The assembly of two or more persons for the purpose of committing an unlawful act and the failure to withdraw from the assembly on being lawfully commanded to do so by a peace officer and before any member of the assembly has inflicted injury to the person or property of another; or
(2) The assembly of two or more persons, without authority of law, for the purpose of doing violence to the person or property of one supposed by the accused to have been guilty of a violation of the law, or for the purpose of exercising correctional or regulative powers over any person by violence; provided, however, that it shall be an affirmative defense to a prosecution under this paragraph that the accused withdrew from the assembly on being lawfully commanded to do so by a peace officer or before any member of the assembly had inflicted injury to the person or property of another.