MadelineProto/docs/TD_docs/constructors/privacyRules.md

45 lines
1015 B
Markdown
Raw Normal View History

---
title: privacyRules
description: List of privacy rules. Rules are matched in the specified order. First matched rule defines privacy setting for a given user. If no rule matches action is not allowed
---
## Constructor: privacyRules
[Back to constructors index](index.md)
List of privacy rules. Rules are matched in the specified order. First matched rule defines privacy setting for a given user. If no rule matches action is not allowed
### Attributes:
| Name | Type | Required | Description |
2017-08-20 11:05:56 +02:00
|----------|---------------|----------|-------------|
|rules|Array of [PrivacyRule](../constructors/PrivacyRule.md) | Yes|List of rules|
### Type: [PrivacyRules](../types/PrivacyRules.md)
### Example:
```
2017-07-23 16:33:46 +02:00
$privacyRules = ['_' => 'privacyRules', 'rules' => [PrivacyRule]];
```
2017-07-23 16:11:02 +02:00
[PWRTelegram](https://pwrtelegram.xyz) json-encoded version:
```
2017-07-23 16:33:46 +02:00
{"_": "privacyRules", "rules": [PrivacyRule]}
2017-07-23 16:11:02 +02:00
```
Or, if you're into Lua:
```
2017-07-23 16:33:46 +02:00
privacyRules={_='privacyRules', rules={PrivacyRule}}
```