parent
1930c25aa6
commit
ca09b25f8c
|
@ -501,7 +501,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("failed to set webhook: %s", info.LastErrorMessage)
|
t.Errorf("failed to set webhook: %s", info.LastErrorMessage)
|
||||||
}
|
}
|
||||||
|
|
5
types.go
5
types.go
|
@ -687,8 +687,9 @@ type WebhookInfo struct {
|
||||||
URL string `json:"url"`
|
URL string `json:"url"`
|
||||||
HasCustomCertificate bool `json:"has_custom_certificate"`
|
HasCustomCertificate bool `json:"has_custom_certificate"`
|
||||||
PendingUpdateCount int `json:"pending_update_count"`
|
PendingUpdateCount int `json:"pending_update_count"`
|
||||||
LastErrorDate int `json:"last_error_date,omitempty"` // optional
|
LastErrorDate int `json:"last_error_date"` // optional
|
||||||
LastErrorMessage string `json:"last_error_message,omitempty"` // 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