Restraining orders aren't just to keep you away from certain people anymore, according to India's Supreme Court, they can also be applied in regards to social media.

The Supreme Court ordered Congress politician Sachin Choudhary to stay away from social media for 18 months, following criminal charges against him for breaching lockdown rules in order to criticise the central and UP governments.

Choudhary had used social media to blast PM Modi and Yogi Adityanath for their mishandling of the coronavirus situation in the country. He had been arrested on April 11 under various provisions of the Indian Penal Code, the Disaster Management Act, and Information Technology Act for flouting lockdown norms, for trying to create enmity, and other offences.

Source: Patrika

An Allahabad High Court had initially given bail to him on the condition that he wouldn't use social media for 18 months. When appealed, this ruling was upheld by the Supreme Court.

According to News18, Chief Justice of India SA Bobde said,

What is wrong with an order asking you not to use social media? If a court can order an accused to stay away from a gun, it can similarly ask you to stay away from social media.
Source: The Hindu

The SC also stated that it has decided to formulate guidelines on use of social media in criminal cases, especially in matters of bail.