Access
Privacy operations are available directly on theClient:
Methods
fetch_privacy_settings
Fetch all current privacy settings.PrivacySettingsResponse- Contains a list of all privacy settings
set_privacy_setting
Update a specific privacy setting.category- Privacy category string (seePrivacyCategorybelow)value- Privacy value string (seePrivacyValuebelow)
set_default_disappearing_mode
Set the default disappearing messages duration for all new chats.duration- Timer in seconds. Common values:86400(24 hours),604800(7 days),7776000(90 days). Pass0to disable.
This sets the default for new chats only. Existing chats keep their current setting. To change disappearing messages for a specific group, use
set_ephemeral.Types
PrivacyCategory
PrivacyValue
PrivacySetting
PrivacySettingsResponse
get(&self, category: &PrivacyCategory) -> Option<&PrivacySetting>- Look up a setting by categoryget_value(&self, category: &PrivacyCategory) -> Option<&PrivacyValue>- Look up a value directly
Common patterns
Fetch and display all settings
Maximum privacy configuration
See also
- Client API - Client-level privacy methods
- TC Token API - Trusted contact tokens used for privacy-gated operations
- Blocking API - Block and unblock contacts