all repos — telegram-bot-api @ c0bffcdbba20c85d148c8de955c58db9c04531de

Golang bindings for the Telegram Bot API

Fix Caption in VoiceConfig

`values()` and `params()` methods of `VoiceConfig` don't process `Caption` field.
Ivan Kuznetsov me@jeiwan.ru
Sun, 15 Jan 2017 14:00:37 +0700
commit

c0bffcdbba20c85d148c8de955c58db9c04531de

parent

80bdd621f775d115d6e781d9d2f91e79d0f41169

1 files changed, 6 insertions(+), 0 deletions(-)

jump to
M configs.goconfigs.go

@@ -474,6 +474,9 @@ v.Add(config.name(), config.FileID)

if config.Duration != 0 { v.Add("duration", strconv.Itoa(config.Duration)) } + if config.Caption != "" { + v.Add("caption", config.Caption) + } return v, nil }

@@ -484,6 +487,9 @@ params, _ := config.BaseFile.params()

if config.Duration != 0 { params["duration"] = strconv.Itoa(config.Duration) + } + if config.Caption != "" { + params["caption"] = config.Caption } return params, nil