From c0bffcdbba20c85d148c8de955c58db9c04531de Mon Sep 17 00:00:00 2001 From: Ivan Kuznetsov Date: Sun, 15 Jan 2017 14:00:37 +0700 Subject: [PATCH] Fix Caption in VoiceConfig `values()` and `params()` methods of `VoiceConfig` don't process `Caption` field. --- configs.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configs.go b/configs.go index aff0cd9..8b07982 100644 --- a/configs.go +++ b/configs.go @@ -474,6 +474,9 @@ func (config VoiceConfig) values() (url.Values, error) { if config.Duration != 0 { v.Add("duration", strconv.Itoa(config.Duration)) } + if config.Caption != "" { + v.Add("caption", config.Caption) + } return v, nil } @@ -485,6 +488,9 @@ func (config VoiceConfig) params() (map[string]string, error) { if config.Duration != 0 { params["duration"] = strconv.Itoa(config.Duration) } + if config.Caption != "" { + params["caption"] = config.Caption + } return params, nil }