Merge pull request #179 from CssHammer/master Add ParseMode to PhotoConfig
Syfaro syfaro@huefox.com
Sat, 02 Jun 2018 03:01:29 -0500
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 }