Fix Caption in VoiceConfig

`values()` and `params()` methods of `VoiceConfig` don't process `Caption` field.
bot-api-6.1
Ivan Kuznetsov 2017-01-15 14:00:37 +07:00 committed by GitHub
parent 80bdd621f7
commit c0bffcdbba
1 changed files with 6 additions and 0 deletions

View File

@ -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
}