Layer 220
method Users
account.setPrivacy#c9f81ce8 key:InputPrivacyKey rules:Vector<InputPrivacyRule> = account.PrivacyRules;

Parameters

Name Type Description
Key InputPrivacyKey New privacy rule
Rules Vector<InputPrivacyRule> Peers to which the privacy rule will apply.

Possible Errors

Code Type Description
400 PRIVACY_KEY_INVALID The privacy key is invalid.
400 PRIVACY_TOO_LONG Too many privacy rules were specified, the current limit is 1000.
400 PRIVACY_VALUE_INVALID The specified privacy rule combination is invalid.

Gogram Example

// AccountSetPrivacy - positional arguments
result, err := client.AccountSetPrivacy(&tg.InputPrivacyKeyStatusTimestamp{}, []tg.InputPrivacyRule{&tg.InputPrivacyValueAllowAll{}})
if err != nil {
    // handle error
}
// result is *tg.AccountPrivacyRules