all repos — telegram-bot-api @ 4c16a90966d12d963e19e4df99e7744c191d0e79

Golang bindings for the Telegram Bot API

Merge pull request #179 from CssHammer/master

Add ParseMode to PhotoConfig
Syfaro syfaro@huefox.com
Sat, 02 Jun 2018 03:01:29 -0500
commit

4c16a90966d12d963e19e4df99e7744c191d0e79

parent

212b1541150cbfcc268fbeb3b15c14383e638409

1 files changed, 8 insertions(+), 1 deletions(-)

jump to
M configs.goconfigs.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 }