There are two kinds of jurisdictions in this matter, one where some participant must consent to the recording, and thise (a minority) where all must consent. California is an all-party consent state, so we can take that as the highest hurdle that you have to clear. Cal. Penal §632 say (emphasis added)
A person who, intentionally and without the consent of all parties
to a confidential communication, uses an electronic amplifying or
recording device to eavesdrop upon or record the confidential
communication, whether the communication is carried on among the
parties in the presence of one another or by means of a telegraph,
telephone, or other device, except a radio, shall be punished by a
fine not exceeding two thousand five hundred dollars ($2,500) per
violation, or imprisonment in a county jail not exceeding one year, or
in the state prison, or by both that fine and imprisonment.
The definition of confident communication is important:
For the purposes of this section, “confidential communication” means
any communication carried on in circumstances as may reasonably
indicate that any party to the communication desires it to be confined
to the parties thereto, but excludes a communication made in a public
gathering or in any legislative, judicial, executive, or
administrative proceeding open to the public, or in any other
circumstance in which the parties to the communication may reasonably
expect that the communication may be overheard or recorded.
There have been two standards regarding the reasonable expectation of privacy, one that is about recording, and one about disclosure (which would allow recordings if not disclosed). The California Supreme Court found in favor of the "no recording" interpretation
Under the construction adopted here, the Privacy Act is a coherent
statutory scheme. It protects against intentional, nonconsensual
recording of telephone conversations regardless of the content of the
conversation or the type of telephone involved. In contrast, the
O'Laskey standard urged by Honorine and adopted by the Court of Appeal
would provide significantly less protection from surreptitious
eavesdropping or recording when both telephones are landline
telephones, a distinction that lacks any justification in terms of the
purpose of the Privacy Act.
Internet "chat" communication poses some interesting problems regarding objectively reasonable expectations, and we don't want to get bogged down in OT technical questions. The public / private distinction could be relevant because communications made in a public gathering are statutorily excluded. The law does not define "public" or "gathering", but it is unlikely that the court would hold that a gathering can only exist when the bodies involved are in a single location. There does not seem to be any precedent that tells us whether an openly accessible online chat room is a "public gathering", so the courts may need to look into legislative intent to see whether a chatroom is or is not one (it's hard to see how they would not find a chatroom to be just like a physical gathering).
Even without such a determination, the question is whether a person has an objectively reasonable expectation of privacy. I don't see how one can have such an expectation in an open-to-all chatroom. Anyone can drop by; you probably are announced when you enter and leave; you know, or should know, that the internet keeps track of everything. It would be possible to create a chatroom with a privacy expectation, but if we take SE chatrooms as a model, there is zero expectation of privacy.