Here’s an article about people getting blackmailed for things they may have done online.
Over the years and on numerous occasions I have had men come to my office because they were “chatting” with someone they met on an online dating site only to have a “father” contact them and tell them that the young lady in question was underage and unless the man sends him money for the child’s therapy he’s going to the police.
If the man didn’t know her age, didn’t engage in sex with her (and usually there never was a “her” on the other side) and didn’t exchange nudes (please don’t do this. Ever) then there isn’t anything that will get the person crosswise with the law.
That being said, you should consult with an attorney. If you have sex with someone you meet online and the turn out to be underage, you are looking at, what is called in the mainstream, statutory rape. Even if he or she held themselves to out to be older than they are, that only goes so far.
If someone says they are underage and you continue to engage with them, then yes you can get into legal trouble.
As always be careful. I know that most people are meeting online now, but it is a risky behavior.