Add MaxConnections to WebhookInfo
parent
aa124ef1e8
commit
69bab9a28f
|
@ -497,6 +497,9 @@ func TestSetWebhookWithoutCert(t *testing.T) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
|
if info.MaxConnections == 0 {
|
||||||
|
t.Errorf("wanted max connections to be greater than 0")
|
||||||
|
}
|
||||||
if info.LastErrorDate != 0 {
|
if info.LastErrorDate != 0 {
|
||||||
t.Errorf("[Telegram callback failed]%s", info.LastErrorMessage)
|
t.Errorf("[Telegram callback failed]%s", info.LastErrorMessage)
|
||||||
}
|
}
|
||||||
|
|
1
types.go
1
types.go
|
@ -571,6 +571,7 @@ type WebhookInfo struct {
|
||||||
PendingUpdateCount int `json:"pending_update_count"`
|
PendingUpdateCount int `json:"pending_update_count"`
|
||||||
LastErrorDate int `json:"last_error_date"` // optional
|
LastErrorDate int `json:"last_error_date"` // optional
|
||||||
LastErrorMessage string `json:"last_error_message"` // optional
|
LastErrorMessage string `json:"last_error_message"` // optional
|
||||||
|
MaxConnections int `json:"max_connections"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsSet returns true if a webhook is currently set.
|
// IsSet returns true if a webhook is currently set.
|
||||||
|
|
Loading…
Reference in New Issue