From e745bd7651f88bad3276184bac5f3e4636f41f34 Mon Sep 17 00:00:00 2001 From: jmen Date: Thu, 21 Mar 2019 19:04:00 +0200 Subject: [PATCH] fix(configs): fix param supports_stream --- configs.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/configs.go b/configs.go index 21121c9..6731de9 100644 --- a/configs.go +++ b/configs.go @@ -2,7 +2,6 @@ package tgbotapi import ( "encoding/json" - "fmt" "io" "net/url" "strconv" @@ -462,7 +461,6 @@ func (config VideoConfig) values() (url.Values, error) { if err != nil { return v, err } - fmt.Println() v.Add(config.name(), config.FileID) if config.Duration != 0 { v.Add("duration", strconv.Itoa(config.Duration)) @@ -475,6 +473,8 @@ func (config VideoConfig) values() (url.Values, error) { } if config.SupportsStreaming { v.Add("supports_streaming", "true") + } else { + v.Add("supports_streaming", "false") } return v, nil @@ -490,6 +490,11 @@ func (config VideoConfig) params() (map[string]string, error) { params["parse_mode"] = config.ParseMode } } + if config.SupportsStreaming { + params["supports_streaming"] = "true" + } else { + params["supports_streaming"] = "false" + } return params, nil }