From 30ab992414952ff220fb28dbfc351b9f771397b5 Mon Sep 17 00:00:00 2001 From: Maxim Lebedev Date: Fri, 5 Jun 2020 16:10:51 +0500 Subject: [PATCH] :alien: Updatedd code to v4.9 --- const.go | 4 +++- inline.go | 11 +++++++++++ types.go | 3 +++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/const.go b/const.go index e90777a..c3dcb2e 100644 --- a/const.go +++ b/const.go @@ -3,7 +3,7 @@ package telegram import "github.com/Masterminds/semver" // Version represents current version of Telegram API supported by this package -var Version = semver.MustParse("4.8.0") //nolint: gochecknoglobals +var Version = semver.MustParse("4.9.0") //nolint: gochecknoglobals // Action represents available and supported status actions of bot const ( @@ -146,7 +146,9 @@ const ( // Mime represents available and supported MIME types of data const ( + MimeGIF string = "image/gif" MimeHTML string = "text/html" + MimeJPEG string = "image/jpeg" MimeMP4 string = "video/mp4" MimePDF string = "application/pdf" MimeZIP string = "application/zip" diff --git a/inline.go b/inline.go index dd4c8aa..01b3838 100644 --- a/inline.go +++ b/inline.go @@ -113,6 +113,10 @@ type ( // URL of the static thumbnail for the result (jpeg or gif) ThumbURL string `json:"thumb_url"` + // MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to + // “image/jpeg” + ThumbMimeType string `json:"thumb_mime_type,omitempty"` + // Title for the result Title string `json:"title,omitempty"` @@ -152,6 +156,10 @@ type ( // URL of the static thumbnail (jpeg or gif) for the result ThumbURL string `json:"thumb_url"` + // MIME type of the thumbnail, must be one of “image/jpeg”, “image/gif”, or “video/mp4”. Defaults to + // “image/jpeg” + ThumbMimeType string `json:"thumb_mime_type,omitempty"` + // Title for the result Title string `json:"title,omitempty"` @@ -167,6 +175,9 @@ type ( // Video duration Mpeg4Duration int `json:"mpeg4_duration,omitempty"` + // Mode for parsing entities in the caption. See formatting options for more details. + ParseMode string `json:"parse_mode,omitempty"` + // Inline keyboard attached to the message ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"` diff --git a/types.go b/types.go index 6898a4b..495d0dd 100644 --- a/types.go +++ b/types.go @@ -131,6 +131,9 @@ type ( // For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply. ReplyToMessage *Message `json:"reply_to_message,omitempty"` + // Bot through which the message was sent + ViaBot *User `json:"via_bot,omitempty"` + // Date the message was last edited in Unix time EditDate int64 `json:"edit_date,omitempty"`