Add ParseMode to PhotoConfig
CssHammer class-3000@yandex.ru
Wed, 23 May 2018 22:12:20 +0300
1 files changed,
8 insertions(+),
1 deletions(-)
jump to
M
configs.go
→
configs.go
@@ -243,7 +243,8 @@
// PhotoConfig contains information about a SendPhoto request. type PhotoConfig struct { BaseFile - Caption string + Caption string + ParseMode string } // Params returns a map[string]string representation of PhotoConfig.@@ -253,6 +254,9 @@
if config.Caption != "" { params["caption"] = config.Caption } + if config.ParseMode != "" { + params["parse_mode"] = config.ParseMode + } return params, nil }@@ -267,6 +271,9 @@
v.Add(config.name(), config.FileID) if config.Caption != "" { v.Add("caption", config.Caption) + } + if config.ParseMode != "" { + v.Add("parse_mode", config.ParseMode) } return v, nil }