all repos — telegram-bot-api @ ca09b25f8c79e3f045e121dd85bc7b79175f5f7e

Golang bindings for the Telegram Bot API

Add MaxConnections to WebhookInfo

(cherry picked from commit 69bab9a28f2047c696d5c4d1c088fca6a2768bb8)
Jiayu Yi yijiayu@gmail.com
Mon, 13 Jan 2020 15:42:35 +0800
commit

ca09b25f8c79e3f045e121dd85bc7b79175f5f7e

parent

1930c25aa68f30333bc5b4c8745b5e05aae52be3

2 files changed, 6 insertions(+), 3 deletions(-)

jump to
M bot_test.gobot_test.go

@@ -501,7 +501,9 @@

if err != nil { t.Error(err) } - + if info.MaxConnections == 0 { + t.Errorf("wanted max connections to be greater than 0") + } if info.LastErrorDate != 0 { t.Errorf("failed to set webhook: %s", info.LastErrorMessage) }
M types.gotypes.go

@@ -687,8 +687,9 @@ type WebhookInfo struct {

URL string `json:"url"` HasCustomCertificate bool `json:"has_custom_certificate"` PendingUpdateCount int `json:"pending_update_count"` - LastErrorDate int `json:"last_error_date,omitempty"` // optional - LastErrorMessage string `json:"last_error_message,omitempty"` // optional + LastErrorDate int `json:"last_error_date"` // optional + LastErrorMessage string `json:"last_error_message"` // optional + MaxConnections int `json:"max_connections"` } // IsSet returns true if a webhook is currently set.