MadelineProtoDocs/docs/API_docs/constructors/peerSettings.md

46 lines
1.6 KiB
Markdown
Raw Normal View History

2018-04-01 13:19:25 +02:00
---
title: peerSettings
2018-12-26 02:56:50 +01:00
description: Peer settings
2018-04-04 19:52:48 +02:00
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
2018-04-01 13:19:25 +02:00
---
2018-04-05 01:19:57 +02:00
# Constructor: peerSettings
2018-04-01 13:19:25 +02:00
[Back to constructors index](index.md)
2018-12-26 02:56:50 +01:00
Peer settings
2018-04-01 13:19:25 +02:00
### Attributes:
2018-12-26 02:56:50 +01:00
| Name | Type | Required | Description |
|----------|---------------|----------|-------------|
2019-12-27 17:48:04 +01:00
|report\_spam|[Bool](../types/Bool.md) | Optional|Whether we can still report the user for spam|
|add\_contact|[Bool](../types/Bool.md) | Optional|Whether we can add the user as contact|
|block\_contact|[Bool](../types/Bool.md) | Optional|Whether we can block the user|
|share\_contact|[Bool](../types/Bool.md) | Optional|Whether we can share the user's contact|
|need\_contacts\_exception|[Bool](../types/Bool.md) | Optional|Whether a special exception for contacts is needed|
|report\_geo|[Bool](../types/Bool.md) | Optional|Whether we can report a geogroup is irrelevant for this location|
2020-09-12 12:47:38 +02:00
|autoarchived|[Bool](../types/Bool.md) | Optional|
|geo\_distance|[int](../types/int.md) | Optional|
2018-04-01 13:19:25 +02:00
### Type: [PeerSettings](../types/PeerSettings.md)
### Example:
```php
2020-09-12 12:47:38 +02:00
$peerSettings = ['_' => 'peerSettings', 'report_spam' => Bool, 'add_contact' => Bool, 'block_contact' => Bool, 'share_contact' => Bool, 'need_contacts_exception' => Bool, 'report_geo' => Bool, 'autoarchived' => Bool, 'geo_distance' => int];
2018-04-01 13:19:25 +02:00
```
Or, if you're into Lua:
2018-04-01 13:19:25 +02:00
```lua
2020-09-12 12:47:38 +02:00
peerSettings={_='peerSettings', report_spam=Bool, add_contact=Bool, block_contact=Bool, share_contact=Bool, need_contacts_exception=Bool, report_geo=Bool, autoarchived=Bool, geo_distance=int}
2018-04-01 13:19:25 +02:00
```