mirror of
https://github.com/tucnak/telebot
synced 2024-11-15 06:13:01 +00:00
Add ParseMode option support to EditMedia
This commit is contained in:
parent
97589a3d9e
commit
921282a488
9
bot.go
9
bot.go
@ -803,6 +803,7 @@ func (b *Bot) EditMedia(message Editable, inputMedia InputMedia, options ...inte
|
|||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Caption string `json:"caption"`
|
Caption string `json:"caption"`
|
||||||
Media string `json:"media"`
|
Media string `json:"media"`
|
||||||
|
ParseMode ParseMode `json:"parse_mode,omitempty"`
|
||||||
|
|
||||||
// Video.
|
// Video.
|
||||||
Width int `json:"width,omitempty"`
|
Width int `json:"width,omitempty"`
|
||||||
@ -824,7 +825,12 @@ func (b *Bot) EditMedia(message Editable, inputMedia InputMedia, options ...inte
|
|||||||
Performer string `json:"performer,omitempty"`
|
Performer string `json:"performer,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
resultMedia := &FileJson{Media: mediaRepr}
|
sendOpts := extractOptions(options)
|
||||||
|
|
||||||
|
resultMedia := &FileJson{
|
||||||
|
Media: mediaRepr,
|
||||||
|
ParseMode: sendOpts.ParseMode,
|
||||||
|
}
|
||||||
|
|
||||||
switch y := inputMedia.(type) {
|
switch y := inputMedia.(type) {
|
||||||
case *Photo:
|
case *Photo:
|
||||||
@ -880,7 +886,6 @@ func (b *Bot) EditMedia(message Editable, inputMedia InputMedia, options ...inte
|
|||||||
file["thumb"] = *thumb.MediaFile()
|
file["thumb"] = *thumb.MediaFile()
|
||||||
}
|
}
|
||||||
|
|
||||||
sendOpts := extractOptions(options)
|
|
||||||
embedSendOptions(params, sendOpts)
|
embedSendOptions(params, sendOpts)
|
||||||
|
|
||||||
respJSON, err := b.sendFiles("editMessageMedia", file, params)
|
respJSON, err := b.sendFiles("editMessageMedia", file, params)
|
||||||
|
Loading…
Reference in New Issue
Block a user