Layer 220
Config
Current configuration
constructor
config#cc1a241e flags:# default_p2p_contacts:flags.3?true preload_featured_stickers:flags.4?true revoke_pm_inbox:flags.6?true blocked_mode:flags.8?true force_try_ipv6:flags.14?true date:int expires:int test_mode:Bool this_dc:int dc_options:Vector<DcOption> dc_txt_domain_name:string chat_size_max:int megagroup_size_max:int forwarded_count_max:int online_update_period_ms:int offline_blur_timeout_ms:int offline_idle_timeout_ms:int online_cloud_timeout_ms:int notify_cloud_delay_ms:int notify_default_delay_ms:int push_chat_period_ms:int push_chat_limit:int edit_time_limit:int revoke_time_limit:int revoke_pm_time_limit:int rating_e_decay:int stickers_recent_limit:int channels_read_media_period:int tmp_sessions:flags.0?int call_receive_timeout_ms:int call_ring_timeout_ms:int call_connect_timeout_ms:int call_packet_timeout_ms:int me_url_prefix:string autoupdate_url_prefix:flags.7?string gif_search_username:flags.9?string venue_search_username:flags.10?string img_search_username:flags.11?string static_maps_provider:flags.12?string caption_length_max:int message_length_max:int webfile_dc_id:int suggested_lang_code:flags.2?string lang_pack_version:flags.2?int base_lang_pack_version:flags.2?int reactions_default:flags.15?Reaction autologin_token:flags.16?string = Config;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| DefaultP2PContacts | flags.3?true | Whether the client should use P 2 P by default for phone calls with contacts |
| PreloadFeaturedStickers | flags.4?true | Whether the client should preload featured stickers |
| RevokePmInbox | flags.6?true | Whether incoming private messages can be deleted for both participants |
| BlockedMode | flags.8?true | Indicates that telegram is probably censored by governments/ISPs in the current region |
| ForceTryIpv6 | flags.14?true | Whether to forcefully connect using IPv 6 dc Options, even if the client knows that IPv 4 is available. |
| Date | int | Current date at the server |
| Expires | int | Expiration date of this config: when it expires it'll have to be refetched using help. get Config |
| TestMode | Bool | Whether we're connected to the test DCs |
| ThisDc | int | ID of the DC that returned the reply |
| DcOptions | Vector<DcOption> | DC IP list |
| DcTxtDomainName | string | Domain name for fetching encrypted DC list from DNS TXT record |
| ChatSizeMax | int | Maximum member count for normal groups |
| MegagroupSizeMax | int | Maximum member count for supergroups |
| ForwardedCountMax | int | Maximum number of messages that can be forwarded at once using messages. forward Messages. |
| OnlineUpdatePeriodMs | int | The client should update its online status every N milliseconds |
| OfflineBlurTimeoutMs | int | Delay before offline status needs to be sent to the server |
| OfflineIdleTimeoutMs | int | Time without any user activity after which it should be treated offline |
| OnlineCloudTimeoutMs | int | If we are offline, but were online from some other client in last online_cloud_timeout_ms milliseconds after we had gone offline, then delay offline notification for notify_cloud_delay_ms milliseconds. |
| NotifyCloudDelayMs | int | If we are offline, but online from some other client then delay sending the offline notification for notify_cloud_delay_ms milliseconds. |
| NotifyDefaultDelayMs | int | If some other client is online, then delay notification for notification_default_delay_ms milliseconds |
| PushChatPeriodMs | int | Not for client use |
| PushChatLimit | int | Not for client use |
| EditTimeLimit | int | Only messages with age smaller than the one specified can be edited |
| RevokeTimeLimit | int | Only channel/supergroup messages with age smaller than the specified can be deleted |
| RevokePmTimeLimit | int | Only private messages with age smaller than the specified can be deleted |
| RatingEDecay | int | Exponential decay rate for computing top peer rating |
| StickersRecentLimit | int | Maximum number of recent stickers |
| ChannelsReadMediaPeriod | int | Indicates that round videos (video notes) and voice messages sent in channels and older than the specified period must be marked as read |
| TmpSessions | flags.0?int | Temporary passport sessions |
| CallReceiveTimeoutMs | int | Maximum allowed outgoing ring time in Vo IP calls: if the user we're calling doesn't reply within the specified time (in milliseconds), we should hang up the call |
| CallRingTimeoutMs | int | Maximum allowed incoming ring time in Vo IP calls: if the current user doesn't reply within the specified time (in milliseconds), the call will be automatically refused |
| CallConnectTimeoutMs | int | Vo IP connection timeout: if the instance of libtgvoip on the other side of the call doesn't connect to our instance of libtgvoip within the specified time (in milliseconds), the call must be aborted |
| CallPacketTimeoutMs | int | If during a Vo IP call a packet isn't received for the specified period of time, the call must be aborted |
| MeUrlPrefix | string | The domain to use to parse deep links. |
| AutoupdateUrlPrefix | flags.7?string | URL to use to auto-update the current app |
| GifSearchUsername | flags.9?string | Username of the bot to use to search for GIFs |
| VenueSearchUsername | flags.10?string | Username of the bot to use to search for venues |
| ImgSearchUsername | flags.11?string | Username of the bot to use for image search |
| StaticMapsProvider | flags.12?string | ID of the map provider to use for venues |
| CaptionLengthMax | int | Maximum length of caption (length in utf 8 codepoints) |
| MessageLengthMax | int | Maximum length of messages (length in utf 8 codepoints) |
| WebfileDcId | int | DC ID to use to download webfiles |
| SuggestedLangCode | flags.2?string | Suggested language code |
| LangPackVersion | flags.2?int | Language pack version |
| BaseLangPackVersion | flags.2?int | Basic language pack version |
| ReactionsDefault | flags.15?Reaction | Default message reaction |
| AutologinToken | flags.16?string | Autologin token, click here for more info on URL authorization. |
Returns
ConfigGogram Example
// Creating Config constructor obj := &tg.Config{ Date: 0, Expires: 0, TestMode: true, ThisDc: 0, DcOptions: []tg.DcOption{&tg.DcOption{}}, DcTxtDomainName: "...", // ... more required fields // Optional fields: // DefaultP2PContacts: true, // PreloadFeaturedStickers: true, // RevokePmInbox: true, // BlockedMode: true, // ... more optional fields }