all repos — telegram-bot-api @ 60668682f7b5f75cdc0abde06b9fb00f30783570

Golang bindings for the Telegram Bot API

Add ParseMode to PhotoConfig
CssHammer class-3000@yandex.ru
Wed, 23 May 2018 22:12:20 +0300
commit

60668682f7b5f75cdc0abde06b9fb00f30783570

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 }