globalPrivacySettings

Global privacy settings

Constructor schema is available as of layer 160. Switch »

Parameters

Name Type Description
flags # Flags, see TL conditional fields
archive_and_mute_new_noncontact_peers flags.0?true Whether to archive and mute new chats from non-contacts
keep_archived_unmuted flags.1?true Whether unmuted chats will be kept in the Archive chat list when they get a new message.
keep_archived_folders flags.2?true Whether unmuted chats that are always included or pinned in a folder, will be kept in the Archive chat list when they get a new message. Ignored if keep_archived_unmuted is set.
hide_read_marks flags.3?true If this flag is set, the inputPrivacyKeyStatusTimestamp key will also apply to the ability to use messages.getOutboxReadDate on messages sent to us.
Meaning, users that cannot see our exact last online date due to the current value of the inputPrivacyKeyStatusTimestamp key will receive a 403 USER_PRIVACY_RESTRICTED error when invoking messages.getOutboxReadDate to fetch the exact read date of a message they sent to us.
The userFull.read_dates_private flag will be set for users that have this flag enabled.
new_noncontact_peers_require_premium flags.4?true If set, only users that have a premium account, are in our contact list, or already have a private chat with us can write to us; a 403 PRIVACY_PREMIUM_REQUIRED error will be emitted otherwise.
The userFull.contact_require_premium flag will be set for users that have this flag enabled.
To check whether we can write to a user with this flag enabled, if we haven't yet cached all the required information (for example we don't have the userFull or history of all users while displaying the chat list in the sharing UI) the users.getIsPremiumRequiredToContact method may be invoked, passing the list of users currently visible in the UI, returning a list of booleans that directly specify whether we can or cannot write to each user.
Premium users only, non-Premium users will receive a PREMIUM_ACCOUNT_REQUIRED error when trying to enable this flag.

Type

GlobalPrivacySettings

Related pages

Folders

Telegram allows placing chats into folders, based on their type, mute status, or other custom criteria, thanks to folder blacklists and whitelists.

inputPrivacyKeyStatusTimestamp

Whether people will be able to see our exact last online timestamp.

Note that if we decide to hide our exact last online timestamp to someone (i.e., users A, B, C, or all users) and we do not have a Premium subscription, we won't be able to see the exact last online timestamp of those users (A, B, C, or all users), even if those users do share it with us.

If those users do share their exact online status with us, but we can't see it due to the reason mentioned above, the by_me flag of userStatusRecently, userStatusLastWeek, userStatusLastMonth will be set.

messages.getOutboxReadDate

Get the exact read date of one of our messages, sent to a private chat with another user.

Can be only done for private outgoing messages not older than appConfig.pm_read_date_expire_period ».

If the peer's userFull.read_dates_private flag is set, we will not be able to fetch the exact read date of messages we send to them, and a USER_PRIVACY_RESTRICTED RPC error will be emitted.
The exact read date of messages might still be unavailable for other reasons, see here » for more info.
To set userFull.read_dates_private for ourselves invoke account.setGlobalPrivacySettings, setting the settings.hide_read_marks flag.

userFull

Extended user info

When updating the local peer database », all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor).

users.getIsPremiumRequiredToContact

Check whether we can write to the specified user (this method can only be called by non-Premium users), see here » for more info on the full flow.

Telegram Premium

Telegram Premium is an optional subscription service that unlocks additional exclusive client-side and API-side features, while helping support the development of the app.