add support of parse_mode in EditMessageCaptionConfig

bot-api-6.1
Oleksandr Savchuk 2018-07-30 20:00:09 +03:00
parent 0b68c9b790
commit af72b0a3db
1 changed files with 5 additions and 1 deletions

View File

@ -822,13 +822,17 @@ func (config EditMessageTextConfig) method() string {
// EditMessageCaptionConfig allows you to modify the caption of a message.
type EditMessageCaptionConfig struct {
BaseEdit
Caption string
Caption string
ParseMode string
}
func (config EditMessageCaptionConfig) values() (url.Values, error) {
v, _ := config.BaseEdit.values()
v.Add("caption", config.Caption)
if config.ParseMode != "" {
v.Add("parse_mode", config.ParseMode)
}
return v, nil
}