From a5178b7425aab349bc1f2f76379b28aed5308380 Mon Sep 17 00:00:00 2001 From: Hamed Ghasemzadeh Date: Sun, 4 Dec 2016 16:45:13 +0330 Subject: [PATCH] caption is corrected for files --- configs.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configs.go b/configs.go index aff0cd9..5524207 100644 --- a/configs.go +++ b/configs.go @@ -349,6 +349,7 @@ func (config AudioConfig) method() string { // DocumentConfig contains information about a SendDocument request. type DocumentConfig struct { BaseFile + Caption string } // values returns a url.Values representation of DocumentConfig. @@ -360,6 +361,10 @@ func (config DocumentConfig) values() (url.Values, error) { v.Add(config.name(), config.FileID) + if config.Caption != "" { + v.Add("caption", config.Caption) + } + return v, nil }