Fix Caption in VoiceConfig
`values()` and `params()` methods of `VoiceConfig` don't process `Caption` field.
This commit is contained in:
parent
80bdd621f7
commit
c0bffcdbba
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue