mirror of
https://github.com/c0re100/gotdlib.git
synced 2026-02-21 20:20:17 +01:00
Update to TDLib 1.8.42
This commit is contained in:
parent
58adcc4804
commit
626ffe1a7b
4 changed files with 1854 additions and 195 deletions
|
|
@ -2696,8 +2696,6 @@ func (client *Client) SearchChatMessages(req *SearchChatMessagesRequest) (*Found
|
|||
type SearchMessagesRequest struct {
|
||||
// Chat list in which to search messages; pass null to search in all chats regardless of their chat list. Only Main and Archive chat lists are supported
|
||||
ChatList ChatList `json:"chat_list"`
|
||||
// Pass true to search only for messages in channels
|
||||
OnlyInChannels bool `json:"only_in_channels"`
|
||||
// Query to search for
|
||||
Query string `json:"query"`
|
||||
// Offset of the first entry to return as received from the previous request; use empty string to get the first chunk of results
|
||||
|
|
@ -2706,6 +2704,8 @@ type SearchMessagesRequest struct {
|
|||
Limit int32 `json:"limit"`
|
||||
// Additional filter for messages to search; pass null to search for all messages. Filters searchMessagesFilterMention, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, searchMessagesFilterFailedToSend, and searchMessagesFilterPinned are unsupported in this function
|
||||
Filter SearchMessagesFilter `json:"filter"`
|
||||
// Additional filter for type of the chat of the searched messages; pass null to search for messages in all chats
|
||||
ChatTypeFilter SearchMessagesChatTypeFilter `json:"chat_type_filter"`
|
||||
// If not 0, the minimum date of the messages to return
|
||||
MinDate int32 `json:"min_date"`
|
||||
// If not 0, the maximum date of the messages to return
|
||||
|
|
@ -2720,11 +2720,11 @@ func (client *Client) SearchMessages(req *SearchMessagesRequest) (*FoundMessages
|
|||
},
|
||||
Data: map[string]interface{}{
|
||||
"chat_list": req.ChatList,
|
||||
"only_in_channels": req.OnlyInChannels,
|
||||
"query": req.Query,
|
||||
"offset": req.Offset,
|
||||
"limit": req.Limit,
|
||||
"filter": req.Filter,
|
||||
"chat_type_filter": req.ChatTypeFilter,
|
||||
"min_date": req.MinDate,
|
||||
"max_date": req.MaxDate,
|
||||
},
|
||||
|
|
@ -13120,6 +13120,8 @@ type CreateCallRequest struct {
|
|||
Protocol *CallProtocol `json:"protocol"`
|
||||
// Pass true to create a video call
|
||||
IsVideo bool `json:"is_video"`
|
||||
// Identifier of the group call to which the user will be added after exchanging private key via the call; pass 0 if none; currently, ignored
|
||||
GroupCallId int32 `json:"group_call_id"`
|
||||
}
|
||||
|
||||
// Creates a new call
|
||||
|
|
@ -13132,6 +13134,7 @@ func (client *Client) CreateCall(req *CreateCallRequest) (*CallId, error) {
|
|||
"user_id": req.UserId,
|
||||
"protocol": req.Protocol,
|
||||
"is_video": req.IsVideo,
|
||||
"group_call_id": req.GroupCallId,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
|
@ -13424,6 +13427,32 @@ func (client *Client) CreateVideoChat(req *CreateVideoChatRequest) (*GroupCallId
|
|||
return UnmarshalGroupCallId(result.Data)
|
||||
}
|
||||
|
||||
type CreateGroupCallRequest struct {
|
||||
// Call identifier
|
||||
CallId int32 `json:"call_id"`
|
||||
}
|
||||
|
||||
// Creates a group call from a one-to-one call
|
||||
func (client *Client) CreateGroupCall(req *CreateGroupCallRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "createGroupCall",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"call_id": req.CallId,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type GetVideoChatRtmpUrlRequest struct {
|
||||
// Chat identifier
|
||||
ChatId int64 `json:"chat_id"`
|
||||
|
|
@ -17596,6 +17625,67 @@ func (client *Client) GetBotInfoShortDescription(req *GetBotInfoShortDescription
|
|||
return UnmarshalText(result.Data)
|
||||
}
|
||||
|
||||
type SetMessageSenderBotVerificationRequest struct {
|
||||
// Identifier of the owned bot, which will verify the user or the chat
|
||||
BotUserId int64 `json:"bot_user_id"`
|
||||
// Identifier of the user or the supergroup or channel chat, which will be verified by the bot
|
||||
VerifiedId MessageSender `json:"verified_id"`
|
||||
// Custom description of verification reason; 0-getOption("bot_verification_custom_description_length_max"). If empty, then "was verified by organization "organization_name"" will be used as description. Can be specified only if the bot is allowed to provide custom description
|
||||
CustomDescription string `json:"custom_description"`
|
||||
}
|
||||
|
||||
// Changes the verification status of a user or a chat by an owned bot
|
||||
func (client *Client) SetMessageSenderBotVerification(req *SetMessageSenderBotVerificationRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "setMessageSenderBotVerification",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"bot_user_id": req.BotUserId,
|
||||
"verified_id": req.VerifiedId,
|
||||
"custom_description": req.CustomDescription,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type RemoveMessageSenderBotVerificationRequest struct {
|
||||
// Identifier of the owned bot, which verified the user or the chat
|
||||
BotUserId int64 `json:"bot_user_id"`
|
||||
// Identifier of the user or the supergroup or channel chat, which verification is removed
|
||||
VerifiedId MessageSender `json:"verified_id"`
|
||||
}
|
||||
|
||||
// Removes the verification status of a user or a chat by an owned bot
|
||||
func (client *Client) RemoveMessageSenderBotVerification(req *RemoveMessageSenderBotVerificationRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "removeMessageSenderBotVerification",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"bot_user_id": req.BotUserId,
|
||||
"verified_id": req.VerifiedId,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
// Returns all active sessions of the current user
|
||||
func (client *Client) GetActiveSessions() (*Sessions, error) {
|
||||
result, err := client.Send(Request{
|
||||
|
|
@ -18693,6 +18783,8 @@ type SendGiftRequest struct {
|
|||
Text *FormattedText `json:"text"`
|
||||
// Pass true to show the current user as sender and gift text only to the gift receiver; otherwise, everyone will be able to see them
|
||||
IsPrivate bool `json:"is_private"`
|
||||
// Pass true to additionally pay for the gift upgrade and allow the receiver to upgrade it for free
|
||||
PayForUpgrade bool `json:"pay_for_upgrade"`
|
||||
}
|
||||
|
||||
// Sends a gift to another user. May return an error with a message "STARGIFT_USAGE_LIMITED" if the gift was sold out
|
||||
|
|
@ -18706,6 +18798,7 @@ func (client *Client) SendGift(req *SendGiftRequest) (*Ok, error) {
|
|||
"user_id": req.UserId,
|
||||
"text": req.Text,
|
||||
"is_private": req.IsPrivate,
|
||||
"pay_for_upgrade": req.PayForUpgrade,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
|
@ -18780,6 +18873,99 @@ func (client *Client) ToggleGiftIsSaved(req *ToggleGiftIsSavedRequest) (*Ok, err
|
|||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type GetGiftUpgradePreviewRequest struct {
|
||||
// Identifier of the gift
|
||||
GiftId JsonInt64 `json:"gift_id"`
|
||||
}
|
||||
|
||||
// Returns examples of possible upgraded gifts for a regular gift
|
||||
func (client *Client) GetGiftUpgradePreview(req *GetGiftUpgradePreviewRequest) (*GiftUpgradePreview, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getGiftUpgradePreview",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"gift_id": req.GiftId,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalGiftUpgradePreview(result.Data)
|
||||
}
|
||||
|
||||
type UpgradeGiftRequest struct {
|
||||
// Identifier of the user that sent the gift
|
||||
SenderUserId int64 `json:"sender_user_id"`
|
||||
// Identifier of the message with the gift in the chat with the user
|
||||
MessageId int64 `json:"message_id"`
|
||||
// Pass true to keep the original gift text, sender and receiver in the upgraded gift
|
||||
KeepOriginalDetails bool `json:"keep_original_details"`
|
||||
}
|
||||
|
||||
// Upgrades a gift received by the current user. Unless the gift has prepaid_upgrade_star_count > 0, the user must pay gift.upgrade_star_count Telegram Stars for the upgrade
|
||||
func (client *Client) UpgradeGift(req *UpgradeGiftRequest) (*UpgradeGiftResult, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "upgradeGift",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"sender_user_id": req.SenderUserId,
|
||||
"message_id": req.MessageId,
|
||||
"keep_original_details": req.KeepOriginalDetails,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalUpgradeGiftResult(result.Data)
|
||||
}
|
||||
|
||||
type TransferGiftRequest struct {
|
||||
// Identifier of the user that sent the gift
|
||||
SenderUserId int64 `json:"sender_user_id"`
|
||||
// Identifier of the message with the upgraded gift in the chat with the user
|
||||
MessageId int64 `json:"message_id"`
|
||||
// Identifier of the user that will receive the gift
|
||||
ReceiverUserId int64 `json:"receiver_user_id"`
|
||||
// The amount of Telegram Stars required for the transfer
|
||||
StarCount int64 `json:"star_count"`
|
||||
}
|
||||
|
||||
// Sends a gift upgraded by the current user to another user
|
||||
func (client *Client) TransferGift(req *TransferGiftRequest) (*Ok, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "transferGift",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"sender_user_id": req.SenderUserId,
|
||||
"message_id": req.MessageId,
|
||||
"receiver_user_id": req.ReceiverUserId,
|
||||
"star_count": req.StarCount,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalOk(result.Data)
|
||||
}
|
||||
|
||||
type GetUserGiftsRequest struct {
|
||||
// Identifier of the user
|
||||
UserId int64 `json:"user_id"`
|
||||
|
|
@ -18812,6 +18998,32 @@ func (client *Client) GetUserGifts(req *GetUserGiftsRequest) (*UserGifts, error)
|
|||
return UnmarshalUserGifts(result.Data)
|
||||
}
|
||||
|
||||
type GetUserGiftRequest struct {
|
||||
// Identifier of the message with the gift
|
||||
MessageId int64 `json:"message_id"`
|
||||
}
|
||||
|
||||
// Returns information about a gift received or sent by the current user
|
||||
func (client *Client) GetUserGift(req *GetUserGiftRequest) (*UserGift, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getUserGift",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"message_id": req.MessageId,
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if result.Type == "error" {
|
||||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalUserGift(result.Data)
|
||||
}
|
||||
|
||||
type CreateInvoiceLinkRequest struct {
|
||||
// Unique identifier of business connection on behalf of which to send the request
|
||||
BusinessConnectionId string `json:"business_connection_id"`
|
||||
|
|
@ -22320,8 +22532,8 @@ func (client *Client) SearchChatAffiliateProgram(req *SearchChatAffiliateProgram
|
|||
}
|
||||
|
||||
type SearchAffiliateProgramsRequest struct {
|
||||
// Identifier of the chat for which affiliate programs are searched for. Can be an identifier of the Saved Messages chat, of a chat with an owned bot, or of a channel chat with can_post_messages administrator right
|
||||
ChatId int64 `json:"chat_id"`
|
||||
// The affiliate for which affiliate programs are searched for
|
||||
Affiliate AffiliateType `json:"affiliate"`
|
||||
// Sort order for the results
|
||||
SortOrder AffiliateProgramSortOrder `json:"sort_order"`
|
||||
// Offset of the first affiliate program to return as received from the previous request; use empty string to get the first chunk of results
|
||||
|
|
@ -22330,14 +22542,14 @@ type SearchAffiliateProgramsRequest struct {
|
|||
Limit int32 `json:"limit"`
|
||||
}
|
||||
|
||||
// Searches affiliate programs that can be applied to the given chat
|
||||
// Searches affiliate programs that can be connected to the given affiliate
|
||||
func (client *Client) SearchAffiliatePrograms(req *SearchAffiliateProgramsRequest) (*FoundAffiliatePrograms, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "searchAffiliatePrograms",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
"affiliate": req.Affiliate,
|
||||
"sort_order": req.SortOrder,
|
||||
"offset": req.Offset,
|
||||
"limit": req.Limit,
|
||||
|
|
@ -22354,21 +22566,21 @@ func (client *Client) SearchAffiliatePrograms(req *SearchAffiliateProgramsReques
|
|||
return UnmarshalFoundAffiliatePrograms(result.Data)
|
||||
}
|
||||
|
||||
type ConnectChatAffiliateProgramRequest struct {
|
||||
// Identifier of the chat to which the affiliate program will be connected. Can be an identifier of the Saved Messages chat, of a chat with an owned bot, or of a channel chat with can_post_messages administrator right
|
||||
ChatId int64 `json:"chat_id"`
|
||||
type ConnectAffiliateProgramRequest struct {
|
||||
// The affiliate to which the affiliate program will be connected
|
||||
Affiliate AffiliateType `json:"affiliate"`
|
||||
// Identifier of the bot, which affiliate program is connected
|
||||
BotUserId int64 `json:"bot_user_id"`
|
||||
}
|
||||
|
||||
// Connects an affiliate program to the given chat. Returns information about the connected affiliate program
|
||||
func (client *Client) ConnectChatAffiliateProgram(req *ConnectChatAffiliateProgramRequest) (*ChatAffiliateProgram, error) {
|
||||
// Connects an affiliate program to the given affiliate. Returns information about the connected affiliate program
|
||||
func (client *Client) ConnectAffiliateProgram(req *ConnectAffiliateProgramRequest) (*ConnectedAffiliateProgram, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "connectChatAffiliateProgram",
|
||||
Type: "connectAffiliateProgram",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
"affiliate": req.Affiliate,
|
||||
"bot_user_id": req.BotUserId,
|
||||
},
|
||||
})
|
||||
|
|
@ -22380,24 +22592,24 @@ func (client *Client) ConnectChatAffiliateProgram(req *ConnectChatAffiliateProgr
|
|||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalChatAffiliateProgram(result.Data)
|
||||
return UnmarshalConnectedAffiliateProgram(result.Data)
|
||||
}
|
||||
|
||||
type DisconnectChatAffiliateProgramRequest struct {
|
||||
// Identifier of the chat for which the affiliate program is connected
|
||||
ChatId int64 `json:"chat_id"`
|
||||
type DisconnectAffiliateProgramRequest struct {
|
||||
// The affiliate to which the affiliate program is connected
|
||||
Affiliate AffiliateType `json:"affiliate"`
|
||||
// The referral link of the affiliate program
|
||||
Url string `json:"url"`
|
||||
}
|
||||
|
||||
// Disconnects an affiliate program from the given chat and immediately deactivates its referral link. Returns updated information about the disconnected affiliate program
|
||||
func (client *Client) DisconnectChatAffiliateProgram(req *DisconnectChatAffiliateProgramRequest) (*ChatAffiliateProgram, error) {
|
||||
// Disconnects an affiliate program from the given affiliate and immediately deactivates its referral link. Returns updated information about the disconnected affiliate program
|
||||
func (client *Client) DisconnectAffiliateProgram(req *DisconnectAffiliateProgramRequest) (*ConnectedAffiliateProgram, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "disconnectChatAffiliateProgram",
|
||||
Type: "disconnectAffiliateProgram",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
"affiliate": req.Affiliate,
|
||||
"url": req.Url,
|
||||
},
|
||||
})
|
||||
|
|
@ -22409,24 +22621,24 @@ func (client *Client) DisconnectChatAffiliateProgram(req *DisconnectChatAffiliat
|
|||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalChatAffiliateProgram(result.Data)
|
||||
return UnmarshalConnectedAffiliateProgram(result.Data)
|
||||
}
|
||||
|
||||
type GetChatAffiliateProgramRequest struct {
|
||||
// Identifier of the chat for which the affiliate program was connected. Can be an identifier of the Saved Messages chat, of a chat with an owned bot, or of a channel chat with can_post_messages administrator right
|
||||
ChatId int64 `json:"chat_id"`
|
||||
type GetConnectedAffiliateProgramRequest struct {
|
||||
// The affiliate to which the affiliate program will be connected
|
||||
Affiliate AffiliateType `json:"affiliate"`
|
||||
// Identifier of the bot that created the program
|
||||
BotUserId int64 `json:"bot_user_id"`
|
||||
}
|
||||
|
||||
// Returns an affiliate program that were connected to the given chat by identifier of the bot that created the program
|
||||
func (client *Client) GetChatAffiliateProgram(req *GetChatAffiliateProgramRequest) (*ChatAffiliateProgram, error) {
|
||||
// Returns an affiliate program that were connected to the given affiliate by identifier of the bot that created the program
|
||||
func (client *Client) GetConnectedAffiliateProgram(req *GetConnectedAffiliateProgramRequest) (*ConnectedAffiliateProgram, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getChatAffiliateProgram",
|
||||
Type: "getConnectedAffiliateProgram",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
"affiliate": req.Affiliate,
|
||||
"bot_user_id": req.BotUserId,
|
||||
},
|
||||
})
|
||||
|
|
@ -22438,26 +22650,26 @@ func (client *Client) GetChatAffiliateProgram(req *GetChatAffiliateProgramReques
|
|||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalChatAffiliateProgram(result.Data)
|
||||
return UnmarshalConnectedAffiliateProgram(result.Data)
|
||||
}
|
||||
|
||||
type GetChatAffiliateProgramsRequest struct {
|
||||
// Identifier of the chat for which the affiliate programs were connected. Can be an identifier of the Saved Messages chat, of a chat with an owned bot, or of a channel chat with can_post_messages administrator right
|
||||
ChatId int64 `json:"chat_id"`
|
||||
type GetConnectedAffiliateProgramsRequest struct {
|
||||
// The affiliate to which the affiliate program were connected
|
||||
Affiliate AffiliateType `json:"affiliate"`
|
||||
// Offset of the first affiliate program 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 affiliate programs to return
|
||||
Limit int32 `json:"limit"`
|
||||
}
|
||||
|
||||
// Returns affiliate programs that were connected to the given chat
|
||||
func (client *Client) GetChatAffiliatePrograms(req *GetChatAffiliateProgramsRequest) (*ChatAffiliatePrograms, error) {
|
||||
// Returns affiliate programs that were connected to the given affiliate
|
||||
func (client *Client) GetConnectedAffiliatePrograms(req *GetConnectedAffiliateProgramsRequest) (*ConnectedAffiliatePrograms, error) {
|
||||
result, err := client.Send(Request{
|
||||
meta: meta{
|
||||
Type: "getChatAffiliatePrograms",
|
||||
Type: "getConnectedAffiliatePrograms",
|
||||
},
|
||||
Data: map[string]interface{}{
|
||||
"chat_id": req.ChatId,
|
||||
"affiliate": req.Affiliate,
|
||||
"offset": req.Offset,
|
||||
"limit": req.Limit,
|
||||
},
|
||||
|
|
@ -22470,7 +22682,7 @@ func (client *Client) GetChatAffiliatePrograms(req *GetChatAffiliateProgramsRequ
|
|||
return nil, buildResponseError(result.Data)
|
||||
}
|
||||
|
||||
return UnmarshalChatAffiliatePrograms(result.Data)
|
||||
return UnmarshalConnectedAffiliatePrograms(result.Data)
|
||||
}
|
||||
|
||||
type GetBusinessFeaturesRequest struct {
|
||||
|
|
|
|||
1004
client/type.go
1004
client/type.go
File diff suppressed because it is too large
Load diff
|
|
@ -693,6 +693,43 @@ func UnmarshalListOfStarSubscriptionType(dataList []json.RawMessage) ([]StarSubs
|
|||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalAffiliateType(data json.RawMessage) (AffiliateType, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypeAffiliateTypeCurrentUser:
|
||||
return UnmarshalAffiliateTypeCurrentUser(data)
|
||||
|
||||
case TypeAffiliateTypeBot:
|
||||
return UnmarshalAffiliateTypeBot(data)
|
||||
|
||||
case TypeAffiliateTypeChannel:
|
||||
return UnmarshalAffiliateTypeChannel(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfAffiliateType(dataList []json.RawMessage) ([]AffiliateType, error) {
|
||||
list := []AffiliateType{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalAffiliateType(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list = append(list, entity)
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalAffiliateProgramSortOrder(data json.RawMessage) (AffiliateProgramSortOrder, error) {
|
||||
var meta meta
|
||||
|
||||
|
|
@ -730,6 +767,40 @@ func UnmarshalListOfAffiliateProgramSortOrder(dataList []json.RawMessage) ([]Aff
|
|||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalSentGift(data json.RawMessage) (SentGift, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypeSentGiftRegular:
|
||||
return UnmarshalSentGiftRegular(data)
|
||||
|
||||
case TypeSentGiftUpgraded:
|
||||
return UnmarshalSentGiftUpgraded(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfSentGift(dataList []json.RawMessage) ([]SentGift, error) {
|
||||
list := []SentGift{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalSentGift(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list = append(list, entity)
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionDirection(data json.RawMessage) (StarTransactionDirection, error) {
|
||||
var meta meta
|
||||
|
||||
|
|
@ -833,9 +904,15 @@ func UnmarshalStarTransactionType(data json.RawMessage) (StarTransactionType, er
|
|||
case TypeStarTransactionTypeGiftPurchase:
|
||||
return UnmarshalStarTransactionTypeGiftPurchase(data)
|
||||
|
||||
case TypeStarTransactionTypeGiftTransfer:
|
||||
return UnmarshalStarTransactionTypeGiftTransfer(data)
|
||||
|
||||
case TypeStarTransactionTypeGiftSale:
|
||||
return UnmarshalStarTransactionTypeGiftSale(data)
|
||||
|
||||
case TypeStarTransactionTypeGiftUpgrade:
|
||||
return UnmarshalStarTransactionTypeGiftUpgrade(data)
|
||||
|
||||
case TypeStarTransactionTypeChannelPaidReactionSend:
|
||||
return UnmarshalStarTransactionTypeChannelPaidReactionSend(data)
|
||||
|
||||
|
|
@ -3341,6 +3418,12 @@ func UnmarshalMessageContent(data json.RawMessage) (MessageContent, error) {
|
|||
case TypeMessageGift:
|
||||
return UnmarshalMessageGift(data)
|
||||
|
||||
case TypeMessageUpgradedGift:
|
||||
return UnmarshalMessageUpgradedGift(data)
|
||||
|
||||
case TypeMessageRefundedUpgradedGift:
|
||||
return UnmarshalMessageRefundedUpgradedGift(data)
|
||||
|
||||
case TypeMessageContactRegistered:
|
||||
return UnmarshalMessageContactRegistered(data)
|
||||
|
||||
|
|
@ -3753,6 +3836,43 @@ func UnmarshalListOfSearchMessagesFilter(dataList []json.RawMessage) ([]SearchMe
|
|||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalSearchMessagesChatTypeFilter(data json.RawMessage) (SearchMessagesChatTypeFilter, error) {
|
||||
var meta meta
|
||||
|
||||
err := json.Unmarshal(data, &meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
switch meta.Type {
|
||||
case TypeSearchMessagesChatTypeFilterPrivate:
|
||||
return UnmarshalSearchMessagesChatTypeFilterPrivate(data)
|
||||
|
||||
case TypeSearchMessagesChatTypeFilterGroup:
|
||||
return UnmarshalSearchMessagesChatTypeFilterGroup(data)
|
||||
|
||||
case TypeSearchMessagesChatTypeFilterChannel:
|
||||
return UnmarshalSearchMessagesChatTypeFilterChannel(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
}
|
||||
|
||||
func UnmarshalListOfSearchMessagesChatTypeFilter(dataList []json.RawMessage) ([]SearchMessagesChatTypeFilter, error) {
|
||||
list := []SearchMessagesChatTypeFilter{}
|
||||
|
||||
for _, data := range dataList {
|
||||
entity, err := UnmarshalSearchMessagesChatTypeFilter(data)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
list = append(list, entity)
|
||||
}
|
||||
|
||||
return list, nil
|
||||
}
|
||||
|
||||
func UnmarshalChatAction(data json.RawMessage) (ChatAction, error) {
|
||||
var meta meta
|
||||
|
||||
|
|
@ -4346,6 +4466,9 @@ func UnmarshalCallDiscardReason(data json.RawMessage) (CallDiscardReason, error)
|
|||
case TypeCallDiscardReasonHungUp:
|
||||
return UnmarshalCallDiscardReasonHungUp(data)
|
||||
|
||||
case TypeCallDiscardReasonAllowGroupCall:
|
||||
return UnmarshalCallDiscardReasonAllowGroupCall(data)
|
||||
|
||||
default:
|
||||
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
|
||||
}
|
||||
|
|
@ -6081,6 +6204,9 @@ func UnmarshalPushMessageContent(data json.RawMessage) (PushMessageContent, erro
|
|||
case TypePushMessageContentGift:
|
||||
return UnmarshalPushMessageContentGift(data)
|
||||
|
||||
case TypePushMessageContentUpgradedGift:
|
||||
return UnmarshalPushMessageContentUpgradedGift(data)
|
||||
|
||||
case TypePushMessageContentScreenshotTaken:
|
||||
return UnmarshalPushMessageContentScreenshotTaken(data)
|
||||
|
||||
|
|
@ -7333,6 +7459,9 @@ func UnmarshalSuggestedAction(data json.RawMessage) (SuggestedAction, error) {
|
|||
case TypeSuggestedActionSetBirthdate:
|
||||
return UnmarshalSuggestedActionSetBirthdate(data)
|
||||
|
||||
case TypeSuggestedActionSetProfilePhoto:
|
||||
return UnmarshalSuggestedActionSetProfilePhoto(data)
|
||||
|
||||
case TypeSuggestedActionExtendPremium:
|
||||
return UnmarshalSuggestedActionExtendPremium(data)
|
||||
|
||||
|
|
@ -9078,6 +9207,30 @@ func UnmarshalBotMenuButton(data json.RawMessage) (*BotMenuButton, error) {
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBotVerificationParameters(data json.RawMessage) (*BotVerificationParameters, error) {
|
||||
var resp BotVerificationParameters
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalBotVerification(data json.RawMessage) (*BotVerification, error) {
|
||||
var resp BotVerification
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalVerificationStatus(data json.RawMessage) (*VerificationStatus, error) {
|
||||
var resp VerificationStatus
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalChatLocation(data json.RawMessage) (*ChatLocation, error) {
|
||||
var resp ChatLocation
|
||||
|
||||
|
|
@ -9382,6 +9535,30 @@ func UnmarshalStarSubscriptions(data json.RawMessage) (*StarSubscriptions, error
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalAffiliateTypeCurrentUser(data json.RawMessage) (*AffiliateTypeCurrentUser, error) {
|
||||
var resp AffiliateTypeCurrentUser
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalAffiliateTypeBot(data json.RawMessage) (*AffiliateTypeBot, error) {
|
||||
var resp AffiliateTypeBot
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalAffiliateTypeChannel(data json.RawMessage) (*AffiliateTypeChannel, error) {
|
||||
var resp AffiliateTypeChannel
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalAffiliateProgramSortOrderProfitability(data json.RawMessage) (*AffiliateProgramSortOrderProfitability, error) {
|
||||
var resp AffiliateProgramSortOrderProfitability
|
||||
|
||||
|
|
@ -9446,16 +9623,16 @@ func UnmarshalFoundAffiliatePrograms(data json.RawMessage) (*FoundAffiliateProgr
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalChatAffiliateProgram(data json.RawMessage) (*ChatAffiliateProgram, error) {
|
||||
var resp ChatAffiliateProgram
|
||||
func UnmarshalConnectedAffiliateProgram(data json.RawMessage) (*ConnectedAffiliateProgram, error) {
|
||||
var resp ConnectedAffiliateProgram
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalChatAffiliatePrograms(data json.RawMessage) (*ChatAffiliatePrograms, error) {
|
||||
var resp ChatAffiliatePrograms
|
||||
func UnmarshalConnectedAffiliatePrograms(data json.RawMessage) (*ConnectedAffiliatePrograms, error) {
|
||||
var resp ConnectedAffiliatePrograms
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
|
|
@ -9550,6 +9727,38 @@ func UnmarshalStarGiveawayPaymentOptions(data json.RawMessage) (*StarGiveawayPay
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUpgradedGiftModel(data json.RawMessage) (*UpgradedGiftModel, error) {
|
||||
var resp UpgradedGiftModel
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUpgradedGiftSymbol(data json.RawMessage) (*UpgradedGiftSymbol, error) {
|
||||
var resp UpgradedGiftSymbol
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUpgradedGiftBackdrop(data json.RawMessage) (*UpgradedGiftBackdrop, error) {
|
||||
var resp UpgradedGiftBackdrop
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUpgradedGiftOriginalDetails(data json.RawMessage) (*UpgradedGiftOriginalDetails, error) {
|
||||
var resp UpgradedGiftOriginalDetails
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalGift(data json.RawMessage) (*Gift, error) {
|
||||
var resp Gift
|
||||
|
||||
|
|
@ -9566,6 +9775,38 @@ func UnmarshalGifts(data json.RawMessage) (*Gifts, error) {
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUpgradedGift(data json.RawMessage) (*UpgradedGift, error) {
|
||||
var resp UpgradedGift
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUpgradeGiftResult(data json.RawMessage) (*UpgradeGiftResult, error) {
|
||||
var resp UpgradeGiftResult
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalSentGiftRegular(data json.RawMessage) (*SentGiftRegular, error) {
|
||||
var resp SentGiftRegular
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalSentGiftUpgraded(data json.RawMessage) (*SentGiftUpgraded, error) {
|
||||
var resp SentGiftUpgraded
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalUserGift(data json.RawMessage) (*UserGift, error) {
|
||||
var resp UserGift
|
||||
|
||||
|
|
@ -9582,6 +9823,14 @@ func UnmarshalUserGifts(data json.RawMessage) (*UserGifts, error) {
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalGiftUpgradePreview(data json.RawMessage) (*GiftUpgradePreview, error) {
|
||||
var resp GiftUpgradePreview
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionDirectionIncoming(data json.RawMessage) (*StarTransactionDirectionIncoming, error) {
|
||||
var resp StarTransactionDirectionIncoming
|
||||
|
||||
|
|
@ -9758,6 +10007,14 @@ func UnmarshalStarTransactionTypeGiftPurchase(data json.RawMessage) (*StarTransa
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionTypeGiftTransfer(data json.RawMessage) (*StarTransactionTypeGiftTransfer, error) {
|
||||
var resp StarTransactionTypeGiftTransfer
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionTypeGiftSale(data json.RawMessage) (*StarTransactionTypeGiftSale, error) {
|
||||
var resp StarTransactionTypeGiftSale
|
||||
|
||||
|
|
@ -9766,6 +10023,14 @@ func UnmarshalStarTransactionTypeGiftSale(data json.RawMessage) (*StarTransactio
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionTypeGiftUpgrade(data json.RawMessage) (*StarTransactionTypeGiftUpgrade, error) {
|
||||
var resp StarTransactionTypeGiftUpgrade
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalStarTransactionTypeChannelPaidReactionSend(data json.RawMessage) (*StarTransactionTypeChannelPaidReactionSend, error) {
|
||||
var resp StarTransactionTypeChannelPaidReactionSend
|
||||
|
||||
|
|
@ -11054,6 +11319,14 @@ func UnmarshalChatFolderIcon(data json.RawMessage) (*ChatFolderIcon, error) {
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalChatFolderName(data json.RawMessage) (*ChatFolderName, error) {
|
||||
var resp ChatFolderName
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalChatFolder(data json.RawMessage) (*ChatFolder, error) {
|
||||
var resp ChatFolder
|
||||
|
||||
|
|
@ -13838,6 +14111,22 @@ func UnmarshalMessageGift(data json.RawMessage) (*MessageGift, error) {
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageUpgradedGift(data json.RawMessage) (*MessageUpgradedGift, error) {
|
||||
var resp MessageUpgradedGift
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageRefundedUpgradedGift(data json.RawMessage) (*MessageRefundedUpgradedGift, error) {
|
||||
var resp MessageRefundedUpgradedGift
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalMessageContactRegistered(data json.RawMessage) (*MessageContactRegistered, error) {
|
||||
var resp MessageContactRegistered
|
||||
|
||||
|
|
@ -14478,6 +14767,30 @@ func UnmarshalSearchMessagesFilterPinned(data json.RawMessage) (*SearchMessagesF
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalSearchMessagesChatTypeFilterPrivate(data json.RawMessage) (*SearchMessagesChatTypeFilterPrivate, error) {
|
||||
var resp SearchMessagesChatTypeFilterPrivate
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalSearchMessagesChatTypeFilterGroup(data json.RawMessage) (*SearchMessagesChatTypeFilterGroup, error) {
|
||||
var resp SearchMessagesChatTypeFilterGroup
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalSearchMessagesChatTypeFilterChannel(data json.RawMessage) (*SearchMessagesChatTypeFilterChannel, error) {
|
||||
var resp SearchMessagesChatTypeFilterChannel
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalChatActionTyping(data json.RawMessage) (*ChatActionTyping, error) {
|
||||
var resp ChatActionTyping
|
||||
|
||||
|
|
@ -15318,6 +15631,14 @@ func UnmarshalCallDiscardReasonHungUp(data json.RawMessage) (*CallDiscardReasonH
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalCallDiscardReasonAllowGroupCall(data json.RawMessage) (*CallDiscardReasonAllowGroupCall, error) {
|
||||
var resp CallDiscardReasonAllowGroupCall
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalCallProtocol(data json.RawMessage) (*CallProtocol, error) {
|
||||
var resp CallProtocol
|
||||
|
||||
|
|
@ -17838,6 +18159,14 @@ func UnmarshalPushMessageContentGift(data json.RawMessage) (*PushMessageContentG
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPushMessageContentUpgradedGift(data json.RawMessage) (*PushMessageContentUpgradedGift, error) {
|
||||
var resp PushMessageContentUpgradedGift
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalPushMessageContentScreenshotTaken(data json.RawMessage) (*PushMessageContentScreenshotTaken, error) {
|
||||
var resp PushMessageContentScreenshotTaken
|
||||
|
||||
|
|
@ -19814,6 +20143,14 @@ func UnmarshalSuggestedActionSetBirthdate(data json.RawMessage) (*SuggestedActio
|
|||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalSuggestedActionSetProfilePhoto(data json.RawMessage) (*SuggestedActionSetProfilePhoto, error) {
|
||||
var resp SuggestedActionSetProfilePhoto
|
||||
|
||||
err := json.Unmarshal(data, &resp)
|
||||
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func UnmarshalSuggestedActionExtendPremium(data json.RawMessage) (*SuggestedActionExtendPremium, error) {
|
||||
var resp SuggestedActionExtendPremium
|
||||
|
||||
|
|
@ -21895,6 +22232,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeBotMenuButton:
|
||||
return UnmarshalBotMenuButton(data)
|
||||
|
||||
case TypeBotVerificationParameters:
|
||||
return UnmarshalBotVerificationParameters(data)
|
||||
|
||||
case TypeBotVerification:
|
||||
return UnmarshalBotVerification(data)
|
||||
|
||||
case TypeVerificationStatus:
|
||||
return UnmarshalVerificationStatus(data)
|
||||
|
||||
case TypeChatLocation:
|
||||
return UnmarshalChatLocation(data)
|
||||
|
||||
|
|
@ -22009,6 +22355,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeStarSubscriptions:
|
||||
return UnmarshalStarSubscriptions(data)
|
||||
|
||||
case TypeAffiliateTypeCurrentUser:
|
||||
return UnmarshalAffiliateTypeCurrentUser(data)
|
||||
|
||||
case TypeAffiliateTypeBot:
|
||||
return UnmarshalAffiliateTypeBot(data)
|
||||
|
||||
case TypeAffiliateTypeChannel:
|
||||
return UnmarshalAffiliateTypeChannel(data)
|
||||
|
||||
case TypeAffiliateProgramSortOrderProfitability:
|
||||
return UnmarshalAffiliateProgramSortOrderProfitability(data)
|
||||
|
||||
|
|
@ -22033,11 +22388,11 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeFoundAffiliatePrograms:
|
||||
return UnmarshalFoundAffiliatePrograms(data)
|
||||
|
||||
case TypeChatAffiliateProgram:
|
||||
return UnmarshalChatAffiliateProgram(data)
|
||||
case TypeConnectedAffiliateProgram:
|
||||
return UnmarshalConnectedAffiliateProgram(data)
|
||||
|
||||
case TypeChatAffiliatePrograms:
|
||||
return UnmarshalChatAffiliatePrograms(data)
|
||||
case TypeConnectedAffiliatePrograms:
|
||||
return UnmarshalConnectedAffiliatePrograms(data)
|
||||
|
||||
case TypeProductInfo:
|
||||
return UnmarshalProductInfo(data)
|
||||
|
|
@ -22072,18 +22427,45 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeStarGiveawayPaymentOptions:
|
||||
return UnmarshalStarGiveawayPaymentOptions(data)
|
||||
|
||||
case TypeUpgradedGiftModel:
|
||||
return UnmarshalUpgradedGiftModel(data)
|
||||
|
||||
case TypeUpgradedGiftSymbol:
|
||||
return UnmarshalUpgradedGiftSymbol(data)
|
||||
|
||||
case TypeUpgradedGiftBackdrop:
|
||||
return UnmarshalUpgradedGiftBackdrop(data)
|
||||
|
||||
case TypeUpgradedGiftOriginalDetails:
|
||||
return UnmarshalUpgradedGiftOriginalDetails(data)
|
||||
|
||||
case TypeGift:
|
||||
return UnmarshalGift(data)
|
||||
|
||||
case TypeGifts:
|
||||
return UnmarshalGifts(data)
|
||||
|
||||
case TypeUpgradedGift:
|
||||
return UnmarshalUpgradedGift(data)
|
||||
|
||||
case TypeUpgradeGiftResult:
|
||||
return UnmarshalUpgradeGiftResult(data)
|
||||
|
||||
case TypeSentGiftRegular:
|
||||
return UnmarshalSentGiftRegular(data)
|
||||
|
||||
case TypeSentGiftUpgraded:
|
||||
return UnmarshalSentGiftUpgraded(data)
|
||||
|
||||
case TypeUserGift:
|
||||
return UnmarshalUserGift(data)
|
||||
|
||||
case TypeUserGifts:
|
||||
return UnmarshalUserGifts(data)
|
||||
|
||||
case TypeGiftUpgradePreview:
|
||||
return UnmarshalGiftUpgradePreview(data)
|
||||
|
||||
case TypeStarTransactionDirectionIncoming:
|
||||
return UnmarshalStarTransactionDirectionIncoming(data)
|
||||
|
||||
|
|
@ -22150,9 +22532,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeStarTransactionTypeGiftPurchase:
|
||||
return UnmarshalStarTransactionTypeGiftPurchase(data)
|
||||
|
||||
case TypeStarTransactionTypeGiftTransfer:
|
||||
return UnmarshalStarTransactionTypeGiftTransfer(data)
|
||||
|
||||
case TypeStarTransactionTypeGiftSale:
|
||||
return UnmarshalStarTransactionTypeGiftSale(data)
|
||||
|
||||
case TypeStarTransactionTypeGiftUpgrade:
|
||||
return UnmarshalStarTransactionTypeGiftUpgrade(data)
|
||||
|
||||
case TypeStarTransactionTypeChannelPaidReactionSend:
|
||||
return UnmarshalStarTransactionTypeChannelPaidReactionSend(data)
|
||||
|
||||
|
|
@ -22636,6 +23024,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeChatFolderIcon:
|
||||
return UnmarshalChatFolderIcon(data)
|
||||
|
||||
case TypeChatFolderName:
|
||||
return UnmarshalChatFolderName(data)
|
||||
|
||||
case TypeChatFolder:
|
||||
return UnmarshalChatFolder(data)
|
||||
|
||||
|
|
@ -23680,6 +24071,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeMessageGift:
|
||||
return UnmarshalMessageGift(data)
|
||||
|
||||
case TypeMessageUpgradedGift:
|
||||
return UnmarshalMessageUpgradedGift(data)
|
||||
|
||||
case TypeMessageRefundedUpgradedGift:
|
||||
return UnmarshalMessageRefundedUpgradedGift(data)
|
||||
|
||||
case TypeMessageContactRegistered:
|
||||
return UnmarshalMessageContactRegistered(data)
|
||||
|
||||
|
|
@ -23920,6 +24317,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeSearchMessagesFilterPinned:
|
||||
return UnmarshalSearchMessagesFilterPinned(data)
|
||||
|
||||
case TypeSearchMessagesChatTypeFilterPrivate:
|
||||
return UnmarshalSearchMessagesChatTypeFilterPrivate(data)
|
||||
|
||||
case TypeSearchMessagesChatTypeFilterGroup:
|
||||
return UnmarshalSearchMessagesChatTypeFilterGroup(data)
|
||||
|
||||
case TypeSearchMessagesChatTypeFilterChannel:
|
||||
return UnmarshalSearchMessagesChatTypeFilterChannel(data)
|
||||
|
||||
case TypeChatActionTyping:
|
||||
return UnmarshalChatActionTyping(data)
|
||||
|
||||
|
|
@ -24235,6 +24641,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeCallDiscardReasonHungUp:
|
||||
return UnmarshalCallDiscardReasonHungUp(data)
|
||||
|
||||
case TypeCallDiscardReasonAllowGroupCall:
|
||||
return UnmarshalCallDiscardReasonAllowGroupCall(data)
|
||||
|
||||
case TypeCallProtocol:
|
||||
return UnmarshalCallProtocol(data)
|
||||
|
||||
|
|
@ -25180,6 +25589,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypePushMessageContentGift:
|
||||
return UnmarshalPushMessageContentGift(data)
|
||||
|
||||
case TypePushMessageContentUpgradedGift:
|
||||
return UnmarshalPushMessageContentUpgradedGift(data)
|
||||
|
||||
case TypePushMessageContentScreenshotTaken:
|
||||
return UnmarshalPushMessageContentScreenshotTaken(data)
|
||||
|
||||
|
|
@ -25921,6 +26333,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
|
|||
case TypeSuggestedActionSetBirthdate:
|
||||
return UnmarshalSuggestedActionSetBirthdate(data)
|
||||
|
||||
case TypeSuggestedActionSetProfilePhoto:
|
||||
return UnmarshalSuggestedActionSetProfilePhoto(data)
|
||||
|
||||
case TypeSuggestedActionExtendPremium:
|
||||
return UnmarshalSuggestedActionExtendPremium(data)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue