MadelineProtoDocs/docs/API_docs/constructors/updatePrivacy.md
Sean 4baac3178e Add Syntax Highlight for Markdown
Add PHP, Lua language tag to Code area
2018-10-18 00:30:20 +08:00

44 lines
863 B
Markdown

---
title: updatePrivacy
description: updatePrivacy attributes, type and example
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
---
# Constructor: updatePrivacy
[Back to constructors index](index.md)
### Attributes:
| Name | Type | Required |
|----------|---------------|----------|
|key|[PrivacyKey](../types/PrivacyKey.md) | Yes|
|rules|Array of [PrivacyRule](../types/PrivacyRule.md) | Yes|
### Type: [Update](../types/Update.md)
### Example:
```php
$updatePrivacy = ['_' => 'updatePrivacy', 'key' => PrivacyKey, 'rules' => [PrivacyRule, PrivacyRule]];
```
[PWRTelegram](https://pwrtelegram.xyz) json-encoded version:
```
{"_": "updatePrivacy", "key": PrivacyKey, "rules": [PrivacyRule]}
```
Or, if you're into Lua:
```lua
updatePrivacy={_='updatePrivacy', key=PrivacyKey, rules={PrivacyRule}}
```