GlobalPrivacySettings#

class pyrogram.raw.types.GlobalPrivacySettings#

Global privacy settings

Constructor of GlobalPrivacySettings.

Details:
  • Layer: 187

  • ID: 734C4CCB

Parameters:
  • archive_and_mute_new_noncontact_peers (bool, optional) – Whether to archive and mute new chats from non-contacts

  • keep_archived_unmuted (bool, optional) – Whether unmuted chats will be kept in the Archive chat list when they get a new message.

  • keep_archived_folders (bool, optional) – 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 (bool, optional) – 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 (bool, optional) – 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.

Functions:

This object can be returned by 2 functions.

account.GetGlobalPrivacySettings

Get global privacy settings

account.SetGlobalPrivacySettings

Set global privacy settings