Skip to main content

Privacy

To get the privacy settings

const privacySettings = await sock.fetchPrivacySettings(true);
console.log("privacy settings: " + privacySettings);

To update the LastSeen privacy

const value = "all"; // 'contacts' | 'contact_blacklist' | 'none'
await sock.updateLastSeenPrivacy(value);

To update the Online privacy

const value = "all"; // 'match_last_seen'
await sock.updateOnlinePrivacy(value);

To update the Profile Picture privacy

const value = "all"; // 'contacts' | 'contact_blacklist' | 'none'
await sock.updateProfilePicturePrivacy(value);

To update the Status privacy

const value = "all"; // 'contacts' | 'contact_blacklist' | 'none'
await sock.updateStatusPrivacy(value);

To update the Read Receipts privacy

const value = "all"; // 'none'
await sock.updateReadReceiptsPrivacy(value);

To update the Groups Add privacy

const value = "all"; // 'contacts' | 'contact_blacklist' | 'none'
await sock.updateGroupsAddPrivacy(value);

To update the Default Disappearing Mode

const duration = 86400; // 604800 | 7776000 | 0
await sock.updateDefaultDisappearingMode(duration);