How does the Indian legal system balance freedom of expression with the need to prevent hate speech on social media?

A cartoonist sought anticipatory bail after posting objectionable content about political leaders. I want to explore how the legal system navigates the fine line between protecting free speech and curbing harmful or inflammatory content online.