config
Current configuration
type tg.Config struct { /* ... */ }
Fields
| Name | Type | Required | Description |
|---|---|---|---|
DefaultP2PContacts | bool | — | Whether the client should use P2P by default for phone calls with contacts |
PreloadFeaturedStickers | bool | — | Whether the client should preload featured stickers |
RevokePmInbox | bool | — | Whether incoming private messages can be deleted for both participants |
BlockedMode | bool | — | Indicates that telegram is probably censored by governments/ISPs in the current region |
ForceTryIpv6 | bool | — | Whether to forcefully connect using IPv6 dcOptions, even if the client knows that IPv4 is available. |
Date | int | yes | Current date at the server |
Expires | int | yes | Expiration date of this config: when it expires it'll have to be refetched using help getConfig |
TestMode | bool | — | Whether we're connected to the test DCs |
ThisDC | int | yes | ID of the DC that returned the reply |
DCOptions | []DCOption | yes | DC IP list |
DCTxtDomainName | string | yes | Domain name for fetching encrypted DC list from DNS TXT record |
ChatSizeMax | int | yes | Maximum member count for normal groups |
MegagroupSizeMax | int | yes | Maximum member count for supergroups |
ForwardedCountMax | int | yes | Maximum number of messages that can be forwarded at once using messages forwardMessages. |
OnlineUpdatePeriodMs | int | yes | The client should update its online status every N milliseconds |
OfflineBlurTimeoutMs | int | yes | Delay before offline status needs to be sent to the server |
OfflineIdleTimeoutMs | int | yes | Time without any user activity after which it should be treated offline |
OnlineCloudTimeoutMs | int | yes | 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 | yes | If we are offline, but online from some other client then delay sending the offline notification for notify_cloud_delay_ms milliseconds. |
NotifyDefaultDelayMs | int | yes | If some other client is online, then delay notification for notification_default_delay_ms milliseconds |
PushChatPeriodMs | int | yes | Not for client use |
PushChatLimit | int | yes | Not for client use |
EditTimeLimit | int | yes | Only messages with age smaller than the one specified can be edited |
RevokeTimeLimit | int | yes | Only channel/supergroup messages with age smaller than the specified can be deleted |
RevokePmTimeLimit | int | yes | Only private messages with age smaller than the specified can be deleted |
RatingEDecay | int | yes | Exponential decay rate for computing top peer rating |
StickersRecentLimit | int | yes | Maximum number of recent stickers |
ChannelsReadMediaPeriod | int | yes | Indicates that round videos (video notes) and voice messages sent in channels and older than the specified period must be marked as read |
TmpSessions | int | — | Temporary passport sessions |
CallReceiveTimeoutMs | int | yes | Maximum allowed outgoing ring time in VoIP calls: if the user we're calling doesn't reply within the specified time (in milliseconds), we should hang up the call |
CallRingTimeoutMs | int | yes | Maximum allowed incoming ring time in VoIP calls: if the current user doesn't reply within the specified time (in milliseconds), the call will be automatically refused |
CallConnectTimeoutMs | int | yes | VoIP 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 | yes | If during a VoIP call a packet isn't received for the specified period of time, the call must be aborted |
MeURLPrefix | string | yes | The domain to use to parse deep links ». |
AutoupdateURLPrefix | string | — | URL to use to auto-update the current app |
GifSearchUsername | string | — | Username of the bot to use to search for GIFs |
VenueSearchUsername | string | — | Username of the bot to use to search for venues |
ImgSearchUsername | string | — | Username of the bot to use for image search |
StaticMapsProvider | string | — | ID of the map provider to use for venues |
CaptionLengthMax | int | yes | Maximum length of caption (length in utf8 codepoints) |
MessageLengthMax | int | yes | Maximum length of messages (length in utf8 codepoints) |
WebfileDCID | int | yes | DC ID to use to download webfiles |
SuggestedLangCode | string | — | Suggested language code |
LangPackVersion | int | — | Language pack version |
BaseLangPackVersion | int | — | Basic language pack version |
ReactionsDefault | ReactionClass | — | Default message reaction |
AutologinToken | string | — | Autologin token, click here for more info on URL authorization ». |
Returned by
References
- Official documentation
- Generated Go reference
- TL definition:
config#cc1a241e