From 3b466def718ef0685de17e626a0369450425d247 Mon Sep 17 00:00:00 2001 From: Syfaro Date: Mon, 7 Sep 2015 12:47:31 -0500 Subject: [PATCH] fixed setting webhooks with a certificate --- helpers.go | 2 +- methods.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/helpers.go b/helpers.go index 753e41a..90cc312 100644 --- a/helpers.go +++ b/helpers.go @@ -238,7 +238,7 @@ func NewWebhook(link string) WebhookConfig { } } -// NewWebhookWithCert creates a new webhook with a selfsigned certificate. +// NewWebhookWithCert creates a new webhook with a certificate. // // link is the url you wish to get webhooks, // file contains a string to a file, or a FileReader or FileBytes. diff --git a/methods.go b/methods.go index c9c3db9..90d1444 100644 --- a/methods.go +++ b/methods.go @@ -985,6 +985,7 @@ func (bot *BotAPI) SetWebhook(config WebhookConfig) (APIResponse, error) { } params := make(map[string]string) + params["url"] = config.URL.String() resp, err := bot.UploadFile("setWebhook", params, "certificate", config.Certificate) if err != nil {