A nonprofit organization that researches links between social media, hate and extremism has been threatened with a lawsuit by X, the social media platform formerly known as Twitter.