Add MaxConnections to WebhookInfo
Jiayu Yi yijiayu@gmail.com
Mon, 13 Jan 2020 15:42:35 +0800
2 files changed,
4 insertions(+),
0 deletions(-)
M
bot_test.go
→
bot_test.go
@@ -497,6 +497,9 @@ info, err := bot.GetWebhookInfo()
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("[Telegram callback failed]%s", info.LastErrorMessage) }
M
types.go
→
types.go
@@ -571,6 +571,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"` } // IsSet returns true if a webhook is currently set.