X, formerly Twitter, is being investigated over the possible spread of terrorist and violent content.