fixed setting webhooks with a certificate

bot-api-6.1
Syfaro 2015-09-07 12:47:31 -05:00
parent 9efd300516
commit 3b466def71
2 changed files with 2 additions and 1 deletions

View File

@ -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, // link is the url you wish to get webhooks,
// file contains a string to a file, or a FileReader or FileBytes. // file contains a string to a file, or a FileReader or FileBytes.

View File

@ -985,6 +985,7 @@ func (bot *BotAPI) SetWebhook(config WebhookConfig) (APIResponse, error) {
} }
params := make(map[string]string) params := make(map[string]string)
params["url"] = config.URL.String()
resp, err := bot.UploadFile("setWebhook", params, "certificate", config.Certificate) resp, err := bot.UploadFile("setWebhook", params, "certificate", config.Certificate)
if err != nil { if err != nil {