Update to TDLib 1.8.3

This commit is contained in:
c0re100 2022-04-25 04:33:39 +08:00
parent 36a547a560
commit 94b077458b
No known key found for this signature in database
GPG key ID: 7C3B3004FE745AAF
4 changed files with 1679 additions and 242 deletions

View file

@ -938,6 +938,9 @@ func UnmarshalKeyboardButtonType(data json.RawMessage) (KeyboardButtonType, erro
case TypeKeyboardButtonTypeRequestPoll:
return UnmarshalKeyboardButtonTypeRequestPoll(data)
case TypeKeyboardButtonTypeWebApp:
return UnmarshalKeyboardButtonTypeWebApp(data)
default:
return nil, fmt.Errorf("Error unmarshaling. Unknown type: " + meta.Type)
}
@ -972,6 +975,9 @@ func UnmarshalInlineKeyboardButtonType(data json.RawMessage) (InlineKeyboardButt
case TypeInlineKeyboardButtonTypeLoginUrl:
return UnmarshalInlineKeyboardButtonTypeLoginUrl(data)
case TypeInlineKeyboardButtonTypeWebApp:
return UnmarshalInlineKeyboardButtonTypeWebApp(data)
case TypeInlineKeyboardButtonTypeCallback:
return UnmarshalInlineKeyboardButtonTypeCallback(data)
@ -1846,6 +1852,12 @@ func UnmarshalMessageContent(data json.RawMessage) (MessageContent, error) {
case TypeMessageWebsiteConnected:
return UnmarshalMessageWebsiteConnected(data)
case TypeMessageWebAppDataSent:
return UnmarshalMessageWebAppDataSent(data)
case TypeMessageWebAppDataReceived:
return UnmarshalMessageWebAppDataReceived(data)
case TypeMessagePassportDataSent:
return UnmarshalMessagePassportDataSent(data)
@ -3672,6 +3684,9 @@ func UnmarshalInternalLinkType(data json.RawMessage) (InternalLinkType, error) {
case TypeInternalLinkTypeActiveSessions:
return UnmarshalInternalLinkTypeActiveSessions(data)
case TypeInternalLinkTypeAttachmentMenuBot:
return UnmarshalInternalLinkTypeAttachmentMenuBot(data)
case TypeInternalLinkTypeAuthenticationCode:
return UnmarshalInternalLinkTypeAuthenticationCode(data)
@ -3684,6 +3699,9 @@ func UnmarshalInternalLinkType(data json.RawMessage) (InternalLinkType, error) {
case TypeInternalLinkTypeBotStartInGroup:
return UnmarshalInternalLinkTypeBotStartInGroup(data)
case TypeInternalLinkTypeBotAddToChannel:
return UnmarshalInternalLinkTypeBotAddToChannel(data)
case TypeInternalLinkTypeChangePhoneNumber:
return UnmarshalInternalLinkTypeChangePhoneNumber(data)
@ -3790,6 +3808,9 @@ func UnmarshalFileType(data json.RawMessage) (FileType, error) {
case TypeFileTypeDocument:
return UnmarshalFileTypeDocument(data)
case TypeFileTypeNotificationSound:
return UnmarshalFileTypeNotificationSound(data)
case TypeFileTypePhoto:
return UnmarshalFileTypePhoto(data)
@ -4565,6 +4586,9 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateSavedAnimations:
return UnmarshalUpdateSavedAnimations(data)
case TypeUpdateSavedNotificationSounds:
return UnmarshalUpdateSavedNotificationSounds(data)
case TypeUpdateSelectedBackground:
return UnmarshalUpdateSelectedBackground(data)
@ -4583,6 +4607,12 @@ func UnmarshalUpdate(data json.RawMessage) (Update, error) {
case TypeUpdateUsersNearby:
return UnmarshalUpdateUsersNearby(data)
case TypeUpdateAttachmentMenuBots:
return UnmarshalUpdateAttachmentMenuBots(data)
case TypeUpdateWebAppMessageSent:
return UnmarshalUpdateWebAppMessageSent(data)
case TypeUpdateReactions:
return UnmarshalUpdateReactions(data)
@ -5330,6 +5360,14 @@ func UnmarshalBotCommands(data json.RawMessage) (*BotCommands, error) {
return &resp, err
}
func UnmarshalBotMenuButton(data json.RawMessage) (*BotMenuButton, error) {
var resp BotMenuButton
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalChatLocation(data json.RawMessage) (*ChatLocation, error) {
var resp ChatLocation
@ -5386,6 +5424,22 @@ func UnmarshalInputChatPhotoAnimation(data json.RawMessage) (*InputChatPhotoAnim
return &resp, err
}
func UnmarshalChatPermissions(data json.RawMessage) (*ChatPermissions, error) {
var resp ChatPermissions
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalChatAdministratorRights(data json.RawMessage) (*ChatAdministratorRights, error) {
var resp ChatAdministratorRights
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUser(data json.RawMessage) (*User, error) {
var resp User
@ -5394,6 +5448,14 @@ func UnmarshalUser(data json.RawMessage) (*User, error) {
return &resp, err
}
func UnmarshalBotInfo(data json.RawMessage) (*BotInfo, error) {
var resp BotInfo
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUserFullInfo(data json.RawMessage) (*UserFullInfo, error) {
var resp UserFullInfo
@ -5426,14 +5488,6 @@ func UnmarshalChatAdministrators(data json.RawMessage) (*ChatAdministrators, err
return &resp, err
}
func UnmarshalChatPermissions(data json.RawMessage) (*ChatPermissions, error) {
var resp ChatPermissions
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalChatMemberStatusCreator(data json.RawMessage) (*ChatMemberStatusCreator, error) {
var resp ChatMemberStatusCreator
@ -6282,6 +6336,14 @@ func UnmarshalKeyboardButtonTypeRequestPoll(data json.RawMessage) (*KeyboardButt
return &resp, err
}
func UnmarshalKeyboardButtonTypeWebApp(data json.RawMessage) (*KeyboardButtonTypeWebApp, error) {
var resp KeyboardButtonTypeWebApp
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalKeyboardButton(data json.RawMessage) (*KeyboardButton, error) {
var resp KeyboardButton
@ -6306,6 +6368,14 @@ func UnmarshalInlineKeyboardButtonTypeLoginUrl(data json.RawMessage) (*InlineKey
return &resp, err
}
func UnmarshalInlineKeyboardButtonTypeWebApp(data json.RawMessage) (*InlineKeyboardButtonTypeWebApp, error) {
var resp InlineKeyboardButtonTypeWebApp
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalInlineKeyboardButtonTypeCallback(data json.RawMessage) (*InlineKeyboardButtonTypeCallback, error) {
var resp InlineKeyboardButtonTypeCallback
@ -6410,6 +6480,14 @@ func UnmarshalLoginUrlInfoRequestConfirmation(data json.RawMessage) (*LoginUrlIn
return &resp, err
}
func UnmarshalWebAppInfo(data json.RawMessage) (*WebAppInfo, error) {
var resp WebAppInfo
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalMessageThreadInfo(data json.RawMessage) (*MessageThreadInfo, error) {
var resp MessageThreadInfo
@ -6930,6 +7008,14 @@ func UnmarshalAddress(data json.RawMessage) (*Address, error) {
return &resp, err
}
func UnmarshalThemeParameters(data json.RawMessage) (*ThemeParameters, error) {
var resp ThemeParameters
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalLabeledPricePart(data json.RawMessage) (*LabeledPricePart, error) {
var resp LabeledPricePart
@ -7010,14 +7096,6 @@ func UnmarshalPaymentsProviderStripe(data json.RawMessage) (*PaymentsProviderStr
return &resp, err
}
func UnmarshalPaymentFormTheme(data json.RawMessage) (*PaymentFormTheme, error) {
var resp PaymentFormTheme
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalPaymentForm(data json.RawMessage) (*PaymentForm, error) {
var resp PaymentForm
@ -7994,6 +8072,22 @@ func UnmarshalMessageWebsiteConnected(data json.RawMessage) (*MessageWebsiteConn
return &resp, err
}
func UnmarshalMessageWebAppDataSent(data json.RawMessage) (*MessageWebAppDataSent, error) {
var resp MessageWebAppDataSent
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalMessageWebAppDataReceived(data json.RawMessage) (*MessageWebAppDataReceived, error) {
var resp MessageWebAppDataReceived
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalMessagePassportDataSent(data json.RawMessage) (*MessagePassportDataSent, error) {
var resp MessagePassportDataSent
@ -9074,6 +9168,30 @@ func UnmarshalImportedContacts(data json.RawMessage) (*ImportedContacts, error)
return &resp, err
}
func UnmarshalAttachmentMenuBotColor(data json.RawMessage) (*AttachmentMenuBotColor, error) {
var resp AttachmentMenuBotColor
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalAttachmentMenuBot(data json.RawMessage) (*AttachmentMenuBot, error) {
var resp AttachmentMenuBot
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalSentWebAppMessage(data json.RawMessage) (*SentWebAppMessage, error) {
var resp SentWebAppMessage
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalHttpUrl(data json.RawMessage) (*HttpUrl, error) {
var resp HttpUrl
@ -10330,6 +10448,22 @@ func UnmarshalNotificationGroupTypeCalls(data json.RawMessage) (*NotificationGro
return &resp, err
}
func UnmarshalNotificationSound(data json.RawMessage) (*NotificationSound, error) {
var resp NotificationSound
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalNotificationSounds(data json.RawMessage) (*NotificationSounds, error) {
var resp NotificationSounds
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalNotification(data json.RawMessage) (*Notification, error) {
var resp Notification
@ -10698,6 +10832,14 @@ func UnmarshalInternalLinkTypeActiveSessions(data json.RawMessage) (*InternalLin
return &resp, err
}
func UnmarshalInternalLinkTypeAttachmentMenuBot(data json.RawMessage) (*InternalLinkTypeAttachmentMenuBot, error) {
var resp InternalLinkTypeAttachmentMenuBot
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalInternalLinkTypeAuthenticationCode(data json.RawMessage) (*InternalLinkTypeAuthenticationCode, error) {
var resp InternalLinkTypeAuthenticationCode
@ -10730,6 +10872,14 @@ func UnmarshalInternalLinkTypeBotStartInGroup(data json.RawMessage) (*InternalLi
return &resp, err
}
func UnmarshalInternalLinkTypeBotAddToChannel(data json.RawMessage) (*InternalLinkTypeBotAddToChannel, error) {
var resp InternalLinkTypeBotAddToChannel
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalInternalLinkTypeChangePhoneNumber(data json.RawMessage) (*InternalLinkTypeChangePhoneNumber, error) {
var resp InternalLinkTypeChangePhoneNumber
@ -10962,6 +11112,14 @@ func UnmarshalFileTypeDocument(data json.RawMessage) (*FileTypeDocument, error)
return &resp, err
}
func UnmarshalFileTypeNotificationSound(data json.RawMessage) (*FileTypeNotificationSound, error) {
var resp FileTypeNotificationSound
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalFileTypePhoto(data json.RawMessage) (*FileTypePhoto, error) {
var resp FileTypePhoto
@ -12258,6 +12416,14 @@ func UnmarshalUpdateSavedAnimations(data json.RawMessage) (*UpdateSavedAnimation
return &resp, err
}
func UnmarshalUpdateSavedNotificationSounds(data json.RawMessage) (*UpdateSavedNotificationSounds, error) {
var resp UpdateSavedNotificationSounds
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateSelectedBackground(data json.RawMessage) (*UpdateSelectedBackground, error) {
var resp UpdateSelectedBackground
@ -12306,6 +12472,22 @@ func UnmarshalUpdateUsersNearby(data json.RawMessage) (*UpdateUsersNearby, error
return &resp, err
}
func UnmarshalUpdateAttachmentMenuBots(data json.RawMessage) (*UpdateAttachmentMenuBots, error) {
var resp UpdateAttachmentMenuBots
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateWebAppMessageSent(data json.RawMessage) (*UpdateWebAppMessageSent, error) {
var resp UpdateWebAppMessageSent
err := json.Unmarshal(data, &resp)
return &resp, err
}
func UnmarshalUpdateReactions(data json.RawMessage) (*UpdateReactions, error) {
var resp UpdateReactions
@ -12795,6 +12977,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeBotCommands:
return UnmarshalBotCommands(data)
case TypeBotMenuButton:
return UnmarshalBotMenuButton(data)
case TypeChatLocation:
return UnmarshalChatLocation(data)
@ -12816,9 +13001,18 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeInputChatPhotoAnimation:
return UnmarshalInputChatPhotoAnimation(data)
case TypeChatPermissions:
return UnmarshalChatPermissions(data)
case TypeChatAdministratorRights:
return UnmarshalChatAdministratorRights(data)
case TypeUser:
return UnmarshalUser(data)
case TypeBotInfo:
return UnmarshalBotInfo(data)
case TypeUserFullInfo:
return UnmarshalUserFullInfo(data)
@ -12831,9 +13025,6 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeChatAdministrators:
return UnmarshalChatAdministrators(data)
case TypeChatPermissions:
return UnmarshalChatPermissions(data)
case TypeChatMemberStatusCreator:
return UnmarshalChatMemberStatusCreator(data)
@ -13152,6 +13343,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeKeyboardButtonTypeRequestPoll:
return UnmarshalKeyboardButtonTypeRequestPoll(data)
case TypeKeyboardButtonTypeWebApp:
return UnmarshalKeyboardButtonTypeWebApp(data)
case TypeKeyboardButton:
return UnmarshalKeyboardButton(data)
@ -13161,6 +13355,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeInlineKeyboardButtonTypeLoginUrl:
return UnmarshalInlineKeyboardButtonTypeLoginUrl(data)
case TypeInlineKeyboardButtonTypeWebApp:
return UnmarshalInlineKeyboardButtonTypeWebApp(data)
case TypeInlineKeyboardButtonTypeCallback:
return UnmarshalInlineKeyboardButtonTypeCallback(data)
@ -13200,6 +13397,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeLoginUrlInfoRequestConfirmation:
return UnmarshalLoginUrlInfoRequestConfirmation(data)
case TypeWebAppInfo:
return UnmarshalWebAppInfo(data)
case TypeMessageThreadInfo:
return UnmarshalMessageThreadInfo(data)
@ -13395,6 +13595,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeAddress:
return UnmarshalAddress(data)
case TypeThemeParameters:
return UnmarshalThemeParameters(data)
case TypeLabeledPricePart:
return UnmarshalLabeledPricePart(data)
@ -13425,9 +13628,6 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypePaymentsProviderStripe:
return UnmarshalPaymentsProviderStripe(data)
case TypePaymentFormTheme:
return UnmarshalPaymentFormTheme(data)
case TypePaymentForm:
return UnmarshalPaymentForm(data)
@ -13794,6 +13994,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeMessageWebsiteConnected:
return UnmarshalMessageWebsiteConnected(data)
case TypeMessageWebAppDataSent:
return UnmarshalMessageWebAppDataSent(data)
case TypeMessageWebAppDataReceived:
return UnmarshalMessageWebAppDataReceived(data)
case TypeMessagePassportDataSent:
return UnmarshalMessagePassportDataSent(data)
@ -14199,6 +14405,15 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeImportedContacts:
return UnmarshalImportedContacts(data)
case TypeAttachmentMenuBotColor:
return UnmarshalAttachmentMenuBotColor(data)
case TypeAttachmentMenuBot:
return UnmarshalAttachmentMenuBot(data)
case TypeSentWebAppMessage:
return UnmarshalSentWebAppMessage(data)
case TypeHttpUrl:
return UnmarshalHttpUrl(data)
@ -14670,6 +14885,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeNotificationGroupTypeCalls:
return UnmarshalNotificationGroupTypeCalls(data)
case TypeNotificationSound:
return UnmarshalNotificationSound(data)
case TypeNotificationSounds:
return UnmarshalNotificationSounds(data)
case TypeNotification:
return UnmarshalNotification(data)
@ -14808,6 +15029,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeInternalLinkTypeActiveSessions:
return UnmarshalInternalLinkTypeActiveSessions(data)
case TypeInternalLinkTypeAttachmentMenuBot:
return UnmarshalInternalLinkTypeAttachmentMenuBot(data)
case TypeInternalLinkTypeAuthenticationCode:
return UnmarshalInternalLinkTypeAuthenticationCode(data)
@ -14820,6 +15044,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeInternalLinkTypeBotStartInGroup:
return UnmarshalInternalLinkTypeBotStartInGroup(data)
case TypeInternalLinkTypeBotAddToChannel:
return UnmarshalInternalLinkTypeBotAddToChannel(data)
case TypeInternalLinkTypeChangePhoneNumber:
return UnmarshalInternalLinkTypeChangePhoneNumber(data)
@ -14907,6 +15134,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeFileTypeDocument:
return UnmarshalFileTypeDocument(data)
case TypeFileTypeNotificationSound:
return UnmarshalFileTypeNotificationSound(data)
case TypeFileTypePhoto:
return UnmarshalFileTypePhoto(data)
@ -15393,6 +15623,9 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateSavedAnimations:
return UnmarshalUpdateSavedAnimations(data)
case TypeUpdateSavedNotificationSounds:
return UnmarshalUpdateSavedNotificationSounds(data)
case TypeUpdateSelectedBackground:
return UnmarshalUpdateSelectedBackground(data)
@ -15411,6 +15644,12 @@ func UnmarshalType(data json.RawMessage) (Type, error) {
case TypeUpdateUsersNearby:
return UnmarshalUpdateUsersNearby(data)
case TypeUpdateAttachmentMenuBots:
return UnmarshalUpdateAttachmentMenuBots(data)
case TypeUpdateWebAppMessageSent:
return UnmarshalUpdateWebAppMessageSent(data)
case TypeUpdateReactions:
return UnmarshalUpdateReactions(data)