Merge branch 'master' of github.com-syfaro:Syfaro/telegram-bot-api

bot-api-6.1
Syfaro 2015-09-07 11:35:05 -05:00
commit 87a279827e
1 changed files with 2 additions and 4 deletions

View File

@ -973,13 +973,11 @@ func (bot *BotAPI) GetUpdates(config UpdateConfig) ([]Update, error) {
// If this is set, GetUpdates will not get any data!
//
// Requires Url OR to set Clear to true.
func (bot *BotAPI) SetWebhook(config WebhookConfig) error {
func (bot *BotAPI) SetWebhook(config WebhookConfig) (APIResponse, error){
v := url.Values{}
if !config.Clear {
v.Add("url", config.URL.String())
}
_, err := bot.MakeRequest("setWebhook", v)
return err
return bot.MakeRequest("setWebhook", v)
}