If you read the Community Guidelines that explains what content is and isn’t allowed. The broadcaster is responsible for all the content they broadcast on their stream. It is your responsibility to take all reasonable precautions to prevent violation of the Community Guidelines, so even if it’s a 3rd party that’s on your stream that commits an offence it is still your responsibility put a stop to it.
If you’re unsure about legal matters, contact legal@twitch.tv or consult your own legal expert, as we can’t offer legal advice on this forum.