Generalising outrageously:
A state (interpreted broadly as an entity with a functioning judicial system; could be a nation or a state or something else) claims jurisdiction for:
- Acts committed by its citizens,
- Acts committed within its territory.
- Certain acts committed against its citizens.
- Exceptionally egregious crimes with an international character (e.g. piracy, genocide)
For your particular example, a state may try to prosecute and its courts might rule that they have jurisdiction if:
- The perpetrator were a citizen, and/or
- The act was committed on their territory, and/or
- A citizen is considered to have been a victim of the act.
As this is a matter of jurisdiction only we don't have to worry about things like if such a prosecution is realistic or a conviction is likely; a court would need to be satisfied that it had jurisdiction before it made such a decision anyway. This also lets us avoid the question of if such a statement in a chatroom that requires membership of this site is sufficiently public to offend the law; as far as I am aware most of these laws require public expression.
So brushing over all of that then a state in which the statement was published could claim jurisdiction; that would be any state with a sufficiently advanced internet connection that the offending statement could be accessed i.e. pretty much any state that wanted to have a go.