diff --git a/configs_test.go b/configs_test.go index 6c867610..444dfaeb 100644 --- a/configs_test.go +++ b/configs_test.go @@ -49,8 +49,10 @@ func TestSendPollConfigBotAPI10MediaSerialization(t *testing.T) { Emoji: ":)", } explanationMedia := &InputMediaLivePhoto{ - Type: "live_photo", - Media: FilePath("tests/video.mp4"), + BaseInputMedia: BaseInputMedia{ + Type: "live_photo", + Media: FilePath("tests/video.mp4"), + }, Photo: FilePath("tests/image.jpg"), } pollMedia := &InputMediaLocation{ diff --git a/helper_methods.go b/helper_methods.go index fd8b0cbf..5bec80b4 100644 --- a/helper_methods.go +++ b/helper_methods.go @@ -333,8 +333,10 @@ func NewInputMediaDocument(media RequestFileData) InputMediaDocument { // NewInputMediaLivePhoto creates a new InputMediaLivePhoto. func NewInputMediaLivePhoto(livePhoto, photo RequestFileData) InputMediaLivePhoto { return InputMediaLivePhoto{ - Type: "live_photo", - Media: livePhoto, + BaseInputMedia: BaseInputMedia{ + Type: "live_photo", + Media: livePhoto, + }, Photo: photo, } } diff --git a/types.go b/types.go index a7a6fdbf..25f48ee4 100644 --- a/types.go +++ b/types.go @@ -4228,14 +4228,8 @@ type InputMediaDocument struct { // InputMediaLivePhoto represents a live photo to send. type InputMediaLivePhoto struct { - Type string `json:"type"` - Media RequestFileData `json:"media"` - Photo RequestFileData `json:"photo"` - Caption string `json:"caption,omitempty"` - ParseMode string `json:"parse_mode,omitempty"` - CaptionEntities []MessageEntity `json:"caption_entities,omitempty"` - ShowCaptionAboveMedia bool `json:"show_caption_above_media,omitempty"` - HasSpoiler bool `json:"has_spoiler,omitempty"` + BaseInputMedia + Photo RequestFileData `json:"photo"` } func (media *InputMediaLivePhoto) getType() string {