Add ParseMode option support to EditMedia

pull/241/head
demiangetman 5 years ago committed by Viktor Oreshkin
parent 97589a3d9e
commit 921282a488

@ -803,6 +803,7 @@ func (b *Bot) EditMedia(message Editable, inputMedia InputMedia, options ...inte
Type string `json:"type"`
Caption string `json:"caption"`
Media string `json:"media"`
ParseMode ParseMode `json:"parse_mode,omitempty"`
// Video.
Width int `json:"width,omitempty"`
@ -824,7 +825,12 @@ func (b *Bot) EditMedia(message Editable, inputMedia InputMedia, options ...inte
Performer string `json:"performer,omitempty"`
}
resultMedia := &FileJson{Media: mediaRepr}
sendOpts := extractOptions(options)
resultMedia := &FileJson{
Media: mediaRepr,
ParseMode: sendOpts.ParseMode,
}
switch y := inputMedia.(type) {
case *Photo:
@ -880,7 +886,6 @@ func (b *Bot) EditMedia(message Editable, inputMedia InputMedia, options ...inte
file["thumb"] = *thumb.MediaFile()
}
sendOpts := extractOptions(options)
embedSendOptions(params, sendOpts)
respJSON, err := b.sendFiles("editMessageMedia", file, params)

Loading…
Cancel
Save