all repos — telegram-bot-api @ 7a018ae8739bcd25eeb220a85c35bf1ad73e1da8

Golang bindings for the Telegram Bot API

Merge pull request #299 from yi-jiayu/webhook-info-max-connections

Add MaxConnections to WebhookInfo
Syfaro syfaro@huefox.com
Tue, 21 Jul 2020 03:39:01 -0500
commit

7a018ae8739bcd25eeb220a85c35bf1ad73e1da8

parent

c310f538bd8c76fae81f086b5eaaf5f3ebfeed4a

2 files changed, 4 insertions(+), 0 deletions(-)

jump to
M bot_test.gobot_test.go

@@ -523,6 +523,9 @@ info, err := bot.GetWebhookInfo()

if err != nil { t.Error(err) } + if info.MaxConnections == 0 { + t.Errorf("Expected maximum connections to be greater than 0") + } if info.LastErrorDate != 0 { t.Errorf("[Telegram callback failed]%s", info.LastErrorMessage) }
M types.gotypes.go

@@ -584,6 +584,7 @@ HasCustomCertificate bool `json:"has_custom_certificate"`

PendingUpdateCount int `json:"pending_update_count"` LastErrorDate int `json:"last_error_date"` // optional LastErrorMessage string `json:"last_error_message"` // optional + MaxConnections int `json:"max_connections"` // optional } // IsSet returns true if a webhook is currently set.