Skip to content

Commit 9b191db

Browse files
authored
Merge pull request #221 from yauhen-l/bugfix-omitempty-size-in-inline-gif-result
Mark optional fields in InlineQueryResultGif as omitempty
2 parents 2f55ae3 + 97a13fd commit 9b191db

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

types.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -652,15 +652,15 @@ type InlineQueryResultCachedPhoto struct {
652652

653653
// InlineQueryResultGIF is an inline query response GIF.
654654
type InlineQueryResultGIF struct {
655-
Type string `json:"type"` // required
656-
ID string `json:"id"` // required
657-
URL string `json:"gif_url"` // required
658-
Width int `json:"gif_width"`
659-
Height int `json:"gif_height"`
660-
Duration int `json:"gif_duration"`
661-
ThumbURL string `json:"thumb_url"`
662-
Title string `json:"title"`
663-
Caption string `json:"caption"`
655+
Type string `json:"type"` // required
656+
ID string `json:"id"` // required
657+
URL string `json:"gif_url"` // required
658+
ThumbURL string `json:"thumb_url"` // required
659+
Width int `json:"gif_width,omitempty"`
660+
Height int `json:"gif_height,omitempty"`
661+
Duration int `json:"gif_duration,omitempty"`
662+
Title string `json:"title,omitempty"`
663+
Caption string `json:"caption,omitempty"`
664664
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
665665
InputMessageContent interface{} `json:"input_message_content,omitempty"`
666666
}

0 commit comments

Comments
 (0)