Fix Caption in VoiceConfig
`values()` and `params()` methods of `VoiceConfig` don't process `Caption` field.bot-api-6.1
parent
80bdd621f7
commit
c0bffcdbba
|
@ -474,6 +474,9 @@ func (config VoiceConfig) values() (url.Values, error) {
|
||||||
if config.Duration != 0 {
|
if config.Duration != 0 {
|
||||||
v.Add("duration", strconv.Itoa(config.Duration))
|
v.Add("duration", strconv.Itoa(config.Duration))
|
||||||
}
|
}
|
||||||
|
if config.Caption != "" {
|
||||||
|
v.Add("caption", config.Caption)
|
||||||
|
}
|
||||||
|
|
||||||
return v, nil
|
return v, nil
|
||||||
}
|
}
|
||||||
|
@ -485,6 +488,9 @@ func (config VoiceConfig) params() (map[string]string, error) {
|
||||||
if config.Duration != 0 {
|
if config.Duration != 0 {
|
||||||
params["duration"] = strconv.Itoa(config.Duration)
|
params["duration"] = strconv.Itoa(config.Duration)
|
||||||
}
|
}
|
||||||
|
if config.Caption != "" {
|
||||||
|
params["caption"] = config.Caption
|
||||||
|
}
|
||||||
|
|
||||||
return params, nil
|
return params, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue