Update to TDLib 1.8.30

This commit is contained in:
c0re100 2024-05-29 17:58:55 +08:00
parent 3052b01106
commit b5f52a79a6
No known key found for this signature in database
GPG key ID: 7C3B3004FE745AAF
4 changed files with 2272 additions and 165 deletions

View file

@ -184,13 +184,20 @@ func (client *Client) SetAuthenticationEmailAddress(req *SetAuthenticationEmailA
return UnmarshalOk(result.Data)
}
type ResendAuthenticationCodeRequest struct {
// Reason of code resending; pass null if unknown
Reason ResendCodeReason `json:"reason"`
}
// Resends an authentication code to the user. Works only when the current authorization state is authorizationStateWaitCode, the next_code_type of the result is not null and the server-specified timeout has passed, or when the current authorization state is authorizationStateWaitEmailCode
func (client *Client) ResendAuthenticationCode() (*Ok, error) {
func (client *Client) ResendAuthenticationCode(req *ResendAuthenticationCodeRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "resendAuthenticationCode",
},
Data: map[string]interface{}{},
Data: map[string]interface{}{
"reason": req.Reason,
},
})
if err != nil {
return nil, err
@ -436,7 +443,7 @@ func (client *Client) RecoverAuthenticationPassword(req *RecoverAuthenticationPa
}
type SendAuthenticationFirebaseSmsRequest struct {
// SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application
// Play Integrity API or SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application
Token string `json:"token"`
}
@ -466,7 +473,7 @@ type ReportAuthenticationCodeMissingRequest struct {
MobileNetworkCode string `json:"mobile_network_code"`
}
// Reports that authentication code wasn't delivered via SMS; for official mobile apps only. Works only when the current authorization state is authorizationStateWaitCode
// Reports that authentication code wasn't delivered via SMS; for official mobile applications only. Works only when the current authorization state is authorizationStateWaitCode
func (client *Client) ReportAuthenticationCodeMissing(req *ReportAuthenticationCodeMissingRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
@ -2870,6 +2877,112 @@ func (client *Client) SearchOutgoingDocumentMessages(req *SearchOutgoingDocument
return UnmarshalFoundMessages(result.Data)
}
type SearchPublicHashtagMessagesRequest struct {
// Hashtag to search for
Hashtag string `json:"hashtag"`
// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
Offset string `json:"offset"`
// The maximum number of messages to be returned; up to 100. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
Limit int32 `json:"limit"`
}
// Searches for public channel posts with the given hashtag. For optimal performance, the number of returned messages is chosen by TDLib and can be smaller than the specified limit
func (client *Client) SearchPublicHashtagMessages(req *SearchPublicHashtagMessagesRequest) (*FoundMessages, error) {
result, err := client.Send(Request{
meta: meta{
Type: "searchPublicHashtagMessages",
},
Data: map[string]interface{}{
"hashtag": req.Hashtag,
"offset": req.Offset,
"limit": req.Limit,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalFoundMessages(result.Data)
}
type GetSearchedForHashtagsRequest struct {
// Prefix of hashtags to return
Prefix string `json:"prefix"`
// The maximum number of hashtags to be returned
Limit int32 `json:"limit"`
}
// Returns recently searched for hashtags by their prefix
func (client *Client) GetSearchedForHashtags(req *GetSearchedForHashtagsRequest) (*Hashtags, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getSearchedForHashtags",
},
Data: map[string]interface{}{
"prefix": req.Prefix,
"limit": req.Limit,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalHashtags(result.Data)
}
type RemoveSearchedForHashtagRequest struct {
// Hashtag to delete
Hashtag string `json:"hashtag"`
}
// Removes a hashtag from the list of recently searched for hashtags
func (client *Client) RemoveSearchedForHashtag(req *RemoveSearchedForHashtagRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "removeSearchedForHashtag",
},
Data: map[string]interface{}{
"hashtag": req.Hashtag,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
// Clears the list of recently searched for hashtags
func (client *Client) ClearSearchedForHashtags() (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "clearSearchedForHashtags",
},
Data: map[string]interface{}{},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type DeleteAllCallMessagesRequest struct {
// Pass true to delete the messages for all users
Revoke bool `json:"revoke"`
@ -3631,7 +3744,7 @@ type SendMessageAlbumRequest struct {
ReplyTo InputMessageReplyTo `json:"reply_to"`
// Options to be used to send the messages; pass null to use default options
Options *MessageSendOptions `json:"options"`
// Contents of messages to be sent. At most 10 messages can be added to an album
// Contents of messages to be sent. At most 10 messages can be added to an album. All messages must have the same value of show_caption_above_media
InputMessageContents []InputMessageContent `json:"input_message_contents"`
}
@ -4015,7 +4128,7 @@ type EditMessageTextRequest struct {
InputMessageContent InputMessageContent `json:"input_message_content"`
}
// Edits the text of a message (or a text of a game message). Returns the edited message after the edit is completed on the server side
// Edits the text of a message (or a text of a game message). Returns the edited message after the edit is completed on the server side. Can be used only if message.can_be_edited == true
func (client *Client) EditMessageText(req *EditMessageTextRequest) (*Message, error) {
result, err := client.Send(Request{
meta: meta{
@ -4056,7 +4169,7 @@ type EditMessageLiveLocationRequest struct {
ProximityAlertRadius int32 `json:"proximity_alert_radius"`
}
// Edits the message content of a live location. Messages can be edited for a limited period of time specified in the live location. Returns the edited message after the edit is completed on the server side
// Edits the message content of a live location. Messages can be edited for a limited period of time specified in the live location. Returns the edited message after the edit is completed on the server side. Can be used only if message.can_be_edited == true
func (client *Client) EditMessageLiveLocation(req *EditMessageLiveLocationRequest) (*Message, error) {
result, err := client.Send(Request{
meta: meta{
@ -4094,7 +4207,7 @@ type EditMessageMediaRequest struct {
InputMessageContent InputMessageContent `json:"input_message_content"`
}
// Edits the content of a message with an animation, an audio, a document, a photo or a video, including message caption. If only the caption needs to be edited, use editMessageCaption instead. The media can't be edited if the message was set to self-destruct or to a self-destructing media. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa. Returns the edited message after the edit is completed on the server side
// Edits the content of a message with an animation, an audio, a document, a photo or a video, including message caption. If only the caption needs to be edited, use editMessageCaption instead. The media can't be edited if the message was set to self-destruct or to a self-destructing media. The type of message content in an album can't be changed with exception of replacing a photo with a video or vice versa. Returns the edited message after the edit is completed on the server side. Can be used only if message.can_be_edited == true
func (client *Client) EditMessageMedia(req *EditMessageMediaRequest) (*Message, error) {
result, err := client.Send(Request{
meta: meta{
@ -4127,9 +4240,11 @@ type EditMessageCaptionRequest struct {
ReplyMarkup ReplyMarkup `json:"reply_markup"`
// New message content caption; 0-getOption("message_caption_length_max") characters; pass null to remove caption
Caption *FormattedText `json:"caption"`
// Pass true to show the caption above the media; otherwise, caption will be shown below the media. Can be true only for animation, photo, and video messages
ShowCaptionAboveMedia bool `json:"show_caption_above_media"`
}
// Edits the message content caption. Returns the edited message after the edit is completed on the server side
// Edits the message content caption. Returns the edited message after the edit is completed on the server side. Can be used only if message.can_be_edited == true
func (client *Client) EditMessageCaption(req *EditMessageCaptionRequest) (*Message, error) {
result, err := client.Send(Request{
meta: meta{
@ -4140,6 +4255,7 @@ func (client *Client) EditMessageCaption(req *EditMessageCaptionRequest) (*Messa
"message_id": req.MessageId,
"reply_markup": req.ReplyMarkup,
"caption": req.Caption,
"show_caption_above_media": req.ShowCaptionAboveMedia,
},
})
if err != nil {
@ -4162,7 +4278,7 @@ type EditMessageReplyMarkupRequest struct {
ReplyMarkup ReplyMarkup `json:"reply_markup"`
}
// Edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side
// Edits the message reply markup; for bots only. Returns the edited message after the edit is completed on the server side. Can be used only if message.can_be_edited == true
func (client *Client) EditMessageReplyMarkup(req *EditMessageReplyMarkupRequest) (*Message, error) {
result, err := client.Send(Request{
meta: meta{
@ -4297,6 +4413,8 @@ type EditInlineMessageCaptionRequest struct {
ReplyMarkup ReplyMarkup `json:"reply_markup"`
// New message content caption; pass null to remove caption; 0-getOption("message_caption_length_max") characters
Caption *FormattedText `json:"caption"`
// Pass true to show the caption above the media; otherwise, caption will be shown below the media. Can be true only for animation, photo, and video messages
ShowCaptionAboveMedia bool `json:"show_caption_above_media"`
}
// Edits the caption of an inline message sent via a bot; for bots only
@ -4309,6 +4427,7 @@ func (client *Client) EditInlineMessageCaption(req *EditInlineMessageCaptionRequ
"inline_message_id": req.InlineMessageId,
"reply_markup": req.ReplyMarkup,
"caption": req.Caption,
"show_caption_above_media": req.ShowCaptionAboveMedia,
},
})
if err != nil {
@ -4383,6 +4502,38 @@ func (client *Client) EditMessageSchedulingState(req *EditMessageSchedulingState
return UnmarshalOk(result.Data)
}
type SetMessageFactCheckRequest struct {
// The channel chat the message belongs to
ChatId int64 `json:"chat_id"`
// Identifier of the message
MessageId int64 `json:"message_id"`
// New text of the fact-check; 0-getOption("fact_check_length_max") characters; pass null to remove it. Only Bold, Italic, and TextUrl entities with https://t.me/ links are supported
Text *FormattedText `json:"text"`
}
// Changes the fact-check of a message. Can be only used if getOption("can_edit_fact_check") == true
func (client *Client) SetMessageFactCheck(req *SetMessageFactCheckRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "setMessageFactCheck",
},
Data: map[string]interface{}{
"chat_id": req.ChatId,
"message_id": req.MessageId,
"text": req.Text,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type SendBusinessMessageRequest struct {
// Unique identifier of business connection on behalf of which to send the request
BusinessConnectionId string `json:"business_connection_id"`
@ -4394,6 +4545,8 @@ type SendBusinessMessageRequest struct {
DisableNotification bool `json:"disable_notification"`
// Pass true if the content of the message must be protected from forwarding and saving
ProtectContent bool `json:"protect_content"`
// Identifier of the effect to apply to the message
EffectId JsonInt64 `json:"effect_id"`
// Markup for replying to the message; pass null if none
ReplyMarkup ReplyMarkup `json:"reply_markup"`
// The content of the message to be sent
@ -4412,6 +4565,7 @@ func (client *Client) SendBusinessMessage(req *SendBusinessMessageRequest) (*Bus
"reply_to": req.ReplyTo,
"disable_notification": req.DisableNotification,
"protect_content": req.ProtectContent,
"effect_id": req.EffectId,
"reply_markup": req.ReplyMarkup,
"input_message_content": req.InputMessageContent,
},
@ -4438,7 +4592,9 @@ type SendBusinessMessageAlbumRequest struct {
DisableNotification bool `json:"disable_notification"`
// Pass true if the content of the message must be protected from forwarding and saving
ProtectContent bool `json:"protect_content"`
// Contents of messages to be sent. At most 10 messages can be added to an album
// Identifier of the effect to apply to the message
EffectId JsonInt64 `json:"effect_id"`
// Contents of messages to be sent. At most 10 messages can be added to an album. All messages must have the same value of show_caption_above_media
InputMessageContents []InputMessageContent `json:"input_message_contents"`
}
@ -4454,6 +4610,7 @@ func (client *Client) SendBusinessMessageAlbum(req *SendBusinessMessageAlbumRequ
"reply_to": req.ReplyTo,
"disable_notification": req.DisableNotification,
"protect_content": req.ProtectContent,
"effect_id": req.EffectId,
"input_message_contents": req.InputMessageContents,
},
})
@ -4729,7 +4886,7 @@ type AddQuickReplyShortcutMessageAlbumRequest struct {
ShortcutName string `json:"shortcut_name"`
// Identifier of a quick reply message in the same shortcut to be replied; pass 0 if none
ReplyToMessageId int64 `json:"reply_to_message_id"`
// Contents of messages to be sent. At most 10 messages can be added to an album
// Contents of messages to be sent. At most 10 messages can be added to an album. All messages must have the same value of show_caption_above_media
InputMessageContents []InputMessageContent `json:"input_message_contents"`
}
@ -5508,6 +5665,32 @@ func (client *Client) SetSavedMessagesTagLabel(req *SetSavedMessagesTagLabelRequ
return UnmarshalOk(result.Data)
}
type GetMessageEffectRequest struct {
// Unique identifier of the effect
EffectId JsonInt64 `json:"effect_id"`
}
// Returns information about a message effect. Returns a 404 error if the effect is not found
func (client *Client) GetMessageEffect(req *GetMessageEffectRequest) (*MessageEffect, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getMessageEffect",
},
Data: map[string]interface{}{
"effect_id": req.EffectId,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalMessageEffect(result.Data)
}
type SearchQuoteRequest struct {
// Text in which to search for the quote
Text *FormattedText `json:"text"`
@ -5583,7 +5766,7 @@ type ParseTextEntitiesRequest struct {
ParseMode TextParseMode `json:"parse_mode"`
}
// Parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, Code, Pre, PreCode, TextUrl and MentionName entities from a marked-up text. Can be called synchronously
// Parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, ExpandableBlockQuote, Code, Pre, PreCode, TextUrl and MentionName entities from a marked-up text. Can be called synchronously
func ParseTextEntities(req *ParseTextEntitiesRequest) (*FormattedText, error) {
result, err := Execute(Request{
meta: meta{
@ -5606,7 +5789,7 @@ func ParseTextEntities(req *ParseTextEntitiesRequest) (*FormattedText, error) {
}
// deprecated
// Parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, Code, Pre, PreCode, TextUrl and MentionName entities from a marked-up text. Can be called synchronously
// Parses Bold, Italic, Underline, Strikethrough, Spoiler, CustomEmoji, BlockQuote, ExpandableBlockQuote, Code, Pre, PreCode, TextUrl and MentionName entities from a marked-up text. Can be called synchronously
func (client *Client) ParseTextEntities(req *ParseTextEntitiesRequest) (*FormattedText, error) {
return ParseTextEntities(req)}
@ -11515,6 +11698,35 @@ func (client *Client) SearchFileDownloads(req *SearchFileDownloadsRequest) (*Fou
return UnmarshalFoundFileDownloads(result.Data)
}
type SetApplicationVerificationTokenRequest struct {
// Unique identifier for the verification process as received from updateApplicationVerificationRequired
VerificationId int64 `json:"verification_id"`
// Play Integrity API token for the Android application, or secret from push notification for the iOS application; pass an empty string to abort verification and receive error VERIFICATION_FAILED for the request
Token string `json:"token"`
}
// Application verification has been completed. Can be called before authorization
func (client *Client) SetApplicationVerificationToken(req *SetApplicationVerificationTokenRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "setApplicationVerificationToken",
},
Data: map[string]interface{}{
"verification_id": req.VerificationId,
"token": req.Token,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
type GetMessageFileTypeRequest struct {
// Beginning of the message file; up to 100 first lines
MessageFileHead string `json:"message_file_head"`
@ -13592,6 +13804,8 @@ func (client *Client) SuggestUserProfilePhoto(req *SuggestUserProfilePhotoReques
type SearchUserByPhoneNumberRequest struct {
// Phone number to search for
PhoneNumber string `json:"phone_number"`
// Pass true to get only locally available information without sending network requests
OnlyLocal bool `json:"only_local"`
}
// Searches a user by their phone number. Returns a 404 error if the user can't be found
@ -13602,6 +13816,7 @@ func (client *Client) SearchUserByPhoneNumber(req *SearchUserByPhoneNumberReques
},
Data: map[string]interface{}{
"phone_number": req.PhoneNumber,
"only_local": req.OnlyLocal,
},
})
if err != nil {
@ -15307,7 +15522,7 @@ func (client *Client) SendPhoneNumberCode(req *SendPhoneNumberCodeRequest) (*Aut
}
type SendPhoneNumberFirebaseSmsRequest struct {
// SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application
// Play Integrity API or SafetyNet Attestation API token for the Android application, or secret from push notification for the iOS application
Token string `json:"token"`
}
@ -15337,7 +15552,7 @@ type ReportPhoneNumberCodeMissingRequest struct {
MobileNetworkCode string `json:"mobile_network_code"`
}
// Reports that authentication code wasn't delivered via SMS to the specified phone number; for official mobile apps only
// Reports that authentication code wasn't delivered via SMS to the specified phone number; for official mobile applications only
func (client *Client) ReportPhoneNumberCodeMissing(req *ReportPhoneNumberCodeMissingRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
@ -15358,13 +15573,20 @@ func (client *Client) ReportPhoneNumberCodeMissing(req *ReportPhoneNumberCodeMis
return UnmarshalOk(result.Data)
}
type ResendPhoneNumberCodeRequest struct {
// Reason of code resending; pass null if unknown
Reason ResendCodeReason `json:"reason"`
}
// Resends the authentication code sent to a phone number. Works only if the previously received authenticationCodeInfo next_code_type was not null and the server-specified timeout has passed
func (client *Client) ResendPhoneNumberCode() (*AuthenticationCodeInfo, error) {
func (client *Client) ResendPhoneNumberCode(req *ResendPhoneNumberCodeRequest) (*AuthenticationCodeInfo, error) {
result, err := client.Send(Request{
meta: meta{
Type: "resendPhoneNumberCode",
},
Data: map[string]interface{}{},
Data: map[string]interface{}{
"reason": req.Reason,
},
})
if err != nil {
return nil, err
@ -16725,7 +16947,7 @@ func (client *Client) ToggleSupergroupSignMessages(req *ToggleSupergroupSignMess
}
type ToggleSupergroupJoinToSendMessagesRequest struct {
// Identifier of the supergroup
// Identifier of the supergroup that isn't a broadcast group
SupergroupId int64 `json:"supergroup_id"`
// New value of join_to_send_messages
JoinToSendMessages bool `json:"join_to_send_messages"`
@ -16754,7 +16976,7 @@ func (client *Client) ToggleSupergroupJoinToSendMessages(req *ToggleSupergroupJo
}
type ToggleSupergroupJoinByRequestRequest struct {
// Identifier of the channel
// Identifier of the supergroup that isn't a broadcast group
SupergroupId int64 `json:"supergroup_id"`
// New value of join_by_request
JoinByRequest bool `json:"join_by_request"`
@ -17202,7 +17424,7 @@ type SendPaymentFormRequest struct {
OrderInfoId string `json:"order_info_id"`
// Identifier of a chosen shipping option, if applicable
ShippingOptionId string `json:"shipping_option_id"`
// The credentials chosen by user for payment
// The credentials chosen by user for payment; pass null for a payment in Telegram stars
Credentials InputCredentials `json:"credentials"`
// Chosen by the user amount of tip in the smallest units of the currency
TipAmount int64 `json:"tip_amount"`
@ -17346,6 +17568,35 @@ func (client *Client) CreateInvoiceLink(req *CreateInvoiceLinkRequest) (*HttpUrl
return UnmarshalHttpUrl(result.Data)
}
type RefundStarPaymentRequest struct {
// Identifier of the user that did the payment
UserId int64 `json:"user_id"`
// Telegram payment identifier
TelegramPaymentChargeId string `json:"telegram_payment_charge_id"`
}
// Refunds a previously done payment in Telegram Stars
func (client *Client) RefundStarPayment(req *RefundStarPaymentRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "refundStarPayment",
},
Data: map[string]interface{}{
"user_id": req.UserId,
"telegram_payment_charge_id": req.TelegramPaymentChargeId,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalOk(result.Data)
}
// Returns a user that can be contacted to get support
func (client *Client) GetSupportUser() (*User, error) {
result, err := client.Send(Request{
@ -20295,16 +20546,64 @@ func (client *Client) GetPremiumGiveawayInfo(req *GetPremiumGiveawayInfoRequest)
}
}
type CanPurchasePremiumRequest struct {
// Returns available options for Telegram stars purchase
func (client *Client) GetStarPaymentOptions() (*StarPaymentOptions, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getStarPaymentOptions",
},
Data: map[string]interface{}{},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalStarPaymentOptions(result.Data)
}
type GetStarTransactionsRequest struct {
// Offset of the first transaction to return as received from the previous request; use empty string to get the first chunk of results
Offset string `json:"offset"`
// Direction of the transactions to receive; pass null to get all transactions
Direction StarTransactionDirection `json:"direction"`
}
// Returns the list of Telegram star transactions for the current user
func (client *Client) GetStarTransactions(req *GetStarTransactionsRequest) (*StarTransactions, error) {
result, err := client.Send(Request{
meta: meta{
Type: "getStarTransactions",
},
Data: map[string]interface{}{
"offset": req.Offset,
"direction": req.Direction,
},
})
if err != nil {
return nil, err
}
if result.Type == "error" {
return nil, buildResponseError(result.Data)
}
return UnmarshalStarTransactions(result.Data)
}
type CanPurchaseFromStoreRequest struct {
// Transaction purpose
Purpose StorePaymentPurpose `json:"purpose"`
}
// Checks whether Telegram Premium purchase is possible. Must be called before in-store Premium purchase
func (client *Client) CanPurchasePremium(req *CanPurchasePremiumRequest) (*Ok, error) {
// Checks whether an in-store purchase is possible. Must be called before any in-store purchase
func (client *Client) CanPurchaseFromStore(req *CanPurchaseFromStoreRequest) (*Ok, error) {
result, err := client.Send(Request{
meta: meta{
Type: "canPurchasePremium",
Type: "canPurchaseFromStore",
},
Data: map[string]interface{}{
"purpose": req.Purpose,
@ -21666,6 +21965,9 @@ func (client *Client) TestUseUpdate() (Update, error) {
case TypeUpdateMessageUnreadReactions:
return UnmarshalUpdateMessageUnreadReactions(result.Data)
case TypeUpdateMessageFactCheck:
return UnmarshalUpdateMessageFactCheck(result.Data)
case TypeUpdateMessageLiveLocationViewed:
return UnmarshalUpdateMessageLiveLocationViewed(result.Data)
@ -21867,6 +22169,9 @@ func (client *Client) TestUseUpdate() (Update, error) {
case TypeUpdateFileRemovedFromDownloads:
return UnmarshalUpdateFileRemovedFromDownloads(result.Data)
case TypeUpdateApplicationVerificationRequired:
return UnmarshalUpdateApplicationVerificationRequired(result.Data)
case TypeUpdateCall:
return UnmarshalUpdateCall(result.Data)
@ -21969,12 +22274,18 @@ func (client *Client) TestUseUpdate() (Update, error) {
case TypeUpdateActiveEmojiReactions:
return UnmarshalUpdateActiveEmojiReactions(result.Data)
case TypeUpdateAvailableMessageEffects:
return UnmarshalUpdateAvailableMessageEffects(result.Data)
case TypeUpdateDefaultReactionType:
return UnmarshalUpdateDefaultReactionType(result.Data)
case TypeUpdateSavedMessagesTags:
return UnmarshalUpdateSavedMessagesTags(result.Data)
case TypeUpdateOwnedStarCount:
return UnmarshalUpdateOwnedStarCount(result.Data)
case TypeUpdateChatRevenueAmount:
return UnmarshalUpdateChatRevenueAmount(result.Data)

File diff suppressed because it is too large Load diff

View file

@ -625,6 +625,86 @@ func UnmarshalListOfInputChatPhoto(dataList []json.RawMessage) ([]InputChatPhoto
return list, nil
}
func UnmarshalStarTransactionDirection(data json.RawMessage) (StarTransactionDirection, error) {
var meta meta
err := json.Unmarshal(data, &meta)
if err != nil {
return nil, err
}
switch meta.Type {
case TypeStarTransactionDirectionIncoming:
return UnmarshalStarTransactionDirectionIncoming(data)
case TypeStarTransactionDirectionOutgoing:
return UnmarshalStarTransactionDirectionOutgoing(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
}
func UnmarshalListOfStarTransactionDirection(dataList []json.RawMessage) ([]StarTransactionDirection, error) {
list := []StarTransactionDirection{}
for _, data := range dataList {
entity, err := UnmarshalStarTransactionDirection(data)
if err != nil {
return nil, err
}
list = append(list, entity)
}
return list, nil
}
func UnmarshalStarTransactionSource(data json.RawMessage) (StarTransactionSource, error) {
var meta meta
err := json.Unmarshal(data, &meta)
if err != nil {
return nil, err
}
switch meta.Type {
case TypeStarTransactionSourceTelegram:
return UnmarshalStarTransactionSourceTelegram(data)
case TypeStarTransactionSourceAppStore:
return UnmarshalStarTransactionSourceAppStore(data)
case TypeStarTransactionSourceGooglePlay:
return UnmarshalStarTransactionSourceGooglePlay(data)
case TypeStarTransactionSourceFragment:
return UnmarshalStarTransactionSourceFragment(data)
case TypeStarTransactionSourceUser:
return UnmarshalStarTransactionSourceUser(data)
case TypeStarTransactionSourceUnsupported:
return UnmarshalStarTransactionSourceUnsupported(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
}
func UnmarshalListOfStarTransactionSource(dataList []json.RawMessage) ([]StarTransactionSource, error) {
list := []StarTransactionSource{}
for _, data := range dataList {
entity, err := UnmarshalStarTransactionSource(data)
if err != nil {
return nil, err
}
list = append(list, entity)
}
return list, nil
}
func UnmarshalPremiumGiveawayParticipantStatus(data json.RawMessage) (PremiumGiveawayParticipantStatus, error) {
var meta meta
@ -1074,6 +1154,40 @@ func UnmarshalListOfReactionType(dataList []json.RawMessage) ([]ReactionType, er
return list, nil
}
func UnmarshalMessageEffectType(data json.RawMessage) (MessageEffectType, error) {
var meta meta
err := json.Unmarshal(data, &meta)
if err != nil {
return nil, err
}
switch meta.Type {
case TypeMessageEffectTypeEmojiReaction:
return UnmarshalMessageEffectTypeEmojiReaction(data)
case TypeMessageEffectTypePremiumSticker:
return UnmarshalMessageEffectTypePremiumSticker(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
}
func UnmarshalListOfMessageEffectType(dataList []json.RawMessage) ([]MessageEffectType, error) {
list := []MessageEffectType{}
for _, data := range dataList {
entity, err := UnmarshalMessageEffectType(data)
if err != nil {
return nil, err
}
list = append(list, entity)
}
return list, nil
}
func UnmarshalMessageSendingState(data json.RawMessage) (MessageSendingState, error) {
var meta meta
@ -2173,6 +2287,74 @@ func UnmarshalListOfPaymentProvider(dataList []json.RawMessage) ([]PaymentProvid
return list, nil
}
func UnmarshalPaymentFormType(data json.RawMessage) (PaymentFormType, error) {
var meta meta
err := json.Unmarshal(data, &meta)
if err != nil {
return nil, err
}
switch meta.Type {
case TypePaymentFormTypeRegular:
return UnmarshalPaymentFormTypeRegular(data)
case TypePaymentFormTypeStars:
return UnmarshalPaymentFormTypeStars(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
}
func UnmarshalListOfPaymentFormType(dataList []json.RawMessage) ([]PaymentFormType, error) {
list := []PaymentFormType{}
for _, data := range dataList {
entity, err := UnmarshalPaymentFormType(data)
if err != nil {
return nil, err
}
list = append(list, entity)
}
return list, nil
}
func UnmarshalPaymentReceiptType(data json.RawMessage) (PaymentReceiptType, error) {
var meta meta
err := json.Unmarshal(data, &meta)
if err != nil {
return nil, err
}
switch meta.Type {
case TypePaymentReceiptTypeRegular:
return UnmarshalPaymentReceiptTypeRegular(data)
case TypePaymentReceiptTypeStars:
return UnmarshalPaymentReceiptTypeStars(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
}
func UnmarshalListOfPaymentReceiptType(dataList []json.RawMessage) ([]PaymentReceiptType, error) {
list := []PaymentReceiptType{}
for _, data := range dataList {
entity, err := UnmarshalPaymentReceiptType(data)
if err != nil {
return nil, err
}
list = append(list, entity)
}
return list, nil
}
func UnmarshalInputInvoice(data json.RawMessage) (InputInvoice, error) {
var meta meta
@ -2856,6 +3038,9 @@ func UnmarshalTextEntityType(data json.RawMessage) (TextEntityType, error) {
case TypeTextEntityTypeBlockQuote:
return UnmarshalTextEntityTypeBlockQuote(data)
case TypeTextEntityTypeExpandableBlockQuote:
return UnmarshalTextEntityTypeExpandableBlockQuote(data)
case TypeTextEntityTypeTextUrl:
return UnmarshalTextEntityTypeTextUrl(data)
@ -3639,6 +3824,40 @@ func UnmarshalListOfChatBoostSource(dataList []json.RawMessage) ([]ChatBoostSour
return list, nil
}
func UnmarshalResendCodeReason(data json.RawMessage) (ResendCodeReason, error) {
var meta meta
err := json.Unmarshal(data, &meta)
if err != nil {
return nil, err
}
switch meta.Type {
case TypeResendCodeReasonUserRequest:
return UnmarshalResendCodeReasonUserRequest(data)
case TypeResendCodeReasonVerificationFailed:
return UnmarshalResendCodeReasonVerificationFailed(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
}
func UnmarshalListOfResendCodeReason(dataList []json.RawMessage) ([]ResendCodeReason, error) {
list := []ResendCodeReason{}
for _, data := range dataList {
entity, err := UnmarshalResendCodeReason(data)
if err != nil {
return nil, err
}
list = append(list, entity)
}
return list, nil
}
func UnmarshalCallDiscardReason(data json.RawMessage) (CallDiscardReason, error) {
var meta meta
@ -4803,6 +5022,9 @@ func UnmarshalStorePaymentPurpose(data json.RawMessage) (StorePaymentPurpose, er
case TypeStorePaymentPurposePremiumGiveaway:
return UnmarshalStorePaymentPurposePremiumGiveaway(data)
case TypeStorePaymentPurposeStars:
return UnmarshalStorePaymentPurposeStars(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
@ -4837,6 +5059,9 @@ func UnmarshalTelegramPaymentPurpose(data json.RawMessage) (TelegramPaymentPurpo
case TypeTelegramPaymentPurposePremiumGiveaway:
return UnmarshalTelegramPaymentPurposePremiumGiveaway(data)
case TypeTelegramPaymentPurposeStars:
return UnmarshalTelegramPaymentPurposeStars(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
@ -6947,6 +7172,9 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateMessageUnreadReactions:
return UnmarshalUpdateMessageUnreadReactions(data)
case TypeUpdateMessageFactCheck:
return UnmarshalUpdateMessageFactCheck(data)
case TypeUpdateMessageLiveLocationViewed:
return UnmarshalUpdateMessageLiveLocationViewed(data)
@ -7148,6 +7376,9 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateFileRemovedFromDownloads:
return UnmarshalUpdateFileRemovedFromDownloads(data)
case TypeUpdateApplicationVerificationRequired:
return UnmarshalUpdateApplicationVerificationRequired(data)
case TypeUpdateCall:
return UnmarshalUpdateCall(data)
@ -7250,12 +7481,18 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateActiveEmojiReactions:
return UnmarshalUpdateActiveEmojiReactions(data)
case TypeUpdateAvailableMessageEffects:
return UnmarshalUpdateAvailableMessageEffects(data)
case TypeUpdateDefaultReactionType:
return UnmarshalUpdateDefaultReactionType(data)
case TypeUpdateSavedMessagesTags:
return UnmarshalUpdateSavedMessagesTags(data)
case TypeUpdateOwnedStarCount:
return UnmarshalUpdateOwnedStarCount(data)
case TypeUpdateChatRevenueAmount:
return UnmarshalUpdateChatRevenueAmount(data)
@ -8452,6 +8689,14 @@ func UnmarshalChatAdministratorRights(data json.RawMessage) (*ChatAdministratorR
return &resp, err
}
func UnmarshalProductInfo(data json.RawMessage) (*ProductInfo, error) {
var resp ProductInfo
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPremiumPaymentOption(data json.RawMessage) (*PremiumPaymentOption, error) {
var resp PremiumPaymentOption
@ -8492,6 +8737,102 @@ func UnmarshalPremiumGiftCodeInfo(data json.RawMessage) (*PremiumGiftCodeInfo, e
return &resp, err
}
func UnmarshalStarPaymentOption(data json.RawMessage) (*StarPaymentOption, error) {
var resp StarPaymentOption
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStarPaymentOptions(data json.RawMessage) (*StarPaymentOptions, error) {
var resp StarPaymentOptions
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStarTransactionDirectionIncoming(data json.RawMessage) (*StarTransactionDirectionIncoming, error) {
var resp StarTransactionDirectionIncoming
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStarTransactionDirectionOutgoing(data json.RawMessage) (*StarTransactionDirectionOutgoing, error) {
var resp StarTransactionDirectionOutgoing
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStarTransactionSourceTelegram(data json.RawMessage) (*StarTransactionSourceTelegram, error) {
var resp StarTransactionSourceTelegram
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStarTransactionSourceAppStore(data json.RawMessage) (*StarTransactionSourceAppStore, error) {
var resp StarTransactionSourceAppStore
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStarTransactionSourceGooglePlay(data json.RawMessage) (*StarTransactionSourceGooglePlay, error) {
var resp StarTransactionSourceGooglePlay
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStarTransactionSourceFragment(data json.RawMessage) (*StarTransactionSourceFragment, error) {
var resp StarTransactionSourceFragment
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStarTransactionSourceUser(data json.RawMessage) (*StarTransactionSourceUser, error) {
var resp StarTransactionSourceUser
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStarTransactionSourceUnsupported(data json.RawMessage) (*StarTransactionSourceUnsupported, error) {
var resp StarTransactionSourceUnsupported
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStarTransaction(data json.RawMessage) (*StarTransaction, error) {
var resp StarTransaction
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalStarTransactions(data json.RawMessage) (*StarTransactions, error) {
var resp StarTransactions
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPremiumGiveawayParticipantStatusEligible(data json.RawMessage) (*PremiumGiveawayParticipantStatusEligible, error) {
var resp PremiumGiveawayParticipantStatusEligible
@ -9204,6 +9545,30 @@ func UnmarshalUnreadReaction(data json.RawMessage) (*UnreadReaction, error) {
return &resp, err
}
func UnmarshalMessageEffectTypeEmojiReaction(data json.RawMessage) (*MessageEffectTypeEmojiReaction, error) {
var resp MessageEffectTypeEmojiReaction
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalMessageEffectTypePremiumSticker(data json.RawMessage) (*MessageEffectTypePremiumSticker, error) {
var resp MessageEffectTypePremiumSticker
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalMessageEffect(data json.RawMessage) (*MessageEffect, error) {
var resp MessageEffect
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalMessageSendingStatePending(data json.RawMessage) (*MessageSendingStatePending, error) {
var resp MessageSendingStatePending
@ -9268,6 +9633,14 @@ func UnmarshalInputMessageReplyToStory(data json.RawMessage) (*InputMessageReply
return &resp, err
}
func UnmarshalFactCheck(data json.RawMessage) (*FactCheck, error) {
var resp FactCheck
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalMessage(data json.RawMessage) (*Message, error) {
var resp Message
@ -10892,6 +11265,22 @@ func UnmarshalPaymentOption(data json.RawMessage) (*PaymentOption, error) {
return &resp, err
}
func UnmarshalPaymentFormTypeRegular(data json.RawMessage) (*PaymentFormTypeRegular, error) {
var resp PaymentFormTypeRegular
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPaymentFormTypeStars(data json.RawMessage) (*PaymentFormTypeStars, error) {
var resp PaymentFormTypeStars
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPaymentForm(data json.RawMessage) (*PaymentForm, error) {
var resp PaymentForm
@ -10916,6 +11305,22 @@ func UnmarshalPaymentResult(data json.RawMessage) (*PaymentResult, error) {
return &resp, err
}
func UnmarshalPaymentReceiptTypeRegular(data json.RawMessage) (*PaymentReceiptTypeRegular, error) {
var resp PaymentReceiptTypeRegular
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPaymentReceiptTypeStars(data json.RawMessage) (*PaymentReceiptTypeStars, error) {
var resp PaymentReceiptTypeStars
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPaymentReceipt(data json.RawMessage) (*PaymentReceipt, error) {
var resp PaymentReceipt
@ -12260,6 +12665,14 @@ func UnmarshalTextEntityTypeBlockQuote(data json.RawMessage) (*TextEntityTypeBlo
return &resp, err
}
func UnmarshalTextEntityTypeExpandableBlockQuote(data json.RawMessage) (*TextEntityTypeExpandableBlockQuote, error) {
var resp TextEntityTypeExpandableBlockQuote
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalTextEntityTypeTextUrl(data json.RawMessage) (*TextEntityTypeTextUrl, error) {
var resp TextEntityTypeTextUrl
@ -13340,6 +13753,22 @@ func UnmarshalChatBoostSlots(data json.RawMessage) (*ChatBoostSlots, error) {
return &resp, err
}
func UnmarshalResendCodeReasonUserRequest(data json.RawMessage) (*ResendCodeReasonUserRequest, error) {
var resp ResendCodeReasonUserRequest
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalResendCodeReasonVerificationFailed(data json.RawMessage) (*ResendCodeReasonVerificationFailed, error) {
var resp ResendCodeReasonVerificationFailed
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalCallDiscardReasonEmpty(data json.RawMessage) (*CallDiscardReasonEmpty, error) {
var resp CallDiscardReasonEmpty
@ -15220,6 +15649,14 @@ func UnmarshalStorePaymentPurposePremiumGiveaway(data json.RawMessage) (*StorePa
return &resp, err
}
func UnmarshalStorePaymentPurposeStars(data json.RawMessage) (*StorePaymentPurposeStars, error) {
var resp StorePaymentPurposeStars
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalTelegramPaymentPurposePremiumGiftCodes(data json.RawMessage) (*TelegramPaymentPurposePremiumGiftCodes, error) {
var resp TelegramPaymentPurposePremiumGiftCodes
@ -15236,6 +15673,14 @@ func UnmarshalTelegramPaymentPurposePremiumGiveaway(data json.RawMessage) (*Tele
return &resp, err
}
func UnmarshalTelegramPaymentPurposeStars(data json.RawMessage) (*TelegramPaymentPurposeStars, error) {
var resp TelegramPaymentPurposeStars
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalDeviceTokenFirebaseCloudMessaging(data json.RawMessage) (*DeviceTokenFirebaseCloudMessaging, error) {
var resp DeviceTokenFirebaseCloudMessaging
@ -18148,6 +18593,14 @@ func UnmarshalUpdateMessageUnreadReactions(data json.RawMessage) (*UpdateMessage
return &resp, err
}
func UnmarshalUpdateMessageFactCheck(data json.RawMessage) (*UpdateMessageFactCheck, error) {
var resp UpdateMessageFactCheck
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateMessageLiveLocationViewed(data json.RawMessage) (*UpdateMessageLiveLocationViewed, error) {
var resp UpdateMessageLiveLocationViewed
@ -18684,6 +19137,14 @@ func UnmarshalUpdateFileRemovedFromDownloads(data json.RawMessage) (*UpdateFileR
return &resp, err
}
func UnmarshalUpdateApplicationVerificationRequired(data json.RawMessage) (*UpdateApplicationVerificationRequired, error) {
var resp UpdateApplicationVerificationRequired
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateCall(data json.RawMessage) (*UpdateCall, error) {
var resp UpdateCall
@ -18956,6 +19417,14 @@ func UnmarshalUpdateActiveEmojiReactions(data json.RawMessage) (*UpdateActiveEmo
return &resp, err
}
func UnmarshalUpdateAvailableMessageEffects(data json.RawMessage) (*UpdateAvailableMessageEffects, error) {
var resp UpdateAvailableMessageEffects
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateDefaultReactionType(data json.RawMessage) (*UpdateDefaultReactionType, error) {
var resp UpdateDefaultReactionType
@ -18972,6 +19441,14 @@ func UnmarshalUpdateSavedMessagesTags(data json.RawMessage) (*UpdateSavedMessage
return &resp, err
}
func UnmarshalUpdateOwnedStarCount(data json.RawMessage) (*UpdateOwnedStarCount, error) {
var resp UpdateOwnedStarCount
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateChatRevenueAmount(data json.RawMessage) (*UpdateChatRevenueAmount, error) {
var resp UpdateChatRevenueAmount
@ -19713,6 +20190,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeChatAdministratorRights:
return UnmarshalChatAdministratorRights(data)
case TypeProductInfo:
return UnmarshalProductInfo(data)
case TypePremiumPaymentOption:
return UnmarshalPremiumPaymentOption(data)
@ -19728,6 +20208,42 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypePremiumGiftCodeInfo:
return UnmarshalPremiumGiftCodeInfo(data)
case TypeStarPaymentOption:
return UnmarshalStarPaymentOption(data)
case TypeStarPaymentOptions:
return UnmarshalStarPaymentOptions(data)
case TypeStarTransactionDirectionIncoming:
return UnmarshalStarTransactionDirectionIncoming(data)
case TypeStarTransactionDirectionOutgoing:
return UnmarshalStarTransactionDirectionOutgoing(data)
case TypeStarTransactionSourceTelegram:
return UnmarshalStarTransactionSourceTelegram(data)
case TypeStarTransactionSourceAppStore:
return UnmarshalStarTransactionSourceAppStore(data)
case TypeStarTransactionSourceGooglePlay:
return UnmarshalStarTransactionSourceGooglePlay(data)
case TypeStarTransactionSourceFragment:
return UnmarshalStarTransactionSourceFragment(data)
case TypeStarTransactionSourceUser:
return UnmarshalStarTransactionSourceUser(data)
case TypeStarTransactionSourceUnsupported:
return UnmarshalStarTransactionSourceUnsupported(data)
case TypeStarTransaction:
return UnmarshalStarTransaction(data)
case TypeStarTransactions:
return UnmarshalStarTransactions(data)
case TypePremiumGiveawayParticipantStatusEligible:
return UnmarshalPremiumGiveawayParticipantStatusEligible(data)
@ -19995,6 +20511,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUnreadReaction:
return UnmarshalUnreadReaction(data)
case TypeMessageEffectTypeEmojiReaction:
return UnmarshalMessageEffectTypeEmojiReaction(data)
case TypeMessageEffectTypePremiumSticker:
return UnmarshalMessageEffectTypePremiumSticker(data)
case TypeMessageEffect:
return UnmarshalMessageEffect(data)
case TypeMessageSendingStatePending:
return UnmarshalMessageSendingStatePending(data)
@ -20019,6 +20544,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeInputMessageReplyToStory:
return UnmarshalInputMessageReplyToStory(data)
case TypeFactCheck:
return UnmarshalFactCheck(data)
case TypeMessage:
return UnmarshalMessage(data)
@ -20628,6 +21156,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypePaymentOption:
return UnmarshalPaymentOption(data)
case TypePaymentFormTypeRegular:
return UnmarshalPaymentFormTypeRegular(data)
case TypePaymentFormTypeStars:
return UnmarshalPaymentFormTypeStars(data)
case TypePaymentForm:
return UnmarshalPaymentForm(data)
@ -20637,6 +21171,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypePaymentResult:
return UnmarshalPaymentResult(data)
case TypePaymentReceiptTypeRegular:
return UnmarshalPaymentReceiptTypeRegular(data)
case TypePaymentReceiptTypeStars:
return UnmarshalPaymentReceiptTypeStars(data)
case TypePaymentReceipt:
return UnmarshalPaymentReceipt(data)
@ -21141,6 +21681,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeTextEntityTypeBlockQuote:
return UnmarshalTextEntityTypeBlockQuote(data)
case TypeTextEntityTypeExpandableBlockQuote:
return UnmarshalTextEntityTypeExpandableBlockQuote(data)
case TypeTextEntityTypeTextUrl:
return UnmarshalTextEntityTypeTextUrl(data)
@ -21546,6 +22089,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeChatBoostSlots:
return UnmarshalChatBoostSlots(data)
case TypeResendCodeReasonUserRequest:
return UnmarshalResendCodeReasonUserRequest(data)
case TypeResendCodeReasonVerificationFailed:
return UnmarshalResendCodeReasonVerificationFailed(data)
case TypeCallDiscardReasonEmpty:
return UnmarshalCallDiscardReasonEmpty(data)
@ -22251,12 +22800,18 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeStorePaymentPurposePremiumGiveaway:
return UnmarshalStorePaymentPurposePremiumGiveaway(data)
case TypeStorePaymentPurposeStars:
return UnmarshalStorePaymentPurposeStars(data)
case TypeTelegramPaymentPurposePremiumGiftCodes:
return UnmarshalTelegramPaymentPurposePremiumGiftCodes(data)
case TypeTelegramPaymentPurposePremiumGiveaway:
return UnmarshalTelegramPaymentPurposePremiumGiveaway(data)
case TypeTelegramPaymentPurposeStars:
return UnmarshalTelegramPaymentPurposeStars(data)
case TypeDeviceTokenFirebaseCloudMessaging:
return UnmarshalDeviceTokenFirebaseCloudMessaging(data)
@ -23349,6 +23904,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateMessageUnreadReactions:
return UnmarshalUpdateMessageUnreadReactions(data)
case TypeUpdateMessageFactCheck:
return UnmarshalUpdateMessageFactCheck(data)
case TypeUpdateMessageLiveLocationViewed:
return UnmarshalUpdateMessageLiveLocationViewed(data)
@ -23550,6 +24108,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateFileRemovedFromDownloads:
return UnmarshalUpdateFileRemovedFromDownloads(data)
case TypeUpdateApplicationVerificationRequired:
return UnmarshalUpdateApplicationVerificationRequired(data)
case TypeUpdateCall:
return UnmarshalUpdateCall(data)
@ -23652,12 +24213,18 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateActiveEmojiReactions:
return UnmarshalUpdateActiveEmojiReactions(data)
case TypeUpdateAvailableMessageEffects:
return UnmarshalUpdateAvailableMessageEffects(data)
case TypeUpdateDefaultReactionType:
return UnmarshalUpdateDefaultReactionType(data)
case TypeUpdateSavedMessagesTags:
return UnmarshalUpdateSavedMessagesTags(data)
case TypeUpdateOwnedStarCount:
return UnmarshalUpdateOwnedStarCount(data)
case TypeUpdateChatRevenueAmount:
return UnmarshalUpdateChatRevenueAmount(data)