WhatsApp has added a new feature that stops people from automatically adding you to groups, letting you decide which ones you want to join.

People will now have the option to choose from three options in their settings from 'nobody,' 'my contacts,' or 'everyone'.

The Facebook-owned service said that the feature is already rolling out for some users and will be available worldwide within the coming weeks. 

Mark Zuckerberg's WhatsApp came under scrutiny from the Indian government after a series of mob lynching incidents claimed up to 40 lives in the country last year. 

The violence was triggered by rumours circulating on the platform about child kidnappers, citing a video that purportedly shows a child being abducted.

Until now, once someone has your contact details they can add you to a group chat without your permission. 

Being added to a group chat could potentially expose your phone number to hundreds of people - a cause for privacy concerns. 

This can also lead to further problems as strangers can add you to a group dedicated to spreading spam or 'fake news'. 

Another reason they introduced the invite system is that these group chats can lead to an awkward scenario of having to leave a group you have no interest in.

This can lead to resentment among friends who may have added you. 

'WhatsApp groups continue to connect family, friends, coworkers, classmates and more,' a spokesman for WhatsApp said in a statement.

'As people turn to groups for important conversations, users have asked for more control over their experience.'

To restrict joining of new groups on WhatsApp, there will be a privacy setting that can be accessed by tapping 'account', 'privacy' and 'groups'. 

Then three options will appear on the screen - nobody, my contacts and everyone.

If you decide on the nobody option, then no one in your contact list is able to add you to a group without sending you an invite.

The same goes for if you decide that you want your contact list to be able to add you, or if you pick everyone, then anyone will be able to add you.   

This means that the administrator for a group chat will need to send you an invite to their group through an individual chat.

The invite expires three days after its receipt. 

There have been several reports of people being added to spam groups and even re-added after you've opted to leave.

The move is significant as social media platforms are expected to play a major role in political campaigns to reach out to citizens in large numbers.  

India, which is one of WhatsApp's largest markets with over 200 million users, accused WhatsApp of failing to curb false information on its platform. 

Since then, the company restricted forwarding messages to five chats at once and ran advertisements and television and radio campaigns showing users how to spot misinformation. 

However, WhatsApp has so far resisted the Indian government's demand for identifying message originators.

They argued that this would undermine the end-to-end encryption and the private nature of the platform.