webhook: fix GetWebhook result name

pull/285/head^2
Demian 4 years ago
parent 183d6484d9
commit 9c08de946d

@ -159,12 +159,12 @@ func (b *Bot) GetWebhook() (*Webhook, error) {
} }
var resp struct { var resp struct {
Webhook Webhook Result Webhook
} }
if err := json.Unmarshal(data, &resp); err != nil { if err := json.Unmarshal(data, &resp); err != nil {
return nil, err return nil, err
} }
return &resp.Webhook, nil return &resp.Result, nil
} }
// SetWebhook configures a bot to receive incoming // SetWebhook configures a bot to receive incoming

Loading…
Cancel
Save