From 07c4812e993d6a57b3636cec47437d6f08ba7c0f Mon Sep 17 00:00:00 2001 From: Afshin Arani Date: Fri, 3 Apr 2020 11:53:02 +0430 Subject: [PATCH] api: Update to Layer 108 --- .../{TLAbsPassword.cs => TLAbsThemes.cs} | 2 +- .../TL/Account/TLAbsWallPapers.cs | 13 ++ .../TL/Account/TLAuthorizationForm.cs | 62 ++++++++ .../TL/Account/TLAutoDownloadSettings.cs | 48 ++++++ .../{TLNoPassword.cs => TLContentSettings.cs} | 21 +-- src/TeleSharp.TL/TL/Account/TLPassword.cs | 78 +++++++-- .../TL/Account/TLPasswordInputSettings.cs | 26 +-- .../TL/Account/TLPasswordSettings.cs | 24 ++- src/TeleSharp.TL/TL/Account/TLPrivacyRules.cs | 7 +- .../Account/TLRequestAcceptAuthorization.cs | 60 +++++++ .../Account/TLRequestCancelPasswordEmail.cs | 45 ++++++ .../Account/TLRequestConfirmPasswordEmail.cs | 48 ++++++ .../TL/Account/TLRequestCreateTheme.cs | 70 ++++++++ .../TLRequestDeleteSecureValue.cs} | 17 +- .../Account/TLRequestFinishTakeoutSession.cs | 51 ++++++ .../TL/Account/TLRequestGetAllSecureValues.cs | 45 ++++++ .../Account/TLRequestGetAuthorizationForm.cs | 54 +++++++ .../TLRequestGetAutoDownloadSettings.cs | 45 ++++++ .../TLRequestGetContactSignUpNotification.cs | 45 ++++++ .../TL/Account/TLRequestGetContentSettings.cs | 45 ++++++ .../TL/Account/TLRequestGetMultiWallPapers.cs | 48 ++++++ .../Account/TLRequestGetNotifyExceptions.cs | 59 +++++++ .../TL/Account/TLRequestGetNotifySettings.cs | 4 +- .../TL/Account/TLRequestGetPassword.cs | 4 +- .../Account/TLRequestGetPasswordSettings.cs | 10 +- .../TL/Account/TLRequestGetSecureValue.cs | 48 ++++++ .../TL/Account/TLRequestGetTheme.cs | 54 +++++++ .../TL/Account/TLRequestGetThemes.cs | 51 ++++++ .../TL/Account/TLRequestGetTmpPassword.cs | 10 +- .../TL/Account/TLRequestGetWallPaper.cs | 48 ++++++ .../TL/Account/TLRequestGetWallPapers.cs | 11 +- .../Account/TLRequestGetWebAuthorizations.cs | 45 ++++++ .../TL/Account/TLRequestInitTakeoutSession.cs | 74 +++++++++ .../TL/Account/TLRequestInstallTheme.cs | 67 ++++++++ .../TL/Account/TLRequestInstallWallPaper.cs | 51 ++++++ .../TL/Account/TLRequestRegisterDevice.cs | 19 ++- .../Account/TLRequestResendPasswordEmail.cs | 45 ++++++ .../TL/Account/TLRequestResetWallPapers.cs | 45 ++++++ .../Account/TLRequestResetWebAuthorization.cs | 48 ++++++ .../TLRequestResetWebAuthorizations.cs | 45 ++++++ .../TLRequestSaveAutoDownloadSettings.cs | 57 +++++++ .../TL/Account/TLRequestSaveSecureValue.cs | 51 ++++++ .../TL/Account/TLRequestSaveTheme.cs | 51 ++++++ .../TL/Account/TLRequestSaveWallPaper.cs | 54 +++++++ .../Account/TLRequestSendChangePhoneCode.cs | 25 +-- .../Account/TLRequestSendConfirmPhoneCode.cs | 25 +-- .../Account/TLRequestSendVerifyEmailCode.cs | 48 ++++++ .../TLRequestSendVerifyPhoneCode.cs} | 15 +- .../TLRequestSetContactSignUpNotification.cs | 48 ++++++ .../TL/Account/TLRequestSetContentSettings.cs | 51 ++++++ .../TL/Account/TLRequestUnregisterDevice.cs | 7 +- .../TLRequestUpdatePasswordSettings.cs | 10 +- .../TL/Account/TLRequestUpdateProfile.cs | 5 - .../TL/Account/TLRequestUpdateTheme.cs | 86 ++++++++++ .../TLRequestUploadTheme.cs} | 39 +++-- .../TL/Account/TLRequestUploadWallPaper.cs | 54 +++++++ .../TL/Account/TLRequestVerifyEmail.cs | 51 ++++++ .../TL/Account/TLRequestVerifyPhone.cs | 54 +++++++ .../TL/Account/TLSentEmailCode.cs | 45 ++++++ src/TeleSharp.TL/TL/Account/TLTakeout.cs | 42 +++++ src/TeleSharp.TL/TL/Account/TLThemes.cs | 45 ++++++ .../TL/Account/TLThemesNotModified.cs | 39 +++++ src/TeleSharp.TL/TL/Account/TLWallPapers.cs | 45 ++++++ .../TL/Account/TLWallPapersNotModified.cs | 39 +++++ .../TL/Account/TLWebAuthorizations.cs | 45 ++++++ .../TL/Auth/TLAbsAuthorization.cs | 13 ++ src/TeleSharp.TL/TL/Auth/TLAbsLoginToken.cs | 13 ++ src/TeleSharp.TL/TL/Auth/TLAuthorization.cs | 5 +- .../TL/Auth/TLAuthorizationSignUpRequired.cs | 50 ++++++ src/TeleSharp.TL/TL/Auth/TLLoginToken.cs | 45 ++++++ .../TL/Auth/TLLoginTokenMigrateTo.cs | 45 ++++++ ...CheckedPhone.cs => TLLoginTokenSuccess.cs} | 12 +- .../TL/Auth/TLRequestAcceptLoginToken.cs | 48 ++++++ .../TL/Auth/TLRequestCheckPassword.cs | 14 +- .../TL/Auth/TLRequestExportLoginToken.cs | 54 +++++++ .../TL/Auth/TLRequestImportAuthorization.cs | 4 +- .../Auth/TLRequestImportBotAuthorization.cs | 6 +- .../TL/Auth/TLRequestImportLoginToken.cs | 48 ++++++ .../TL/Auth/TLRequestRecoverPassword.cs | 4 +- src/TeleSharp.TL/TL/Auth/TLRequestSendCode.cs | 25 +-- src/TeleSharp.TL/TL/Auth/TLRequestSignIn.cs | 4 +- src/TeleSharp.TL/TL/Auth/TLRequestSignUp.cs | 7 +- src/TeleSharp.TL/TL/Auth/TLSentCode.cs | 8 - .../TL/Channels/TLAbsChannelParticipants.cs | 13 ++ .../TL/Channels/TLAdminLogResults.cs | 48 ++++++ .../TL/Channels/TLChannelParticipants.cs | 2 +- .../TLChannelParticipantsNotModified.cs | 39 +++++ .../TL/Channels/TLRequestCreateChannel.cs | 24 ++- ...EditAbout.cs => TLRequestDeleteHistory.cs} | 12 +- .../TL/Channels/TLRequestEditAdmin.cs | 13 +- ...kFromChannel.cs => TLRequestEditBanned.cs} | 12 +- .../TL/Channels/TLRequestEditCreator.cs | 54 +++++++ .../TL/Channels/TLRequestEditLocation.cs | 54 +++++++ .../TL/Channels/TLRequestExportMessageLink.cs | 7 +- .../TL/Channels/TLRequestGetAdminLog.cs | 79 ++++++++++ .../TLRequestGetAdminedPublicChannels.cs | 13 +- .../TLRequestGetGroupsForDiscussion.cs | 45 ++++++ .../Channels/TLRequestGetInactiveChannels.cs | 45 ++++++ .../TL/Channels/TLRequestGetLeftChannels.cs | 48 ++++++ .../TL/Channels/TLRequestGetMessages.cs | 8 +- .../TL/Channels/TLRequestGetParticipants.cs | 11 +- .../Channels/TLRequestReadMessageContents.cs | 51 ++++++ .../Channels/TLRequestSetDiscussionGroup.cs | 51 ++++++ .../TL/Channels/TLRequestSetStickers.cs | 51 ++++++ ....cs => TLRequestTogglePreHistoryHidden.cs} | 6 +- ...rtInvite.cs => TLRequestToggleSlowMode.cs} | 13 +- src/TeleSharp.TL/TL/Contacts/TLContacts.cs | 7 +- src/TeleSharp.TL/TL/Contacts/TLFound.cs | 7 +- .../TL/Contacts/TLImportedContacts.cs | 7 +- src/TeleSharp.TL/TL/Contacts/TLLink.cs | 48 ------ ...teContact.cs => TLRequestAcceptContact.cs} | 10 +- .../TL/Contacts/TLRequestAddContact.cs | 63 ++++++++ ...portCard.cs => TLRequestDeleteByPhones.cs} | 16 +- .../TL/Contacts/TLRequestDeleteContacts.cs | 8 +- ...xportCard.cs => TLRequestGetContactIDs.cs} | 9 +- .../TL/Contacts/TLRequestGetContacts.cs | 10 +- .../TL/Contacts/TLRequestGetLocated.cs | 48 ++++++ .../TL/Contacts/TLRequestGetSaved.cs | 45 ++++++ .../TL/Contacts/TLRequestGetTopPeers.cs | 14 +- .../TL/Contacts/TLRequestImportContacts.cs | 7 +- .../TL/Contacts/TLRequestResetSaved.cs | 45 ++++++ .../TLRequestToggleTopPeers.cs} | 15 +- .../TL/Contacts/TLTopPeersDisabled.cs | 39 +++++ .../TL/Folders/TLRequestDeleteFolder.cs | 48 ++++++ .../TL/Folders/TLRequestEditPeerFolders.cs | 48 ++++++ src/TeleSharp.TL/TL/Help/TLAbsDeepLinkInfo.cs | 13 ++ .../TL/Help/TLAbsPassportConfig.cs | 13 ++ src/TeleSharp.TL/TL/Help/TLAbsProxyData.cs | 13 ++ .../TL/Help/TLAbsTermsOfServiceUpdate.cs | 13 ++ src/TeleSharp.TL/TL/Help/TLAbsUserInfo.cs | 13 ++ src/TeleSharp.TL/TL/Help/TLAppUpdate.cs | 38 ++++- src/TeleSharp.TL/TL/Help/TLDeepLinkInfo.cs | 56 +++++++ .../TL/Help/TLDeepLinkInfoEmpty.cs | 39 +++++ src/TeleSharp.TL/TL/Help/TLPassportConfig.cs | 45 ++++++ .../TL/Help/TLPassportConfigNotModified.cs | 39 +++++ src/TeleSharp.TL/TL/Help/TLProxyDataEmpty.cs | 42 +++++ src/TeleSharp.TL/TL/Help/TLProxyDataPromo.cs | 51 ++++++ src/TeleSharp.TL/TL/Help/TLRecentMeUrls.cs | 48 ++++++ .../TL/Help/TLRequestAcceptTermsOfService.cs | 48 ++++++ .../TL/Help/TLRequestEditUserInfo.cs | 54 +++++++ ...sOfService.cs => TLRequestGetAppConfig.cs} | 10 +- .../TL/Help/TLRequestGetAppUpdate.cs | 7 +- .../TL/Help/TLRequestGetDeepLinkInfo.cs | 48 ++++++ .../TL/Help/TLRequestGetPassportConfig.cs | 48 ++++++ .../TL/Help/TLRequestGetProxyData.cs | 45 ++++++ .../TL/Help/TLRequestGetRecentMeUrls.cs | 48 ++++++ .../TL/Help/TLRequestGetSupportName.cs | 45 ++++++ .../Help/TLRequestGetTermsOfServiceUpdate.cs | 45 ++++++ .../TL/Help/TLRequestGetUserInfo.cs | 48 ++++++ src/TeleSharp.TL/TL/Help/TLSupportName.cs | 42 +++++ src/TeleSharp.TL/TL/Help/TLTermsOfService.cs | 24 ++- .../TL/Help/TLTermsOfServiceUpdate.cs | 45 ++++++ .../TL/Help/TLTermsOfServiceUpdateEmpty.cs | 42 +++++ src/TeleSharp.TL/TL/Help/TLUserInfo.cs | 51 ++++++ src/TeleSharp.TL/TL/Help/TLUserInfoEmpty.cs | 39 +++++ .../TL/Langpack/TLRequestGetDifference.cs | 54 +++++++ .../TL/Langpack/TLRequestGetLangPack.cs | 51 ++++++ .../TL/Langpack/TLRequestGetLanguage.cs | 51 ++++++ .../TL/Langpack/TLRequestGetLanguages.cs | 48 ++++++ .../TL/Langpack/TLRequestGetStrings.cs | 54 +++++++ .../TL/Messages/TLAbsFavedStickers.cs | 13 ++ .../TL/Messages/TLAbsFoundStickerSets.cs | 13 ++ .../TL/Messages/TLBotCallbackAnswer.cs | 9 +- src/TeleSharp.TL/TL/Messages/TLBotResults.cs | 12 +- .../TL/Messages/TLChannelMessages.cs | 5 +- src/TeleSharp.TL/TL/Messages/TLDialogs.cs | 4 +- .../TL/Messages/TLDialogsNotModified.cs | 42 +++++ .../TL/Messages/TLDialogsSlice.cs | 4 +- .../TL/Messages/TLFavedStickers.cs | 48 ++++++ .../TLFavedStickersNotModified.cs} | 8 +- .../TL/Messages/TLFoundStickerSets.cs | 45 ++++++ .../Messages/TLFoundStickerSetsNotModified.cs | 39 +++++ .../TL/Messages/TLInactiveChats.cs | 48 ++++++ .../TL/Messages/TLMessageEditData.cs | 3 - .../TL/Messages/TLMessagesNotModified.cs | 42 +++++ .../TL/Messages/TLMessagesSlice.cs | 18 ++- src/TeleSharp.TL/TL/Messages/TLPeerDialogs.cs | 4 +- .../TL/Messages/TLRecentStickers.cs | 10 +- .../TL/Messages/TLRequestAcceptUrlAuth.cs | 60 +++++++ .../TL/Messages/TLRequestClearAllDrafts.cs | 45 ++++++ .../Messages/TLRequestClearRecentStickers.cs | 3 - .../TL/Messages/TLRequestDeleteHistory.cs | 6 +- .../TL/Messages/TLRequestDeleteMessages.cs | 3 - .../TLRequestDeleteScheduledMessages.cs | 51 ++++++ .../TL/Messages/TLRequestEditChatAbout.cs | 51 ++++++ .../TLRequestEditChatDefaultBannedRights.cs | 51 ++++++ .../Messages/TLRequestEditInlineBotMessage.cs | 18 ++- .../TL/Messages/TLRequestEditMessage.cs | 26 ++- .../TL/Messages/TLRequestExportChatInvite.cs | 10 +- .../TL/Messages/TLRequestFaveSticker.cs | 51 ++++++ .../TL/Messages/TLRequestForwardMessages.cs | 20 ++- .../Messages/TLRequestGetArchivedStickers.cs | 3 - .../Messages/TLRequestGetBotCallbackAnswer.cs | 4 - .../Messages/TLRequestGetDialogUnreadMarks.cs | 45 ++++++ .../TL/Messages/TLRequestGetDialogs.cs | 18 ++- .../TL/Messages/TLRequestGetEmojiKeywords.cs | 48 ++++++ .../TLRequestGetEmojiKeywordsDifference.cs | 51 ++++++ .../TLRequestGetEmojiKeywordsLanguages.cs | 48 ++++++ .../TL/Messages/TLRequestGetEmojiURL.cs | 48 ++++++ .../TL/Messages/TLRequestGetFavedStickers.cs | 48 ++++++ .../TL/Messages/TLRequestGetHistory.cs | 7 +- .../Messages/TLRequestGetInlineBotResults.cs | 3 - .../TL/Messages/TLRequestGetMessages.cs | 8 +- .../TL/Messages/TLRequestGetOnlines.cs | 48 ++++++ .../TL/Messages/TLRequestGetPeerDialogs.cs | 8 +- .../TL/Messages/TLRequestGetPinnedDialogs.cs | 7 +- .../TL/Messages/TLRequestGetPollResults.cs | 51 ++++++ .../Messages/TLRequestGetRecentLocations.cs | 54 +++++++ .../TL/Messages/TLRequestGetRecentStickers.cs | 3 - .../Messages/TLRequestGetScheduledHistory.cs | 51 ++++++ .../Messages/TLRequestGetScheduledMessages.cs | 51 ++++++ .../TL/Messages/TLRequestGetSearchCounters.cs | 51 ++++++ .../TL/Messages/TLRequestGetSplitRanges.cs | 45 ++++++ .../TL/Messages/TLRequestGetStatsURL.cs | 57 +++++++ .../TL/Messages/TLRequestGetStickers.cs | 51 ++++++ .../TL/Messages/TLRequestGetUnreadMentions.cs | 63 ++++++++ .../TL/Messages/TLRequestGetWebPagePreview.cs | 15 +- ...pam.cs => TLRequestHidePeerSettingsBar.cs} | 6 +- .../TL/Messages/TLRequestMarkDialogUnread.cs | 54 +++++++ .../TL/Messages/TLRequestReadMentions.cs | 48 ++++++ .../Messages/TLRequestReorderPinnedDialogs.cs | 14 +- .../Messages/TLRequestReorderStickerSets.cs | 3 - .../TL/Messages/TLRequestReport.cs | 54 +++++++ .../TL/Messages/TLRequestRequestUrlAuth.cs | 54 +++++++ .../TL/Messages/TLRequestSaveDraft.cs | 5 - .../TL/Messages/TLRequestSaveRecentSticker.cs | 3 - .../TL/Messages/TLRequestSearch.cs | 35 ++-- .../TL/Messages/TLRequestSearchGlobal.cs | 21 ++- .../TL/Messages/TLRequestSearchStickerSets.cs | 57 +++++++ .../Messages/TLRequestSendInlineBotResult.cs | 21 ++- .../TL/Messages/TLRequestSendMedia.cs | 30 ++-- .../TL/Messages/TLRequestSendMessage.cs | 21 ++- .../TL/Messages/TLRequestSendMultiMedia.cs | 79 ++++++++++ .../TLRequestSendScheduledMessages.cs | 51 ++++++ ...=> TLRequestSendScreenshotNotification.cs} | 12 +- .../TL/Messages/TLRequestSendVote.cs | 54 +++++++ .../Messages/TLRequestSetBotCallbackAnswer.cs | 5 - .../TLRequestSetBotPrecheckoutResults.cs | 4 - .../TLRequestSetBotShippingResults.cs | 4 - .../TL/Messages/TLRequestSetGameScore.cs | 4 - .../Messages/TLRequestSetInlineBotResults.cs | 6 - .../Messages/TLRequestSetInlineGameScore.cs | 4 - .../TL/Messages/TLRequestToggleDialogPin.cs | 11 +- .../TLRequestUpdatePinnedMessage.cs | 15 +- .../Messages/TLRequestUploadEncryptedFile.cs | 51 ++++++ .../TL/Messages/TLSearchCounter.cs | 51 ++++++ src/TeleSharp.TL/TL/Messages/TLStickerSet.cs | 4 +- src/TeleSharp.TL/TL/Messages/TLStickers.cs | 10 +- src/TeleSharp.TL/TL/Payments/TLPaymentForm.cs | 8 - .../TL/Payments/TLPaymentReceipt.cs | 4 - ...eded.cs => TLPaymentVerificationNeeded.cs} | 6 +- .../TL/Payments/TLRequestClearSavedInfo.cs | 4 - .../TL/Payments/TLRequestSendPaymentForm.cs | 4 - .../TLRequestValidateRequestedInfo.cs | 3 - src/TeleSharp.TL/TL/Payments/TLSavedInfo.cs | 4 - .../TL/Payments/TLValidatedRequestedInfo.cs | 4 - .../TL/Phone/TLRequestDiscardCall.cs | 10 +- .../TL/Phone/TLRequestRequestCall.cs | 10 +- .../TL/Phone/TLRequestSetCallRating.cs | 10 +- .../TLRequestChangeStickerPosition.cs | 8 +- .../TL/Stickers/TLRequestCreateStickerSet.cs | 3 - .../Stickers/TLRequestRemoveStickerFromSet.cs | 8 +- ...{TLAbsContactLink.cs => TLAbsBaseTheme.cs} | 2 +- ....cs => TLAbsChannelAdminLogEventAction.cs} | 2 +- ...otifyEvents.cs => TLAbsChannelLocation.cs} | 2 +- .../TL/{TLAbsPage.cs => TLAbsDialog.cs} | 2 +- ...LAbsFileLocation.cs => TLAbsDialogPeer.cs} | 2 +- src/TeleSharp.TL/TL/TLAbsEmojiKeyword.cs | 13 ++ ...vents.cs => TLAbsInputCheckPasswordSRP.cs} | 2 +- src/TeleSharp.TL/TL/TLAbsInputDialogPeer.cs | 13 ++ src/TeleSharp.TL/TL/TLAbsInputMessage.cs | 13 ++ src/TeleSharp.TL/TL/TLAbsInputSecureFile.cs | 13 ++ src/TeleSharp.TL/TL/TLAbsInputTheme.cs | 13 ++ src/TeleSharp.TL/TL/TLAbsInputWallPaper.cs | 13 ++ .../TL/TLAbsInputWebFileLocation.cs | 13 ++ src/TeleSharp.TL/TL/TLAbsJSONValue.cs | 13 ++ src/TeleSharp.TL/TL/TLAbsLangPackString.cs | 13 ++ src/TeleSharp.TL/TL/TLAbsPageListItem.cs | 13 ++ .../TL/TLAbsPageListOrderedItem.cs | 13 ++ src/TeleSharp.TL/TL/TLAbsPasswordKdfAlgo.cs | 13 ++ .../TL/TLAbsPeerNotifySettings.cs | 13 -- src/TeleSharp.TL/TL/TLAbsRecentMeUrl.cs | 13 ++ src/TeleSharp.TL/TL/TLAbsSecureFile.cs | 13 ++ .../TL/TLAbsSecurePasswordKdfAlgo.cs | 13 ++ src/TeleSharp.TL/TL/TLAbsSecurePlainData.cs | 13 ++ .../TL/TLAbsSecureRequiredType.cs | 13 ++ src/TeleSharp.TL/TL/TLAbsSecureValueError.cs | 13 ++ src/TeleSharp.TL/TL/TLAbsSecureValueType.cs | 13 ++ src/TeleSharp.TL/TL/TLAbsUrlAuthResult.cs | 13 ++ src/TeleSharp.TL/TL/TLAbsWebDocument.cs | 13 ++ src/TeleSharp.TL/TL/TLAuthorization.cs | 19 ++- src/TeleSharp.TL/TL/TLAutoDownloadSettings.cs | 66 ++++++++ ...ontactLinkNone.cs => TLBaseThemeArctic.cs} | 6 +- ...tLinkHasPhone.cs => TLBaseThemeClassic.cs} | 6 +- .../TL/{TLNotifyAll.cs => TLBaseThemeDay.cs} | 6 +- ...tactLinkContact.cs => TLBaseThemeNight.cs} | 6 +- src/TeleSharp.TL/TL/TLBaseThemeTinted.cs | 39 +++++ src/TeleSharp.TL/TL/TLBotInlineMediaResult.cs | 6 - .../TL/TLBotInlineMessageMediaAuto.cs | 21 ++- .../TL/TLBotInlineMessageMediaContact.cs | 10 +- .../TL/TLBotInlineMessageMediaGeo.cs | 10 +- .../TL/TLBotInlineMessageMediaVenue.cs | 10 +- src/TeleSharp.TL/TL/TLBotInlineMessageText.cs | 5 - src/TeleSharp.TL/TL/TLBotInlineResult.cs | 63 ++------ src/TeleSharp.TL/TL/TLChannel.cs | 75 +++++---- ...antEditor.cs => TLChannelAdminLogEvent.cs} | 21 +-- ...TLChannelAdminLogEventActionChangeAbout.cs | 45 ++++++ ...nnelAdminLogEventActionChangeLinkedChat.cs | 45 ++++++ ...hannelAdminLogEventActionChangeLocation.cs | 45 ++++++ ...TLChannelAdminLogEventActionChangePhoto.cs | 45 ++++++ ...nnelAdminLogEventActionChangeStickerSet.cs | 45 ++++++ ...TLChannelAdminLogEventActionChangeTitle.cs | 45 ++++++ ...hannelAdminLogEventActionChangeUsername.cs | 45 ++++++ ...lAdminLogEventActionDefaultBannedRights.cs | 45 ++++++ ...ChannelAdminLogEventActionDeleteMessage.cs | 42 +++++ ...TLChannelAdminLogEventActionEditMessage.cs | 45 ++++++ ...nelAdminLogEventActionParticipantInvite.cs | 42 +++++ ...annelAdminLogEventActionParticipantJoin.cs | 39 +++++ ...nnelAdminLogEventActionParticipantLeave.cs | 39 +++++ ...minLogEventActionParticipantToggleAdmin.cs | 45 ++++++ ...AdminLogEventActionParticipantToggleBan.cs | 45 ++++++ .../TLChannelAdminLogEventActionStopPoll.cs | 42 +++++ ...ChannelAdminLogEventActionToggleInvites.cs | 42 +++++ ...minLogEventActionTogglePreHistoryHidden.cs | 42 +++++ ...nnelAdminLogEventActionToggleSignatures.cs | 42 +++++ ...hannelAdminLogEventActionToggleSlowMode.cs | 45 ++++++ ...LChannelAdminLogEventActionUpdatePinned.cs | 42 +++++ .../TL/TLChannelAdminLogEventsFilter.cs | 84 ++++++++++ src/TeleSharp.TL/TL/TLChannelForbidden.cs | 16 +- src/TeleSharp.TL/TL/TLChannelFull.cs | 108 +++++++++++-- src/TeleSharp.TL/TL/TLChannelLocation.cs | 45 ++++++ src/TeleSharp.TL/TL/TLChannelLocationEmpty.cs | 39 +++++ .../TL/TLChannelMessagesFilter.cs | 3 - .../TL/TLChannelParticipantAdmin.cs | 76 +++++++++ .../TL/TLChannelParticipantBanned.cs | 57 +++++++ .../TL/TLChannelParticipantCreator.cs | 15 +- .../TL/TLChannelParticipantsBanned.cs | 42 +++++ .../TL/TLChannelParticipantsContacts.cs | 42 +++++ .../TL/TLChannelParticipantsKicked.cs | 7 +- .../TL/TLChannelParticipantsSearch.cs | 42 +++++ src/TeleSharp.TL/TL/TLChat.cs | 35 ++-- src/TeleSharp.TL/TL/TLChatAdminRights.cs | 66 ++++++++ src/TeleSharp.TL/TL/TLChatBannedRights.cs | 81 ++++++++++ src/TeleSharp.TL/TL/TLChatFull.cs | 54 ++++++- src/TeleSharp.TL/TL/TLChatInvite.cs | 15 +- src/TeleSharp.TL/TL/TLChatOnlines.cs | 42 +++++ .../TL/TLChatParticipantsForbidden.cs | 3 - src/TeleSharp.TL/TL/TLChatPhoto.cs | 15 +- src/TeleSharp.TL/TL/TLCodeSettings.cs | 51 ++++++ src/TeleSharp.TL/TL/TLConfig.cs | 123 +++++++++++++-- src/TeleSharp.TL/TL/TLDcOption.cs | 21 ++- src/TeleSharp.TL/TL/TLDialog.cs | 29 ++-- src/TeleSharp.TL/TL/TLDialogFolder.cs | 66 ++++++++ src/TeleSharp.TL/TL/TLDialogPeer.cs | 42 +++++ src/TeleSharp.TL/TL/TLDialogPeerFolder.cs | 42 +++++ src/TeleSharp.TL/TL/TLDisabledFeature.cs | 45 ------ src/TeleSharp.TL/TL/TLDocument.cs | 24 ++- .../TL/TLDocumentAttributeAudio.cs | 6 - .../TL/TLDocumentAttributeSticker.cs | 4 - .../TL/TLDocumentAttributeVideo.cs | 6 +- src/TeleSharp.TL/TL/TLDraftMessage.cs | 5 - src/TeleSharp.TL/TL/TLDraftMessageEmpty.cs | 15 +- src/TeleSharp.TL/TL/TLEmojiKeyword.cs | 45 ++++++ src/TeleSharp.TL/TL/TLEmojiKeywordDeleted.cs | 45 ++++++ .../TL/TLEmojiKeywordsDifference.cs | 51 ++++++ src/TeleSharp.TL/TL/TLEmojiLanguage.cs | 42 +++++ src/TeleSharp.TL/TL/TLEmojiURL.cs | 42 +++++ src/TeleSharp.TL/TL/TLExportedMessageLink.cs | 7 +- src/TeleSharp.TL/TL/TLFileHash.cs | 48 ++++++ ...ble.cs => TLFileLocationToBeDeprecated.cs} | 9 +- src/TeleSharp.TL/TL/TLFolder.cs | 65 ++++++++ src/TeleSharp.TL/TL/TLFolderPeer.cs | 45 ++++++ src/TeleSharp.TL/TL/TLGame.cs | 3 - src/TeleSharp.TL/TL/TLGeoPoint.cs | 7 +- src/TeleSharp.TL/TL/TLInputAppEvent.cs | 10 +- .../TL/TLInputBotInlineMessageGame.cs | 3 - .../TL/TLInputBotInlineMessageMediaAuto.cs | 21 ++- .../TL/TLInputBotInlineMessageMediaContact.cs | 10 +- .../TL/TLInputBotInlineMessageMediaGeo.cs | 10 +- .../TL/TLInputBotInlineMessageMediaVenue.cs | 10 +- .../TL/TLInputBotInlineMessageText.cs | 5 - src/TeleSharp.TL/TL/TLInputBotInlineResult.cs | 63 ++------ .../TL/TLInputBotInlineResultDocument.cs | 4 - .../TL/TLInputChannelFromMessage.cs | 48 ++++++ .../TL/TLInputCheckPasswordEmpty.cs | 39 +++++ .../TL/TLInputCheckPasswordSRP.cs | 48 ++++++ src/TeleSharp.TL/TL/TLInputClientProxy.cs | 45 ++++++ src/TeleSharp.TL/TL/TLInputDialogPeer.cs | 42 +++++ .../TL/TLInputDialogPeerFolder.cs | 42 +++++ src/TeleSharp.TL/TL/TLInputDocument.cs | 7 +- .../TL/TLInputDocumentFileLocation.cs | 13 +- src/TeleSharp.TL/TL/TLInputFileLocation.cs | 7 +- src/TeleSharp.TL/TL/TLInputFolderPeer.cs | 45 ++++++ .../TL/TLInputKeyboardButtonUrlAuth.cs | 62 ++++++++ src/TeleSharp.TL/TL/TLInputMediaContact.cs | 7 +- src/TeleSharp.TL/TL/TLInputMediaDocument.cs | 18 ++- .../TL/TLInputMediaDocumentExternal.cs | 18 ++- src/TeleSharp.TL/TL/TLInputMediaGeoLive.cs | 56 +++++++ src/TeleSharp.TL/TL/TLInputMediaInvoice.cs | 10 +- src/TeleSharp.TL/TL/TLInputMediaPhoto.cs | 18 ++- .../TL/TLInputMediaPhotoExternal.cs | 18 ++- src/TeleSharp.TL/TL/TLInputMediaPoll.cs | 42 +++++ .../TL/TLInputMediaUploadedDocument.cs | 29 +++- .../TL/TLInputMediaUploadedPhoto.cs | 18 ++- src/TeleSharp.TL/TL/TLInputMediaVenue.cs | 7 +- src/TeleSharp.TL/TL/TLInputMessageID.cs | 42 +++++ src/TeleSharp.TL/TL/TLInputMessagePinned.cs | 39 +++++ src/TeleSharp.TL/TL/TLInputMessageReplyTo.cs | 42 +++++ ...or.cs => TLInputMessagesFilterContacts.cs} | 6 +- .../TL/TLInputMessagesFilterGeo.cs | 39 +++++ .../TL/TLInputMessagesFilterMyMentions.cs | 39 +++++ .../TL/TLInputMessagesFilterPhoneCalls.cs | 3 - ...LInputMessagesFilterPhotoVideoDocuments.cs | 39 ----- src/TeleSharp.TL/TL/TLInputNotifyAll.cs | 39 ----- .../TL/TLInputNotifyBroadcasts.cs | 39 +++++ .../TL/TLInputPaymentCredentials.cs | 3 - .../TL/TLInputPaymentCredentialsAndroidPay.cs | 45 ++++++ .../TL/TLInputPaymentCredentialsApplePay.cs | 42 +++++ .../TL/TLInputPeerChannelFromMessage.cs | 48 ++++++ .../TL/TLInputPeerNotifyEventsAll.cs | 39 ----- .../TL/TLInputPeerNotifyEventsEmpty.cs | 39 ----- .../TL/TLInputPeerNotifySettings.cs | 50 ++++-- .../TL/TLInputPeerPhotoFileLocation.cs | 54 +++++++ .../TL/TLInputPeerUserFromMessage.cs | 48 ++++++ src/TeleSharp.TL/TL/TLInputPhoto.cs | 7 +- .../TL/TLInputPhotoFileLocation.cs | 51 ++++++ .../TL/TLInputPhotoLegacyFileLocation.cs | 57 +++++++ .../TL/TLInputPrivacyKeyAddedByPhone.cs | 39 +++++ .../TL/TLInputPrivacyKeyForwards.cs | 39 +++++ .../TL/TLInputPrivacyKeyPhoneNumber.cs | 39 +++++ .../TL/TLInputPrivacyKeyPhoneP2P.cs | 39 +++++ .../TL/TLInputPrivacyKeyProfilePhoto.cs | 39 +++++ ...LInputPrivacyValueAllowChatParticipants.cs | 42 +++++ ...putPrivacyValueDisallowChatParticipants.cs | 42 +++++ .../TL/TLInputReportReasonChildAbuse.cs | 39 +++++ .../TL/TLInputReportReasonCopyright.cs | 39 +++++ .../TL/TLInputReportReasonGeoIrrelevant.cs | 39 +++++ src/TeleSharp.TL/TL/TLInputSecureFile.cs | 45 ++++++ .../TL/TLInputSecureFileLocation.cs | 45 ++++++ .../TL/TLInputSecureFileUploaded.cs | 54 +++++++ src/TeleSharp.TL/TL/TLInputSecureValue.cs | 101 ++++++++++++ src/TeleSharp.TL/TL/TLInputSingleMedia.cs | 59 +++++++ .../TL/TLInputStickerSetAnimatedEmoji.cs | 39 +++++ src/TeleSharp.TL/TL/TLInputStickerSetItem.cs | 3 - ...eLocation.cs => TLInputStickerSetThumb.cs} | 15 +- .../TL/TLInputTakeoutFileLocation.cs | 39 +++++ src/TeleSharp.TL/TL/TLInputTheme.cs | 45 ++++++ src/TeleSharp.TL/TL/TLInputThemeSettings.cs | 80 ++++++++++ src/TeleSharp.TL/TL/TLInputThemeSlug.cs | 42 +++++ ...Moderator.cs => TLInputUserFromMessage.cs} | 18 +-- src/TeleSharp.TL/TL/TLInputWallPaper.cs | 45 ++++++ src/TeleSharp.TL/TL/TLInputWallPaperNoFile.cs | 39 +++++ src/TeleSharp.TL/TL/TLInputWallPaperSlug.cs | 42 +++++ .../TL/TLInputWebFileGeoPointLocation.cs | 57 +++++++ src/TeleSharp.TL/TL/TLInputWebFileLocation.cs | 2 +- src/TeleSharp.TL/TL/TLInvoice.cs | 14 +- src/TeleSharp.TL/TL/TLJsonArray.cs | 42 +++++ src/TeleSharp.TL/TL/TLJsonBool.cs | 42 +++++ src/TeleSharp.TL/TL/TLJsonNull.cs | 39 +++++ src/TeleSharp.TL/TL/TLJsonNumber.cs | 42 +++++ src/TeleSharp.TL/TL/TLJsonObject.cs | 42 +++++ src/TeleSharp.TL/TL/TLJsonObjectValue.cs | 45 ++++++ src/TeleSharp.TL/TL/TLJsonString.cs | 42 +++++ .../TL/TLKeyboardButtonSwitchInline.cs | 3 - .../TL/TLKeyboardButtonUrlAuth.cs | 59 +++++++ src/TeleSharp.TL/TL/TLLangPackDifference.cs | 51 ++++++ src/TeleSharp.TL/TL/TLLangPackLanguage.cs | 80 ++++++++++ src/TeleSharp.TL/TL/TLLangPackString.cs | 45 ++++++ .../TL/TLLangPackStringDeleted.cs | 42 +++++ .../TL/TLLangPackStringPluralized.cs | 88 +++++++++++ src/TeleSharp.TL/TL/TLMessage.cs | 53 ++++--- .../TL/TLMessageActionBotAllowed.cs | 42 +++++ .../TL/TLMessageActionContactSignUp.cs | 39 +++++ .../TL/TLMessageActionCustomAction.cs | 42 +++++ .../TL/TLMessageActionPaymentSentMe.cs | 4 - .../TL/TLMessageActionPhoneCall.cs | 7 +- .../TL/TLMessageActionScreenshotTaken.cs | 39 +++++ .../TL/TLMessageActionSecureValuesSent.cs | 42 +++++ .../TL/TLMessageActionSecureValuesSentMe.cs | 45 ++++++ .../TL/TLMessageEntityBlockquote.cs | 45 ++++++ src/TeleSharp.TL/TL/TLMessageEntityCashtag.cs | 45 ++++++ src/TeleSharp.TL/TL/TLMessageEntityPhone.cs | 45 ++++++ src/TeleSharp.TL/TL/TLMessageEntityStrike.cs | 45 ++++++ .../TL/TLMessageEntityUnderline.cs | 45 ++++++ src/TeleSharp.TL/TL/TLMessageFwdHeader.cs | 41 ++++- src/TeleSharp.TL/TL/TLMessageMediaContact.cs | 7 +- src/TeleSharp.TL/TL/TLMessageMediaDocument.cs | 27 +++- src/TeleSharp.TL/TL/TLMessageMediaGeoLive.cs | 45 ++++++ src/TeleSharp.TL/TL/TLMessageMediaInvoice.cs | 10 +- src/TeleSharp.TL/TL/TLMessageMediaPhoto.cs | 27 +++- src/TeleSharp.TL/TL/TLMessageMediaPoll.cs | 45 ++++++ src/TeleSharp.TL/TL/TLMessageMediaVenue.cs | 7 +- src/TeleSharp.TL/TL/TLMessageService.cs | 12 +- src/TeleSharp.TL/TL/TLNotifyBroadcasts.cs | 39 +++++ src/TeleSharp.TL/TL/TLPage.cs | 63 ++++++++ src/TeleSharp.TL/TL/TLPageBlockAudio.cs | 45 ++++++ src/TeleSharp.TL/TL/TLPageBlockCollage.cs | 8 +- .../{TLPageFull.cs => TLPageBlockDetails.cs} | 21 +-- src/TeleSharp.TL/TL/TLPageBlockEmbed.cs | 37 +++-- src/TeleSharp.TL/TL/TLPageBlockEmbedPost.cs | 8 +- src/TeleSharp.TL/TL/TLPageBlockKicker.cs | 42 +++++ src/TeleSharp.TL/TL/TLPageBlockList.cs | 11 +- src/TeleSharp.TL/TL/TLPageBlockMap.cs | 54 +++++++ src/TeleSharp.TL/TL/TLPageBlockOrderedList.cs | 42 +++++ src/TeleSharp.TL/TL/TLPageBlockPhoto.cs | 27 +++- .../TL/TLPageBlockRelatedArticles.cs | 45 ++++++ src/TeleSharp.TL/TL/TLPageBlockSlideshow.cs | 8 +- src/TeleSharp.TL/TL/TLPageBlockTable.cs | 54 +++++++ src/TeleSharp.TL/TL/TLPageBlockVideo.cs | 12 +- src/TeleSharp.TL/TL/TLPageCaption.cs | 45 ++++++ src/TeleSharp.TL/TL/TLPageListItemBlocks.cs | 42 +++++ src/TeleSharp.TL/TL/TLPageListItemText.cs | 42 +++++ ...Part.cs => TLPageListOrderedItemBlocks.cs} | 15 +- .../TL/TLPageListOrderedItemText.cs | 45 ++++++ src/TeleSharp.TL/TL/TLPageRelatedArticle.cs | 88 +++++++++++ src/TeleSharp.TL/TL/TLPageTableCell.cs | 81 ++++++++++ src/TeleSharp.TL/TL/TLPageTableRow.cs | 42 +++++ ...6PBKDF2HMACSHA512iter100000SHA256ModPow.cs | 51 ++++++ .../TL/TLPasswordKdfAlgoUnknown.cs | 39 +++++ src/TeleSharp.TL/TL/TLPaymentRequestedInfo.cs | 6 - src/TeleSharp.TL/TL/TLPeerLocated.cs | 48 ++++++ src/TeleSharp.TL/TL/TLPeerNotifyEventsAll.cs | 39 ----- src/TeleSharp.TL/TL/TLPeerNotifySettings.cs | 52 +++--- .../TL/TLPeerNotifySettingsEmpty.cs | 39 ----- src/TeleSharp.TL/TL/TLPeerSettings.cs | 18 ++- src/TeleSharp.TL/TL/TLPhoneCall.cs | 19 ++- src/TeleSharp.TL/TL/TLPhoneCallAccepted.cs | 10 +- src/TeleSharp.TL/TL/TLPhoneCallDiscarded.cs | 9 +- src/TeleSharp.TL/TL/TLPhoneCallProtocol.cs | 4 - src/TeleSharp.TL/TL/TLPhoneCallRequested.cs | 10 +- src/TeleSharp.TL/TL/TLPhoneCallWaiting.cs | 6 +- src/TeleSharp.TL/TL/TLPhoto.cs | 13 +- src/TeleSharp.TL/TL/TLPhotoCachedSize.cs | 4 +- src/TeleSharp.TL/TL/TLPhotoSize.cs | 4 +- src/TeleSharp.TL/TL/TLPhotoStrippedSize.cs | 45 ++++++ src/TeleSharp.TL/TL/TLPoll.cs | 63 ++++++++ src/TeleSharp.TL/TL/TLPollAnswer.cs | 45 ++++++ src/TeleSharp.TL/TL/TLPollAnswerVoters.cs | 54 +++++++ src/TeleSharp.TL/TL/TLPollResults.cs | 61 +++++++ src/TeleSharp.TL/TL/TLPopularContact.cs | 45 ++++++ .../TL/TLPrivacyKeyAddedByPhone.cs | 39 +++++ src/TeleSharp.TL/TL/TLPrivacyKeyForwards.cs | 39 +++++ ...kUnknown.cs => TLPrivacyKeyPhoneNumber.cs} | 6 +- src/TeleSharp.TL/TL/TLPrivacyKeyPhoneP2P.cs | 39 +++++ .../TL/TLPrivacyKeyProfilePhoto.cs | 39 +++++ .../TL/TLPrivacyValueAllowChatParticipants.cs | 42 +++++ .../TLPrivacyValueDisallowChatParticipants.cs | 42 +++++ .../TL/TLReceivedNotifyMessage.cs | 4 +- src/TeleSharp.TL/TL/TLRecentMeUrlChat.cs | 45 ++++++ .../TL/TLRecentMeUrlChatInvite.cs | 45 ++++++ .../TL/TLRecentMeUrlStickerSet.cs | 45 ++++++ src/TeleSharp.TL/TL/TLRecentMeUrlUnknown.cs | 42 +++++ ...ticipantKicked.cs => TLRecentMeUrlUser.cs} | 15 +- .../TL/TLReplyKeyboardForceReply.cs | 4 - src/TeleSharp.TL/TL/TLReplyKeyboardHide.cs | 3 - src/TeleSharp.TL/TL/TLReplyKeyboardMarkup.cs | 5 - .../TL/TLRequestInitConnection.cs | 29 +++- .../TL/TLRequestInvokeWithMessagesRange.cs | 51 ++++++ .../TL/TLRequestInvokeWithTakeout.cs | 51 ++++++ src/TeleSharp.TL/TL/TLRestrictionReason.cs | 48 ++++++ src/TeleSharp.TL/TL/TLSavedPhoneContact.cs | 51 ++++++ .../TL/TLSecureCredentialsEncrypted.cs | 48 ++++++ src/TeleSharp.TL/TL/TLSecureData.cs | 48 ++++++ src/TeleSharp.TL/TL/TLSecureFile.cs | 60 +++++++ src/TeleSharp.TL/TL/TLSecureFileEmpty.cs | 39 +++++ ...sswordKdfAlgoPBKDF2HMACSHA512iter100000.cs | 42 +++++ .../TL/TLSecurePasswordKdfAlgoSHA512.cs | 42 +++++ .../TL/TLSecurePasswordKdfAlgoUnknown.cs | 39 +++++ src/TeleSharp.TL/TL/TLSecurePlainEmail.cs | 42 +++++ src/TeleSharp.TL/TL/TLSecurePlainPhone.cs | 42 +++++ src/TeleSharp.TL/TL/TLSecureRequiredType.cs | 54 +++++++ .../TL/TLSecureRequiredTypeOneOf.cs | 42 +++++ src/TeleSharp.TL/TL/TLSecureSecretSettings.cs | 48 ++++++ src/TeleSharp.TL/TL/TLSecureValue.cs | 104 ++++++++++++ src/TeleSharp.TL/TL/TLSecureValueError.cs | 48 ++++++ src/TeleSharp.TL/TL/TLSecureValueErrorData.cs | 51 ++++++ src/TeleSharp.TL/TL/TLSecureValueErrorFile.cs | 48 ++++++ .../TL/TLSecureValueErrorFiles.cs | 48 ++++++ .../TL/TLSecureValueErrorFrontSide.cs | 48 ++++++ .../TL/TLSecureValueErrorReverseSide.cs | 48 ++++++ .../TL/TLSecureValueErrorSelfie.cs | 48 ++++++ .../TL/TLSecureValueErrorTranslationFile.cs | 48 ++++++ .../TL/TLSecureValueErrorTranslationFiles.cs | 48 ++++++ src/TeleSharp.TL/TL/TLSecureValueHash.cs | 45 ++++++ .../TL/TLSecureValueTypeAddress.cs | 39 +++++ .../TL/TLSecureValueTypeBankStatement.cs | 39 +++++ .../TL/TLSecureValueTypeDriverLicense.cs | 39 +++++ src/TeleSharp.TL/TL/TLSecureValueTypeEmail.cs | 39 +++++ ...or.cs => TLSecureValueTypeIdentityCard.cs} | 6 +- .../TL/TLSecureValueTypeInternalPassport.cs | 39 +++++ ...eEmpty.cs => TLSecureValueTypePassport.cs} | 6 +- .../TLSecureValueTypePassportRegistration.cs | 39 +++++ .../TL/TLSecureValueTypePersonalDetails.cs | 39 +++++ src/TeleSharp.TL/TL/TLSecureValueTypePhone.cs | 39 +++++ .../TL/TLSecureValueTypeRentalAgreement.cs | 39 +++++ .../TLSecureValueTypeTemporaryRegistration.cs | 39 +++++ .../TL/TLSecureValueTypeUtilityBill.cs | 39 +++++ src/TeleSharp.TL/TL/TLStatsURL.cs | 42 +++++ src/TeleSharp.TL/TL/TLStickerSet.cs | 38 +++-- src/TeleSharp.TL/TL/TLTextAnchor.cs | 45 ++++++ src/TeleSharp.TL/TL/TLTextImage.cs | 48 ++++++ src/TeleSharp.TL/TL/TLTextMarked.cs | 42 +++++ src/TeleSharp.TL/TL/TLTextPhone.cs | 45 ++++++ src/TeleSharp.TL/TL/TLTextSubscript.cs | 42 +++++ src/TeleSharp.TL/TL/TLTextSuperscript.cs | 42 +++++ src/TeleSharp.TL/TL/TLTheme.cs | 79 ++++++++++ src/TeleSharp.TL/TL/TLThemeSettings.cs | 72 +++++++++ .../TL/TLTopPeerCategoryForwardChats.cs | 39 +++++ .../TL/TLTopPeerCategoryForwardUsers.cs | 39 +++++ .../TL/TLTopPeerCategoryPhoneCalls.cs | 39 +++++ .../TL/TLUpdateBotCallbackQuery.cs | 4 - src/TeleSharp.TL/TL/TLUpdateBotInlineQuery.cs | 3 - src/TeleSharp.TL/TL/TLUpdateBotInlineSend.cs | 4 - .../TL/TLUpdateBotPrecheckoutQuery.cs | 4 - .../TL/TLUpdateChannelAvailableMessages.cs | 45 ++++++ .../TL/TLUpdateChannelReadMessagesContents.cs | 45 ++++++ src/TeleSharp.TL/TL/TLUpdateChannelTooLong.cs | 3 - .../TL/TLUpdateChatDefaultBannedRights.cs | 48 ++++++ ...Admins.cs => TLUpdateChatPinnedMessage.cs} | 12 +- src/TeleSharp.TL/TL/TLUpdateContactLink.cs | 48 ------ src/TeleSharp.TL/TL/TLUpdateContactsReset.cs | 39 +++++ .../TL/TLUpdateDeleteScheduledMessages.cs | 45 ++++++ src/TeleSharp.TL/TL/TLUpdateDialogPinned.cs | 19 ++- .../TL/TLUpdateDialogUnreadMark.cs | 48 ++++++ src/TeleSharp.TL/TL/TLUpdateFavedStickers.cs | 39 +++++ src/TeleSharp.TL/TL/TLUpdateFolderPeers.cs | 48 ++++++ src/TeleSharp.TL/TL/TLUpdateGeoLiveViewed.cs | 45 ++++++ .../TL/TLUpdateInlineBotCallbackQuery.cs | 4 - src/TeleSharp.TL/TL/TLUpdateLangPack.cs | 42 +++++ .../TL/TLUpdateLangPackTooLong.cs | 42 +++++ src/TeleSharp.TL/TL/TLUpdateLoginToken.cs | 39 +++++ src/TeleSharp.TL/TL/TLUpdateMessagePoll.cs | 56 +++++++ .../TL/TLUpdateNewScheduledMessage.cs | 42 +++++ src/TeleSharp.TL/TL/TLUpdateNotifySettings.cs | 4 +- src/TeleSharp.TL/TL/TLUpdatePeerLocated.cs | 42 +++++ src/TeleSharp.TL/TL/TLUpdatePeerSettings.cs | 45 ++++++ src/TeleSharp.TL/TL/TLUpdatePinnedDialogs.cs | 19 ++- .../TL/TLUpdateReadChannelInbox.cs | 21 ++- .../TL/TLUpdateReadHistoryInbox.cs | 18 ++- .../TL/TLUpdateServiceNotification.cs | 4 - .../TL/TLUpdateShortChatMessage.cs | 10 -- src/TeleSharp.TL/TL/TLUpdateShortMessage.cs | 10 -- .../TL/TLUpdateShortSentMessage.cs | 5 - .../TL/TLUpdateStickerSetsOrder.cs | 3 - src/TeleSharp.TL/TL/TLUpdateTheme.cs | 42 +++++ ...stered.cs => TLUpdateUserPinnedMessage.cs} | 12 +- .../TL/TLUrlAuthResultAccepted.cs | 42 +++++ src/TeleSharp.TL/TL/TLUrlAuthResultDefault.cs | 39 +++++ src/TeleSharp.TL/TL/TLUrlAuthResultRequest.cs | 51 ++++++ src/TeleSharp.TL/TL/TLUser.cs | 40 ++--- src/TeleSharp.TL/TL/TLUserFull.cs | 44 ++++-- src/TeleSharp.TL/TL/TLUserProfilePhoto.cs | 15 +- src/TeleSharp.TL/TL/TLVector.cs | 18 +-- src/TeleSharp.TL/TL/TLWallPaper.cs | 49 ++++-- src/TeleSharp.TL/TL/TLWallPaperNoFile.cs | 56 +++++++ src/TeleSharp.TL/TL/TLWallPaperSettings.cs | 80 ++++++++++ src/TeleSharp.TL/TL/TLWallPaperSolid.cs | 51 ------ src/TeleSharp.TL/TL/TLWebAuthorization.cs | 66 ++++++++ src/TeleSharp.TL/TL/TLWebDocument.cs | 9 +- src/TeleSharp.TL/TL/TLWebDocumentNoProxy.cs | 51 ++++++ src/TeleSharp.TL/TL/TLWebPage.cs | 31 ++-- .../TL/TLWebPageAttributeTheme.cs | 58 +++++++ .../TL/Updates/TLChannelDifference.cs | 4 - .../TL/Updates/TLChannelDifferenceEmpty.cs | 4 - .../TL/Updates/TLChannelDifferenceTooLong.cs | 26 +-- .../Updates/TLRequestGetChannelDifference.cs | 3 - .../TL/Updates/TLRequestGetDifference.cs | 3 - .../TL/Upload/TLFileCdnRedirect.cs | 7 +- .../TL/Upload/TLRequestGetCdnFileHashes.cs | 51 ++++++ .../TL/Upload/TLRequestGetFile.cs | 13 +- .../TL/Upload/TLRequestGetFileHashes.cs | 51 ++++++ .../TL/Upload/TLRequestGetWebFile.cs | 4 +- .../TL/Upload/TLRequestReuploadCdnFile.cs | 8 +- .../TL/Users/TLRequestSetSecureValueErrors.cs | 51 ++++++ src/TeleSharp.TL/TeleSharp.TL.csproj | 2 +- src/TgSharp.Core/TelegramClient.cs | 149 ++++++------------ src/TgSharp.Tests.NUnit/Test.cs | 13 -- src/TgSharp.Tests.VS/TgSharpTestsVs.cs | 12 -- src/TgSharp.Tests/TgSharpTests.cs | 62 ++------ 679 files changed, 20064 insertions(+), 2181 deletions(-) rename src/TeleSharp.TL/TL/Account/{TLAbsPassword.cs => TLAbsThemes.cs} (79%) create mode 100644 src/TeleSharp.TL/TL/Account/TLAbsWallPapers.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLAuthorizationForm.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLAutoDownloadSettings.cs rename src/TeleSharp.TL/TL/Account/{TLNoPassword.cs => TLContentSettings.cs} (56%) create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestAcceptAuthorization.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestCancelPasswordEmail.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestConfirmPasswordEmail.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestCreateTheme.cs rename src/TeleSharp.TL/TL/{Auth/TLRequestSendInvites.cs => Account/TLRequestDeleteSecureValue.cs} (59%) create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestFinishTakeoutSession.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestGetAllSecureValues.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestGetAuthorizationForm.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestGetAutoDownloadSettings.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestGetContactSignUpNotification.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestGetContentSettings.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestGetMultiWallPapers.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestGetNotifyExceptions.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestGetSecureValue.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestGetTheme.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestGetThemes.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestGetWallPaper.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestGetWebAuthorizations.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestInitTakeoutSession.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestInstallTheme.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestInstallWallPaper.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestResendPasswordEmail.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestResetWallPapers.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestResetWebAuthorization.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestResetWebAuthorizations.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestSaveAutoDownloadSettings.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestSaveSecureValue.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestSaveTheme.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestSaveWallPaper.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestSendVerifyEmailCode.cs rename src/TeleSharp.TL/TL/{Auth/TLRequestCheckPhone.cs => Account/TLRequestSendVerifyPhoneCode.cs} (62%) create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestSetContactSignUpNotification.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestSetContentSettings.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestUpdateTheme.cs rename src/TeleSharp.TL/TL/{TLInputMediaUploadedThumbDocument.cs => Account/TLRequestUploadTheme.cs} (50%) create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestUploadWallPaper.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestVerifyEmail.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLRequestVerifyPhone.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLSentEmailCode.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLTakeout.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLThemes.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLThemesNotModified.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLWallPapers.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLWallPapersNotModified.cs create mode 100644 src/TeleSharp.TL/TL/Account/TLWebAuthorizations.cs create mode 100644 src/TeleSharp.TL/TL/Auth/TLAbsAuthorization.cs create mode 100644 src/TeleSharp.TL/TL/Auth/TLAbsLoginToken.cs create mode 100644 src/TeleSharp.TL/TL/Auth/TLAuthorizationSignUpRequired.cs create mode 100644 src/TeleSharp.TL/TL/Auth/TLLoginToken.cs create mode 100644 src/TeleSharp.TL/TL/Auth/TLLoginTokenMigrateTo.cs rename src/TeleSharp.TL/TL/Auth/{TLCheckedPhone.cs => TLLoginTokenSuccess.cs} (62%) create mode 100644 src/TeleSharp.TL/TL/Auth/TLRequestAcceptLoginToken.cs create mode 100644 src/TeleSharp.TL/TL/Auth/TLRequestExportLoginToken.cs create mode 100644 src/TeleSharp.TL/TL/Auth/TLRequestImportLoginToken.cs create mode 100644 src/TeleSharp.TL/TL/Channels/TLAbsChannelParticipants.cs create mode 100644 src/TeleSharp.TL/TL/Channels/TLAdminLogResults.cs create mode 100644 src/TeleSharp.TL/TL/Channels/TLChannelParticipantsNotModified.cs rename src/TeleSharp.TL/TL/Channels/{TLRequestEditAbout.cs => TLRequestDeleteHistory.cs} (79%) rename src/TeleSharp.TL/TL/Channels/{TLRequestKickFromChannel.cs => TLRequestEditBanned.cs} (78%) create mode 100644 src/TeleSharp.TL/TL/Channels/TLRequestEditCreator.cs create mode 100644 src/TeleSharp.TL/TL/Channels/TLRequestEditLocation.cs create mode 100644 src/TeleSharp.TL/TL/Channels/TLRequestGetAdminLog.cs create mode 100644 src/TeleSharp.TL/TL/Channels/TLRequestGetGroupsForDiscussion.cs create mode 100644 src/TeleSharp.TL/TL/Channels/TLRequestGetInactiveChannels.cs create mode 100644 src/TeleSharp.TL/TL/Channels/TLRequestGetLeftChannels.cs create mode 100644 src/TeleSharp.TL/TL/Channels/TLRequestReadMessageContents.cs create mode 100644 src/TeleSharp.TL/TL/Channels/TLRequestSetDiscussionGroup.cs create mode 100644 src/TeleSharp.TL/TL/Channels/TLRequestSetStickers.cs rename src/TeleSharp.TL/TL/Channels/{TLRequestToggleInvites.cs => TLRequestTogglePreHistoryHidden.cs} (89%) rename src/TeleSharp.TL/TL/Channels/{TLRequestExportInvite.cs => TLRequestToggleSlowMode.cs} (70%) delete mode 100644 src/TeleSharp.TL/TL/Contacts/TLLink.cs rename src/TeleSharp.TL/TL/Contacts/{TLRequestDeleteContact.cs => TLRequestAcceptContact.cs} (76%) create mode 100644 src/TeleSharp.TL/TL/Contacts/TLRequestAddContact.cs rename src/TeleSharp.TL/TL/Contacts/{TLRequestImportCard.cs => TLRequestDeleteByPhones.cs} (60%) rename src/TeleSharp.TL/TL/Contacts/{TLRequestExportCard.cs => TLRequestGetContactIDs.cs} (78%) create mode 100644 src/TeleSharp.TL/TL/Contacts/TLRequestGetLocated.cs create mode 100644 src/TeleSharp.TL/TL/Contacts/TLRequestGetSaved.cs create mode 100644 src/TeleSharp.TL/TL/Contacts/TLRequestResetSaved.cs rename src/TeleSharp.TL/TL/{Messages/TLRequestToggleChatAdmins.cs => Contacts/TLRequestToggleTopPeers.cs} (66%) create mode 100644 src/TeleSharp.TL/TL/Contacts/TLTopPeersDisabled.cs create mode 100644 src/TeleSharp.TL/TL/Folders/TLRequestDeleteFolder.cs create mode 100644 src/TeleSharp.TL/TL/Folders/TLRequestEditPeerFolders.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLAbsDeepLinkInfo.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLAbsPassportConfig.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLAbsProxyData.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLAbsTermsOfServiceUpdate.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLAbsUserInfo.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLDeepLinkInfo.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLDeepLinkInfoEmpty.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLPassportConfig.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLPassportConfigNotModified.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLProxyDataEmpty.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLProxyDataPromo.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLRecentMeUrls.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLRequestAcceptTermsOfService.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLRequestEditUserInfo.cs rename src/TeleSharp.TL/TL/Help/{TLRequestGetTermsOfService.cs => TLRequestGetAppConfig.cs} (71%) create mode 100644 src/TeleSharp.TL/TL/Help/TLRequestGetDeepLinkInfo.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLRequestGetPassportConfig.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLRequestGetProxyData.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLRequestGetRecentMeUrls.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLRequestGetSupportName.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLRequestGetTermsOfServiceUpdate.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLRequestGetUserInfo.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLSupportName.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLTermsOfServiceUpdate.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLTermsOfServiceUpdateEmpty.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLUserInfo.cs create mode 100644 src/TeleSharp.TL/TL/Help/TLUserInfoEmpty.cs create mode 100644 src/TeleSharp.TL/TL/Langpack/TLRequestGetDifference.cs create mode 100644 src/TeleSharp.TL/TL/Langpack/TLRequestGetLangPack.cs create mode 100644 src/TeleSharp.TL/TL/Langpack/TLRequestGetLanguage.cs create mode 100644 src/TeleSharp.TL/TL/Langpack/TLRequestGetLanguages.cs create mode 100644 src/TeleSharp.TL/TL/Langpack/TLRequestGetStrings.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLAbsFavedStickers.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLAbsFoundStickerSets.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLDialogsNotModified.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLFavedStickers.cs rename src/TeleSharp.TL/TL/{TLPeerNotifyEventsEmpty.cs => Messages/TLFavedStickersNotModified.cs} (76%) create mode 100644 src/TeleSharp.TL/TL/Messages/TLFoundStickerSets.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLFoundStickerSetsNotModified.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLInactiveChats.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLMessagesNotModified.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestAcceptUrlAuth.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestClearAllDrafts.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestDeleteScheduledMessages.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestEditChatAbout.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestEditChatDefaultBannedRights.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestFaveSticker.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestGetDialogUnreadMarks.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestGetEmojiKeywords.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestGetEmojiKeywordsDifference.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestGetEmojiKeywordsLanguages.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestGetEmojiURL.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestGetFavedStickers.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestGetOnlines.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestGetPollResults.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestGetRecentLocations.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestGetScheduledHistory.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestGetScheduledMessages.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestGetSearchCounters.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestGetSplitRanges.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestGetStatsURL.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestGetStickers.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestGetUnreadMentions.cs rename src/TeleSharp.TL/TL/Messages/{TLRequestHideReportSpam.cs => TLRequestHidePeerSettingsBar.cs} (88%) create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestMarkDialogUnread.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestReadMentions.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestReport.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestRequestUrlAuth.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestSearchStickerSets.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestSendMultiMedia.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestSendScheduledMessages.cs rename src/TeleSharp.TL/TL/Messages/{TLRequestForwardMessage.cs => TLRequestSendScreenshotNotification.cs} (80%) create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestSendVote.cs rename src/TeleSharp.TL/TL/{Channels => Messages}/TLRequestUpdatePinnedMessage.cs (73%) create mode 100644 src/TeleSharp.TL/TL/Messages/TLRequestUploadEncryptedFile.cs create mode 100644 src/TeleSharp.TL/TL/Messages/TLSearchCounter.cs rename src/TeleSharp.TL/TL/Payments/{TLPaymentVerficationNeeded.cs => TLPaymentVerificationNeeded.cs} (84%) rename src/TeleSharp.TL/TL/{TLAbsContactLink.cs => TLAbsBaseTheme.cs} (78%) rename src/TeleSharp.TL/TL/{TLAbsChannelParticipantRole.cs => TLAbsChannelAdminLogEventAction.cs} (73%) rename src/TeleSharp.TL/TL/{TLAbsPeerNotifyEvents.cs => TLAbsChannelLocation.cs} (76%) rename src/TeleSharp.TL/TL/{TLAbsPage.cs => TLAbsDialog.cs} (79%) rename src/TeleSharp.TL/TL/{TLAbsFileLocation.cs => TLAbsDialogPeer.cs} (77%) create mode 100644 src/TeleSharp.TL/TL/TLAbsEmojiKeyword.cs rename src/TeleSharp.TL/TL/{TLAbsInputPeerNotifyEvents.cs => TLAbsInputCheckPasswordSRP.cs} (75%) create mode 100644 src/TeleSharp.TL/TL/TLAbsInputDialogPeer.cs create mode 100644 src/TeleSharp.TL/TL/TLAbsInputMessage.cs create mode 100644 src/TeleSharp.TL/TL/TLAbsInputSecureFile.cs create mode 100644 src/TeleSharp.TL/TL/TLAbsInputTheme.cs create mode 100644 src/TeleSharp.TL/TL/TLAbsInputWallPaper.cs create mode 100644 src/TeleSharp.TL/TL/TLAbsInputWebFileLocation.cs create mode 100644 src/TeleSharp.TL/TL/TLAbsJSONValue.cs create mode 100644 src/TeleSharp.TL/TL/TLAbsLangPackString.cs create mode 100644 src/TeleSharp.TL/TL/TLAbsPageListItem.cs create mode 100644 src/TeleSharp.TL/TL/TLAbsPageListOrderedItem.cs create mode 100644 src/TeleSharp.TL/TL/TLAbsPasswordKdfAlgo.cs delete mode 100644 src/TeleSharp.TL/TL/TLAbsPeerNotifySettings.cs create mode 100644 src/TeleSharp.TL/TL/TLAbsRecentMeUrl.cs create mode 100644 src/TeleSharp.TL/TL/TLAbsSecureFile.cs create mode 100644 src/TeleSharp.TL/TL/TLAbsSecurePasswordKdfAlgo.cs create mode 100644 src/TeleSharp.TL/TL/TLAbsSecurePlainData.cs create mode 100644 src/TeleSharp.TL/TL/TLAbsSecureRequiredType.cs create mode 100644 src/TeleSharp.TL/TL/TLAbsSecureValueError.cs create mode 100644 src/TeleSharp.TL/TL/TLAbsSecureValueType.cs create mode 100644 src/TeleSharp.TL/TL/TLAbsUrlAuthResult.cs create mode 100644 src/TeleSharp.TL/TL/TLAbsWebDocument.cs create mode 100644 src/TeleSharp.TL/TL/TLAutoDownloadSettings.cs rename src/TeleSharp.TL/TL/{TLContactLinkNone.cs => TLBaseThemeArctic.cs} (82%) rename src/TeleSharp.TL/TL/{TLContactLinkHasPhone.cs => TLBaseThemeClassic.cs} (82%) rename src/TeleSharp.TL/TL/{TLNotifyAll.cs => TLBaseThemeDay.cs} (83%) rename src/TeleSharp.TL/TL/{TLContactLinkContact.cs => TLBaseThemeNight.cs} (82%) create mode 100644 src/TeleSharp.TL/TL/TLBaseThemeTinted.cs rename src/TeleSharp.TL/TL/{TLChannelParticipantEditor.cs => TLChannelAdminLogEvent.cs} (64%) create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeAbout.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeLinkedChat.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeLocation.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangePhoto.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeStickerSet.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeTitle.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeUsername.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventActionDefaultBannedRights.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventActionDeleteMessage.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventActionEditMessage.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventActionParticipantInvite.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventActionParticipantJoin.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventActionParticipantLeave.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventActionParticipantToggleAdmin.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventActionParticipantToggleBan.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventActionStopPoll.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventActionToggleInvites.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventActionTogglePreHistoryHidden.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventActionToggleSignatures.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventActionToggleSlowMode.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventActionUpdatePinned.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelAdminLogEventsFilter.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelLocation.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelLocationEmpty.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelParticipantAdmin.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelParticipantBanned.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelParticipantsBanned.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelParticipantsContacts.cs create mode 100644 src/TeleSharp.TL/TL/TLChannelParticipantsSearch.cs create mode 100644 src/TeleSharp.TL/TL/TLChatAdminRights.cs create mode 100644 src/TeleSharp.TL/TL/TLChatBannedRights.cs create mode 100644 src/TeleSharp.TL/TL/TLChatOnlines.cs create mode 100644 src/TeleSharp.TL/TL/TLCodeSettings.cs create mode 100644 src/TeleSharp.TL/TL/TLDialogFolder.cs create mode 100644 src/TeleSharp.TL/TL/TLDialogPeer.cs create mode 100644 src/TeleSharp.TL/TL/TLDialogPeerFolder.cs delete mode 100644 src/TeleSharp.TL/TL/TLDisabledFeature.cs create mode 100644 src/TeleSharp.TL/TL/TLEmojiKeyword.cs create mode 100644 src/TeleSharp.TL/TL/TLEmojiKeywordDeleted.cs create mode 100644 src/TeleSharp.TL/TL/TLEmojiKeywordsDifference.cs create mode 100644 src/TeleSharp.TL/TL/TLEmojiLanguage.cs create mode 100644 src/TeleSharp.TL/TL/TLEmojiURL.cs create mode 100644 src/TeleSharp.TL/TL/TLFileHash.cs rename src/TeleSharp.TL/TL/{TLFileLocationUnavailable.cs => TLFileLocationToBeDeprecated.cs} (76%) create mode 100644 src/TeleSharp.TL/TL/TLFolder.cs create mode 100644 src/TeleSharp.TL/TL/TLFolderPeer.cs create mode 100644 src/TeleSharp.TL/TL/TLInputChannelFromMessage.cs create mode 100644 src/TeleSharp.TL/TL/TLInputCheckPasswordEmpty.cs create mode 100644 src/TeleSharp.TL/TL/TLInputCheckPasswordSRP.cs create mode 100644 src/TeleSharp.TL/TL/TLInputClientProxy.cs create mode 100644 src/TeleSharp.TL/TL/TLInputDialogPeer.cs create mode 100644 src/TeleSharp.TL/TL/TLInputDialogPeerFolder.cs create mode 100644 src/TeleSharp.TL/TL/TLInputFolderPeer.cs create mode 100644 src/TeleSharp.TL/TL/TLInputKeyboardButtonUrlAuth.cs create mode 100644 src/TeleSharp.TL/TL/TLInputMediaGeoLive.cs create mode 100644 src/TeleSharp.TL/TL/TLInputMediaPoll.cs create mode 100644 src/TeleSharp.TL/TL/TLInputMessageID.cs create mode 100644 src/TeleSharp.TL/TL/TLInputMessagePinned.cs create mode 100644 src/TeleSharp.TL/TL/TLInputMessageReplyTo.cs rename src/TeleSharp.TL/TL/{TLChannelRoleEditor.cs => TLInputMessagesFilterContacts.cs} (80%) create mode 100644 src/TeleSharp.TL/TL/TLInputMessagesFilterGeo.cs create mode 100644 src/TeleSharp.TL/TL/TLInputMessagesFilterMyMentions.cs delete mode 100644 src/TeleSharp.TL/TL/TLInputMessagesFilterPhotoVideoDocuments.cs delete mode 100644 src/TeleSharp.TL/TL/TLInputNotifyAll.cs create mode 100644 src/TeleSharp.TL/TL/TLInputNotifyBroadcasts.cs create mode 100644 src/TeleSharp.TL/TL/TLInputPaymentCredentialsAndroidPay.cs create mode 100644 src/TeleSharp.TL/TL/TLInputPaymentCredentialsApplePay.cs create mode 100644 src/TeleSharp.TL/TL/TLInputPeerChannelFromMessage.cs delete mode 100644 src/TeleSharp.TL/TL/TLInputPeerNotifyEventsAll.cs delete mode 100644 src/TeleSharp.TL/TL/TLInputPeerNotifyEventsEmpty.cs create mode 100644 src/TeleSharp.TL/TL/TLInputPeerPhotoFileLocation.cs create mode 100644 src/TeleSharp.TL/TL/TLInputPeerUserFromMessage.cs create mode 100644 src/TeleSharp.TL/TL/TLInputPhotoFileLocation.cs create mode 100644 src/TeleSharp.TL/TL/TLInputPhotoLegacyFileLocation.cs create mode 100644 src/TeleSharp.TL/TL/TLInputPrivacyKeyAddedByPhone.cs create mode 100644 src/TeleSharp.TL/TL/TLInputPrivacyKeyForwards.cs create mode 100644 src/TeleSharp.TL/TL/TLInputPrivacyKeyPhoneNumber.cs create mode 100644 src/TeleSharp.TL/TL/TLInputPrivacyKeyPhoneP2P.cs create mode 100644 src/TeleSharp.TL/TL/TLInputPrivacyKeyProfilePhoto.cs create mode 100644 src/TeleSharp.TL/TL/TLInputPrivacyValueAllowChatParticipants.cs create mode 100644 src/TeleSharp.TL/TL/TLInputPrivacyValueDisallowChatParticipants.cs create mode 100644 src/TeleSharp.TL/TL/TLInputReportReasonChildAbuse.cs create mode 100644 src/TeleSharp.TL/TL/TLInputReportReasonCopyright.cs create mode 100644 src/TeleSharp.TL/TL/TLInputReportReasonGeoIrrelevant.cs create mode 100644 src/TeleSharp.TL/TL/TLInputSecureFile.cs create mode 100644 src/TeleSharp.TL/TL/TLInputSecureFileLocation.cs create mode 100644 src/TeleSharp.TL/TL/TLInputSecureFileUploaded.cs create mode 100644 src/TeleSharp.TL/TL/TLInputSecureValue.cs create mode 100644 src/TeleSharp.TL/TL/TLInputSingleMedia.cs create mode 100644 src/TeleSharp.TL/TL/TLInputStickerSetAnimatedEmoji.cs rename src/TeleSharp.TL/TL/{TLFileLocation.cs => TLInputStickerSetThumb.cs} (70%) create mode 100644 src/TeleSharp.TL/TL/TLInputTakeoutFileLocation.cs create mode 100644 src/TeleSharp.TL/TL/TLInputTheme.cs create mode 100644 src/TeleSharp.TL/TL/TLInputThemeSettings.cs create mode 100644 src/TeleSharp.TL/TL/TLInputThemeSlug.cs rename src/TeleSharp.TL/TL/{TLChannelParticipantModerator.cs => TLInputUserFromMessage.cs} (62%) create mode 100644 src/TeleSharp.TL/TL/TLInputWallPaper.cs create mode 100644 src/TeleSharp.TL/TL/TLInputWallPaperNoFile.cs create mode 100644 src/TeleSharp.TL/TL/TLInputWallPaperSlug.cs create mode 100644 src/TeleSharp.TL/TL/TLInputWebFileGeoPointLocation.cs create mode 100644 src/TeleSharp.TL/TL/TLJsonArray.cs create mode 100644 src/TeleSharp.TL/TL/TLJsonBool.cs create mode 100644 src/TeleSharp.TL/TL/TLJsonNull.cs create mode 100644 src/TeleSharp.TL/TL/TLJsonNumber.cs create mode 100644 src/TeleSharp.TL/TL/TLJsonObject.cs create mode 100644 src/TeleSharp.TL/TL/TLJsonObjectValue.cs create mode 100644 src/TeleSharp.TL/TL/TLJsonString.cs create mode 100644 src/TeleSharp.TL/TL/TLKeyboardButtonUrlAuth.cs create mode 100644 src/TeleSharp.TL/TL/TLLangPackDifference.cs create mode 100644 src/TeleSharp.TL/TL/TLLangPackLanguage.cs create mode 100644 src/TeleSharp.TL/TL/TLLangPackString.cs create mode 100644 src/TeleSharp.TL/TL/TLLangPackStringDeleted.cs create mode 100644 src/TeleSharp.TL/TL/TLLangPackStringPluralized.cs create mode 100644 src/TeleSharp.TL/TL/TLMessageActionBotAllowed.cs create mode 100644 src/TeleSharp.TL/TL/TLMessageActionContactSignUp.cs create mode 100644 src/TeleSharp.TL/TL/TLMessageActionCustomAction.cs create mode 100644 src/TeleSharp.TL/TL/TLMessageActionScreenshotTaken.cs create mode 100644 src/TeleSharp.TL/TL/TLMessageActionSecureValuesSent.cs create mode 100644 src/TeleSharp.TL/TL/TLMessageActionSecureValuesSentMe.cs create mode 100644 src/TeleSharp.TL/TL/TLMessageEntityBlockquote.cs create mode 100644 src/TeleSharp.TL/TL/TLMessageEntityCashtag.cs create mode 100644 src/TeleSharp.TL/TL/TLMessageEntityPhone.cs create mode 100644 src/TeleSharp.TL/TL/TLMessageEntityStrike.cs create mode 100644 src/TeleSharp.TL/TL/TLMessageEntityUnderline.cs create mode 100644 src/TeleSharp.TL/TL/TLMessageMediaGeoLive.cs create mode 100644 src/TeleSharp.TL/TL/TLMessageMediaPoll.cs create mode 100644 src/TeleSharp.TL/TL/TLNotifyBroadcasts.cs create mode 100644 src/TeleSharp.TL/TL/TLPage.cs create mode 100644 src/TeleSharp.TL/TL/TLPageBlockAudio.cs rename src/TeleSharp.TL/TL/{TLPageFull.cs => TLPageBlockDetails.cs} (60%) create mode 100644 src/TeleSharp.TL/TL/TLPageBlockKicker.cs create mode 100644 src/TeleSharp.TL/TL/TLPageBlockMap.cs create mode 100644 src/TeleSharp.TL/TL/TLPageBlockOrderedList.cs create mode 100644 src/TeleSharp.TL/TL/TLPageBlockRelatedArticles.cs create mode 100644 src/TeleSharp.TL/TL/TLPageBlockTable.cs create mode 100644 src/TeleSharp.TL/TL/TLPageCaption.cs create mode 100644 src/TeleSharp.TL/TL/TLPageListItemBlocks.cs create mode 100644 src/TeleSharp.TL/TL/TLPageListItemText.cs rename src/TeleSharp.TL/TL/{TLPagePart.cs => TLPageListOrderedItemBlocks.cs} (59%) create mode 100644 src/TeleSharp.TL/TL/TLPageListOrderedItemText.cs create mode 100644 src/TeleSharp.TL/TL/TLPageRelatedArticle.cs create mode 100644 src/TeleSharp.TL/TL/TLPageTableCell.cs create mode 100644 src/TeleSharp.TL/TL/TLPageTableRow.cs create mode 100644 src/TeleSharp.TL/TL/TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow.cs create mode 100644 src/TeleSharp.TL/TL/TLPasswordKdfAlgoUnknown.cs create mode 100644 src/TeleSharp.TL/TL/TLPeerLocated.cs delete mode 100644 src/TeleSharp.TL/TL/TLPeerNotifyEventsAll.cs delete mode 100644 src/TeleSharp.TL/TL/TLPeerNotifySettingsEmpty.cs create mode 100644 src/TeleSharp.TL/TL/TLPhotoStrippedSize.cs create mode 100644 src/TeleSharp.TL/TL/TLPoll.cs create mode 100644 src/TeleSharp.TL/TL/TLPollAnswer.cs create mode 100644 src/TeleSharp.TL/TL/TLPollAnswerVoters.cs create mode 100644 src/TeleSharp.TL/TL/TLPollResults.cs create mode 100644 src/TeleSharp.TL/TL/TLPopularContact.cs create mode 100644 src/TeleSharp.TL/TL/TLPrivacyKeyAddedByPhone.cs create mode 100644 src/TeleSharp.TL/TL/TLPrivacyKeyForwards.cs rename src/TeleSharp.TL/TL/{TLContactLinkUnknown.cs => TLPrivacyKeyPhoneNumber.cs} (82%) create mode 100644 src/TeleSharp.TL/TL/TLPrivacyKeyPhoneP2P.cs create mode 100644 src/TeleSharp.TL/TL/TLPrivacyKeyProfilePhoto.cs create mode 100644 src/TeleSharp.TL/TL/TLPrivacyValueAllowChatParticipants.cs create mode 100644 src/TeleSharp.TL/TL/TLPrivacyValueDisallowChatParticipants.cs create mode 100644 src/TeleSharp.TL/TL/TLRecentMeUrlChat.cs create mode 100644 src/TeleSharp.TL/TL/TLRecentMeUrlChatInvite.cs create mode 100644 src/TeleSharp.TL/TL/TLRecentMeUrlStickerSet.cs create mode 100644 src/TeleSharp.TL/TL/TLRecentMeUrlUnknown.cs rename src/TeleSharp.TL/TL/{TLChannelParticipantKicked.cs => TLRecentMeUrlUser.cs} (65%) create mode 100644 src/TeleSharp.TL/TL/TLRequestInvokeWithMessagesRange.cs create mode 100644 src/TeleSharp.TL/TL/TLRequestInvokeWithTakeout.cs create mode 100644 src/TeleSharp.TL/TL/TLRestrictionReason.cs create mode 100644 src/TeleSharp.TL/TL/TLSavedPhoneContact.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureCredentialsEncrypted.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureData.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureFile.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureFileEmpty.cs create mode 100644 src/TeleSharp.TL/TL/TLSecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000.cs create mode 100644 src/TeleSharp.TL/TL/TLSecurePasswordKdfAlgoSHA512.cs create mode 100644 src/TeleSharp.TL/TL/TLSecurePasswordKdfAlgoUnknown.cs create mode 100644 src/TeleSharp.TL/TL/TLSecurePlainEmail.cs create mode 100644 src/TeleSharp.TL/TL/TLSecurePlainPhone.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureRequiredType.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureRequiredTypeOneOf.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureSecretSettings.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureValue.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureValueError.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureValueErrorData.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureValueErrorFile.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureValueErrorFiles.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureValueErrorFrontSide.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureValueErrorReverseSide.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureValueErrorSelfie.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureValueErrorTranslationFile.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureValueErrorTranslationFiles.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureValueHash.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureValueTypeAddress.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureValueTypeBankStatement.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureValueTypeDriverLicense.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureValueTypeEmail.cs rename src/TeleSharp.TL/TL/{TLChannelRoleModerator.cs => TLSecureValueTypeIdentityCard.cs} (80%) create mode 100644 src/TeleSharp.TL/TL/TLSecureValueTypeInternalPassport.cs rename src/TeleSharp.TL/TL/{TLChannelRoleEmpty.cs => TLSecureValueTypePassport.cs} (81%) create mode 100644 src/TeleSharp.TL/TL/TLSecureValueTypePassportRegistration.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureValueTypePersonalDetails.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureValueTypePhone.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureValueTypeRentalAgreement.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureValueTypeTemporaryRegistration.cs create mode 100644 src/TeleSharp.TL/TL/TLSecureValueTypeUtilityBill.cs create mode 100644 src/TeleSharp.TL/TL/TLStatsURL.cs create mode 100644 src/TeleSharp.TL/TL/TLTextAnchor.cs create mode 100644 src/TeleSharp.TL/TL/TLTextImage.cs create mode 100644 src/TeleSharp.TL/TL/TLTextMarked.cs create mode 100644 src/TeleSharp.TL/TL/TLTextPhone.cs create mode 100644 src/TeleSharp.TL/TL/TLTextSubscript.cs create mode 100644 src/TeleSharp.TL/TL/TLTextSuperscript.cs create mode 100644 src/TeleSharp.TL/TL/TLTheme.cs create mode 100644 src/TeleSharp.TL/TL/TLThemeSettings.cs create mode 100644 src/TeleSharp.TL/TL/TLTopPeerCategoryForwardChats.cs create mode 100644 src/TeleSharp.TL/TL/TLTopPeerCategoryForwardUsers.cs create mode 100644 src/TeleSharp.TL/TL/TLTopPeerCategoryPhoneCalls.cs create mode 100644 src/TeleSharp.TL/TL/TLUpdateChannelAvailableMessages.cs create mode 100644 src/TeleSharp.TL/TL/TLUpdateChannelReadMessagesContents.cs create mode 100644 src/TeleSharp.TL/TL/TLUpdateChatDefaultBannedRights.cs rename src/TeleSharp.TL/TL/{TLUpdateChatAdmins.cs => TLUpdateChatPinnedMessage.cs} (75%) delete mode 100644 src/TeleSharp.TL/TL/TLUpdateContactLink.cs create mode 100644 src/TeleSharp.TL/TL/TLUpdateContactsReset.cs create mode 100644 src/TeleSharp.TL/TL/TLUpdateDeleteScheduledMessages.cs create mode 100644 src/TeleSharp.TL/TL/TLUpdateDialogUnreadMark.cs create mode 100644 src/TeleSharp.TL/TL/TLUpdateFavedStickers.cs create mode 100644 src/TeleSharp.TL/TL/TLUpdateFolderPeers.cs create mode 100644 src/TeleSharp.TL/TL/TLUpdateGeoLiveViewed.cs create mode 100644 src/TeleSharp.TL/TL/TLUpdateLangPack.cs create mode 100644 src/TeleSharp.TL/TL/TLUpdateLangPackTooLong.cs create mode 100644 src/TeleSharp.TL/TL/TLUpdateLoginToken.cs create mode 100644 src/TeleSharp.TL/TL/TLUpdateMessagePoll.cs create mode 100644 src/TeleSharp.TL/TL/TLUpdateNewScheduledMessage.cs create mode 100644 src/TeleSharp.TL/TL/TLUpdatePeerLocated.cs create mode 100644 src/TeleSharp.TL/TL/TLUpdatePeerSettings.cs create mode 100644 src/TeleSharp.TL/TL/TLUpdateTheme.cs rename src/TeleSharp.TL/TL/{TLUpdateContactRegistered.cs => TLUpdateUserPinnedMessage.cs} (75%) create mode 100644 src/TeleSharp.TL/TL/TLUrlAuthResultAccepted.cs create mode 100644 src/TeleSharp.TL/TL/TLUrlAuthResultDefault.cs create mode 100644 src/TeleSharp.TL/TL/TLUrlAuthResultRequest.cs create mode 100644 src/TeleSharp.TL/TL/TLWallPaperNoFile.cs create mode 100644 src/TeleSharp.TL/TL/TLWallPaperSettings.cs delete mode 100644 src/TeleSharp.TL/TL/TLWallPaperSolid.cs create mode 100644 src/TeleSharp.TL/TL/TLWebAuthorization.cs create mode 100644 src/TeleSharp.TL/TL/TLWebDocumentNoProxy.cs create mode 100644 src/TeleSharp.TL/TL/TLWebPageAttributeTheme.cs create mode 100644 src/TeleSharp.TL/TL/Upload/TLRequestGetCdnFileHashes.cs create mode 100644 src/TeleSharp.TL/TL/Upload/TLRequestGetFileHashes.cs create mode 100644 src/TeleSharp.TL/TL/Users/TLRequestSetSecureValueErrors.cs diff --git a/src/TeleSharp.TL/TL/Account/TLAbsPassword.cs b/src/TeleSharp.TL/TL/Account/TLAbsThemes.cs similarity index 79% rename from src/TeleSharp.TL/TL/Account/TLAbsPassword.cs rename to src/TeleSharp.TL/TL/Account/TLAbsThemes.cs index 9bfacaf..76584ab 100644 --- a/src/TeleSharp.TL/TL/Account/TLAbsPassword.cs +++ b/src/TeleSharp.TL/TL/Account/TLAbsThemes.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Account { - public abstract class TLAbsPassword : TLObject + public abstract class TLAbsThemes : TLObject { } } diff --git a/src/TeleSharp.TL/TL/Account/TLAbsWallPapers.cs b/src/TeleSharp.TL/TL/Account/TLAbsWallPapers.cs new file mode 100644 index 0000000..7c4d6b0 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLAbsWallPapers.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + public abstract class TLAbsWallPapers : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLAuthorizationForm.cs b/src/TeleSharp.TL/TL/Account/TLAuthorizationForm.cs new file mode 100644 index 0000000..2efc669 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLAuthorizationForm.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-1389486888)] + public class TLAuthorizationForm : TLObject + { + public override int Constructor + { + get + { + return -1389486888; + } + } + + public int Flags { get; set; } + public TLVector RequiredTypes { get; set; } + public TLVector Values { get; set; } + public TLVector Errors { get; set; } + public TLVector Users { get; set; } + public string PrivacyPolicyUrl { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + RequiredTypes = (TLVector)ObjectUtils.DeserializeVector(br); + Values = (TLVector)ObjectUtils.DeserializeVector(br); + Errors = (TLVector)ObjectUtils.DeserializeVector(br); + Users = (TLVector)ObjectUtils.DeserializeVector(br); + if ((Flags & 1) != 0) + PrivacyPolicyUrl = StringUtil.Deserialize(br); + else + PrivacyPolicyUrl = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + ObjectUtils.SerializeObject(RequiredTypes, bw); + ObjectUtils.SerializeObject(Values, bw); + ObjectUtils.SerializeObject(Errors, bw); + ObjectUtils.SerializeObject(Users, bw); + if ((Flags & 1) != 0) + StringUtil.Serialize(PrivacyPolicyUrl, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLAutoDownloadSettings.cs b/src/TeleSharp.TL/TL/Account/TLAutoDownloadSettings.cs new file mode 100644 index 0000000..012726f --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLAutoDownloadSettings.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(1674235686)] + public class TLAutoDownloadSettings : TLObject + { + public override int Constructor + { + get + { + return 1674235686; + } + } + + public TLAutoDownloadSettings Low { get; set; } + public TLAutoDownloadSettings Medium { get; set; } + public TLAutoDownloadSettings High { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Low = (TLAutoDownloadSettings)ObjectUtils.DeserializeObject(br); + Medium = (TLAutoDownloadSettings)ObjectUtils.DeserializeObject(br); + High = (TLAutoDownloadSettings)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Low, bw); + ObjectUtils.SerializeObject(Medium, bw); + ObjectUtils.SerializeObject(High, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLNoPassword.cs b/src/TeleSharp.TL/TL/Account/TLContentSettings.cs similarity index 56% rename from src/TeleSharp.TL/TL/Account/TLNoPassword.cs rename to src/TeleSharp.TL/TL/Account/TLContentSettings.cs index 6a712e0..cc0b3af 100644 --- a/src/TeleSharp.TL/TL/Account/TLNoPassword.cs +++ b/src/TeleSharp.TL/TL/Account/TLContentSettings.cs @@ -7,19 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Account { - [TLObject(-1764049896)] - public class TLNoPassword : TLAbsPassword + [TLObject(1474462241)] + public class TLContentSettings : TLObject { public override int Constructor { get { - return -1764049896; + return 1474462241; } } - public byte[] NewSalt { get; set; } - public string EmailUnconfirmedPattern { get; set; } + public int Flags { get; set; } + public bool SensitiveEnabled { get; set; } + public bool SensitiveCanChange { get; set; } public void ComputeFlags() @@ -29,16 +30,18 @@ namespace TeleSharp.TL.Account public override void DeserializeBody(BinaryReader br) { - NewSalt = BytesUtil.Deserialize(br); - EmailUnconfirmedPattern = StringUtil.Deserialize(br); + Flags = br.ReadInt32(); + SensitiveEnabled = (Flags & 1) != 0; + SensitiveCanChange = (Flags & 2) != 0; } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - BytesUtil.Serialize(NewSalt, bw); - StringUtil.Serialize(EmailUnconfirmedPattern, bw); + bw.Write(Flags); + + } } diff --git a/src/TeleSharp.TL/TL/Account/TLPassword.cs b/src/TeleSharp.TL/TL/Account/TLPassword.cs index 8748aa4..b726795 100644 --- a/src/TeleSharp.TL/TL/Account/TLPassword.cs +++ b/src/TeleSharp.TL/TL/Account/TLPassword.cs @@ -7,22 +7,29 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Account { - [TLObject(2081952796)] - public class TLPassword : TLAbsPassword + [TLObject(-1390001672)] + public class TLPassword : TLObject { public override int Constructor { get { - return 2081952796; + return -1390001672; } } - public byte[] CurrentSalt { get; set; } - public byte[] NewSalt { get; set; } - public string Hint { get; set; } + public int Flags { get; set; } public bool HasRecovery { get; set; } + public bool HasSecureValues { get; set; } + public bool HasPassword { get; set; } + public TLAbsPasswordKdfAlgo CurrentAlgo { get; set; } + public byte[] SrpB { get; set; } + public long? SrpId { get; set; } + public string Hint { get; set; } public string EmailUnconfirmedPattern { get; set; } + public TLAbsPasswordKdfAlgo NewAlgo { get; set; } + public TLAbsSecurePasswordKdfAlgo NewSecureAlgo { get; set; } + public byte[] SecureRandom { get; set; } public void ComputeFlags() @@ -32,22 +39,61 @@ namespace TeleSharp.TL.Account public override void DeserializeBody(BinaryReader br) { - CurrentSalt = BytesUtil.Deserialize(br); - NewSalt = BytesUtil.Deserialize(br); - Hint = StringUtil.Deserialize(br); - HasRecovery = BoolUtil.Deserialize(br); - EmailUnconfirmedPattern = StringUtil.Deserialize(br); + Flags = br.ReadInt32(); + HasRecovery = (Flags & 1) != 0; + HasSecureValues = (Flags & 2) != 0; + HasPassword = (Flags & 4) != 0; + if ((Flags & 4) != 0) + CurrentAlgo = (TLAbsPasswordKdfAlgo)ObjectUtils.DeserializeObject(br); + else + CurrentAlgo = null; + + if ((Flags & 4) != 0) + SrpB = BytesUtil.Deserialize(br); + else + SrpB = null; + + if ((Flags & 4) != 0) + SrpId = br.ReadInt64(); + else + SrpId = null; + + if ((Flags & 8) != 0) + Hint = StringUtil.Deserialize(br); + else + Hint = null; + + if ((Flags & 16) != 0) + EmailUnconfirmedPattern = StringUtil.Deserialize(br); + else + EmailUnconfirmedPattern = null; + + NewAlgo = (TLAbsPasswordKdfAlgo)ObjectUtils.DeserializeObject(br); + NewSecureAlgo = (TLAbsSecurePasswordKdfAlgo)ObjectUtils.DeserializeObject(br); + SecureRandom = BytesUtil.Deserialize(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - BytesUtil.Serialize(CurrentSalt, bw); - BytesUtil.Serialize(NewSalt, bw); - StringUtil.Serialize(Hint, bw); - BoolUtil.Serialize(HasRecovery, bw); - StringUtil.Serialize(EmailUnconfirmedPattern, bw); + bw.Write(Flags); + + + + if ((Flags & 4) != 0) + ObjectUtils.SerializeObject(CurrentAlgo, bw); + if ((Flags & 4) != 0) + BytesUtil.Serialize(SrpB, bw); + if ((Flags & 4) != 0) + bw.Write(SrpId.Value); + if ((Flags & 8) != 0) + StringUtil.Serialize(Hint, bw); + if ((Flags & 16) != 0) + StringUtil.Serialize(EmailUnconfirmedPattern, bw); + ObjectUtils.SerializeObject(NewAlgo, bw); + ObjectUtils.SerializeObject(NewSecureAlgo, bw); + BytesUtil.Serialize(SecureRandom, bw); } } diff --git a/src/TeleSharp.TL/TL/Account/TLPasswordInputSettings.cs b/src/TeleSharp.TL/TL/Account/TLPasswordInputSettings.cs index d7368a3..fc18876 100644 --- a/src/TeleSharp.TL/TL/Account/TLPasswordInputSettings.cs +++ b/src/TeleSharp.TL/TL/Account/TLPasswordInputSettings.cs @@ -7,31 +7,27 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Account { - [TLObject(-2037289493)] + [TLObject(-1036572727)] public class TLPasswordInputSettings : TLObject { public override int Constructor { get { - return -2037289493; + return -1036572727; } } public int Flags { get; set; } - public byte[] NewSalt { get; set; } + public TLAbsPasswordKdfAlgo NewAlgo { get; set; } public byte[] NewPasswordHash { get; set; } public string Hint { get; set; } public string Email { get; set; } + public TLSecureSecretSettings NewSecureSettings { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = NewSalt != null ? (Flags | 1) : (Flags & ~1); - Flags = NewPasswordHash != null ? (Flags | 1) : (Flags & ~1); - Flags = Hint != null ? (Flags | 1) : (Flags & ~1); - Flags = Email != null ? (Flags | 2) : (Flags & ~2); } @@ -39,9 +35,9 @@ namespace TeleSharp.TL.Account { Flags = br.ReadInt32(); if ((Flags & 1) != 0) - NewSalt = BytesUtil.Deserialize(br); + NewAlgo = (TLAbsPasswordKdfAlgo)ObjectUtils.DeserializeObject(br); else - NewSalt = null; + NewAlgo = null; if ((Flags & 1) != 0) NewPasswordHash = BytesUtil.Deserialize(br); @@ -58,22 +54,28 @@ namespace TeleSharp.TL.Account else Email = null; + if ((Flags & 4) != 0) + NewSecureSettings = (TLSecureSecretSettings)ObjectUtils.DeserializeObject(br); + else + NewSecureSettings = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); if ((Flags & 1) != 0) - BytesUtil.Serialize(NewSalt, bw); + ObjectUtils.SerializeObject(NewAlgo, bw); if ((Flags & 1) != 0) BytesUtil.Serialize(NewPasswordHash, bw); if ((Flags & 1) != 0) StringUtil.Serialize(Hint, bw); if ((Flags & 2) != 0) StringUtil.Serialize(Email, bw); + if ((Flags & 4) != 0) + ObjectUtils.SerializeObject(NewSecureSettings, bw); } } diff --git a/src/TeleSharp.TL/TL/Account/TLPasswordSettings.cs b/src/TeleSharp.TL/TL/Account/TLPasswordSettings.cs index 0b609e5..0210630 100644 --- a/src/TeleSharp.TL/TL/Account/TLPasswordSettings.cs +++ b/src/TeleSharp.TL/TL/Account/TLPasswordSettings.cs @@ -7,18 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Account { - [TLObject(-1212732749)] + [TLObject(-1705233435)] public class TLPasswordSettings : TLObject { public override int Constructor { get { - return -1212732749; + return -1705233435; } } + public int Flags { get; set; } public string Email { get; set; } + public TLSecureSecretSettings SecureSettings { get; set; } public void ComputeFlags() @@ -28,14 +30,28 @@ namespace TeleSharp.TL.Account public override void DeserializeBody(BinaryReader br) { - Email = StringUtil.Deserialize(br); + Flags = br.ReadInt32(); + if ((Flags & 1) != 0) + Email = StringUtil.Deserialize(br); + else + Email = null; + + if ((Flags & 2) != 0) + SecureSettings = (TLSecureSecretSettings)ObjectUtils.DeserializeObject(br); + else + SecureSettings = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - StringUtil.Serialize(Email, bw); + bw.Write(Flags); + if ((Flags & 1) != 0) + StringUtil.Serialize(Email, bw); + if ((Flags & 2) != 0) + ObjectUtils.SerializeObject(SecureSettings, bw); } } diff --git a/src/TeleSharp.TL/TL/Account/TLPrivacyRules.cs b/src/TeleSharp.TL/TL/Account/TLPrivacyRules.cs index cc31cb0..cf957c6 100644 --- a/src/TeleSharp.TL/TL/Account/TLPrivacyRules.cs +++ b/src/TeleSharp.TL/TL/Account/TLPrivacyRules.cs @@ -7,18 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Account { - [TLObject(1430961007)] + [TLObject(1352683077)] public class TLPrivacyRules : TLObject { public override int Constructor { get { - return 1430961007; + return 1352683077; } } public TLVector Rules { get; set; } + public TLVector Chats { get; set; } public TLVector Users { get; set; } @@ -30,6 +31,7 @@ namespace TeleSharp.TL.Account public override void DeserializeBody(BinaryReader br) { Rules = (TLVector)ObjectUtils.DeserializeVector(br); + Chats = (TLVector)ObjectUtils.DeserializeVector(br); Users = (TLVector)ObjectUtils.DeserializeVector(br); } @@ -38,6 +40,7 @@ namespace TeleSharp.TL.Account { bw.Write(Constructor); ObjectUtils.SerializeObject(Rules, bw); + ObjectUtils.SerializeObject(Chats, bw); ObjectUtils.SerializeObject(Users, bw); } diff --git a/src/TeleSharp.TL/TL/Account/TLRequestAcceptAuthorization.cs b/src/TeleSharp.TL/TL/Account/TLRequestAcceptAuthorization.cs new file mode 100644 index 0000000..656a724 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestAcceptAuthorization.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-419267436)] + public class TLRequestAcceptAuthorization : TLMethod + { + public override int Constructor + { + get + { + return -419267436; + } + } + + public int BotId { get; set; } + public string Scope { get; set; } + public string PublicKey { get; set; } + public TLVector ValueHashes { get; set; } + public TLSecureCredentialsEncrypted Credentials { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + BotId = br.ReadInt32(); + Scope = StringUtil.Deserialize(br); + PublicKey = StringUtil.Deserialize(br); + ValueHashes = (TLVector)ObjectUtils.DeserializeVector(br); + Credentials = (TLSecureCredentialsEncrypted)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(BotId); + StringUtil.Serialize(Scope, bw); + StringUtil.Serialize(PublicKey, bw); + ObjectUtils.SerializeObject(ValueHashes, bw); + ObjectUtils.SerializeObject(Credentials, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestCancelPasswordEmail.cs b/src/TeleSharp.TL/TL/Account/TLRequestCancelPasswordEmail.cs new file mode 100644 index 0000000..f2ba077 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestCancelPasswordEmail.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-1043606090)] + public class TLRequestCancelPasswordEmail : TLMethod + { + public override int Constructor + { + get + { + return -1043606090; + } + } + + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestConfirmPasswordEmail.cs b/src/TeleSharp.TL/TL/Account/TLRequestConfirmPasswordEmail.cs new file mode 100644 index 0000000..ff2b35f --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestConfirmPasswordEmail.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-1881204448)] + public class TLRequestConfirmPasswordEmail : TLMethod + { + public override int Constructor + { + get + { + return -1881204448; + } + } + + public string Code { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Code = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Code, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestCreateTheme.cs b/src/TeleSharp.TL/TL/Account/TLRequestCreateTheme.cs new file mode 100644 index 0000000..98af785 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestCreateTheme.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-2077048289)] + public class TLRequestCreateTheme : TLMethod + { + public override int Constructor + { + get + { + return -2077048289; + } + } + + public int Flags { get; set; } + public string Slug { get; set; } + public string Title { get; set; } + public TLAbsInputDocument Document { get; set; } + public TLInputThemeSettings Settings { get; set; } + public TLTheme Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Slug = StringUtil.Deserialize(br); + Title = StringUtil.Deserialize(br); + if ((Flags & 4) != 0) + Document = (TLAbsInputDocument)ObjectUtils.DeserializeObject(br); + else + Document = null; + + if ((Flags & 8) != 0) + Settings = (TLInputThemeSettings)ObjectUtils.DeserializeObject(br); + else + Settings = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + StringUtil.Serialize(Slug, bw); + StringUtil.Serialize(Title, bw); + if ((Flags & 4) != 0) + ObjectUtils.SerializeObject(Document, bw); + if ((Flags & 8) != 0) + ObjectUtils.SerializeObject(Settings, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLTheme)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Auth/TLRequestSendInvites.cs b/src/TeleSharp.TL/TL/Account/TLRequestDeleteSecureValue.cs similarity index 59% rename from src/TeleSharp.TL/TL/Auth/TLRequestSendInvites.cs rename to src/TeleSharp.TL/TL/Account/TLRequestDeleteSecureValue.cs index 3f894bb..cc80516 100644 --- a/src/TeleSharp.TL/TL/Auth/TLRequestSendInvites.cs +++ b/src/TeleSharp.TL/TL/Account/TLRequestDeleteSecureValue.cs @@ -5,21 +5,20 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using TeleSharp.TL; -namespace TeleSharp.TL.Auth +namespace TeleSharp.TL.Account { - [TLObject(1998331287)] - public class TLRequestSendInvites : TLMethod + [TLObject(-1199522741)] + public class TLRequestDeleteSecureValue : TLMethod { public override int Constructor { get { - return 1998331287; + return -1199522741; } } - public TLVector PhoneNumbers { get; set; } - public string Message { get; set; } + public TLVector Types { get; set; } public bool Response { get; set; } @@ -30,16 +29,14 @@ namespace TeleSharp.TL.Auth public override void DeserializeBody(BinaryReader br) { - PhoneNumbers = (TLVector)ObjectUtils.DeserializeVector(br); - Message = StringUtil.Deserialize(br); + Types = (TLVector)ObjectUtils.DeserializeVector(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ObjectUtils.SerializeObject(PhoneNumbers, bw); - StringUtil.Serialize(Message, bw); + ObjectUtils.SerializeObject(Types, bw); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Account/TLRequestFinishTakeoutSession.cs b/src/TeleSharp.TL/TL/Account/TLRequestFinishTakeoutSession.cs new file mode 100644 index 0000000..9dcccab --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestFinishTakeoutSession.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(489050862)] + public class TLRequestFinishTakeoutSession : TLMethod + { + public override int Constructor + { + get + { + return 489050862; + } + } + + public int Flags { get; set; } + public bool Success { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Success = (Flags & 1) != 0; + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestGetAllSecureValues.cs b/src/TeleSharp.TL/TL/Account/TLRequestGetAllSecureValues.cs new file mode 100644 index 0000000..445f5b8 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestGetAllSecureValues.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-1299661699)] + public class TLRequestGetAllSecureValues : TLMethod + { + public override int Constructor + { + get + { + return -1299661699; + } + } + + public TLVector Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLVector)ObjectUtils.DeserializeVector(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestGetAuthorizationForm.cs b/src/TeleSharp.TL/TL/Account/TLRequestGetAuthorizationForm.cs new file mode 100644 index 0000000..f397a57 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestGetAuthorizationForm.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-1200903967)] + public class TLRequestGetAuthorizationForm : TLMethod + { + public override int Constructor + { + get + { + return -1200903967; + } + } + + public int BotId { get; set; } + public string Scope { get; set; } + public string PublicKey { get; set; } + public Account.TLAuthorizationForm Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + BotId = br.ReadInt32(); + Scope = StringUtil.Deserialize(br); + PublicKey = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(BotId); + StringUtil.Serialize(Scope, bw); + StringUtil.Serialize(PublicKey, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Account.TLAuthorizationForm)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestGetAutoDownloadSettings.cs b/src/TeleSharp.TL/TL/Account/TLRequestGetAutoDownloadSettings.cs new file mode 100644 index 0000000..19cae9c --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestGetAutoDownloadSettings.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(1457130303)] + public class TLRequestGetAutoDownloadSettings : TLMethod + { + public override int Constructor + { + get + { + return 1457130303; + } + } + + public Account.TLAutoDownloadSettings Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Account.TLAutoDownloadSettings)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestGetContactSignUpNotification.cs b/src/TeleSharp.TL/TL/Account/TLRequestGetContactSignUpNotification.cs new file mode 100644 index 0000000..f5a7c96 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestGetContactSignUpNotification.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-1626880216)] + public class TLRequestGetContactSignUpNotification : TLMethod + { + public override int Constructor + { + get + { + return -1626880216; + } + } + + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestGetContentSettings.cs b/src/TeleSharp.TL/TL/Account/TLRequestGetContentSettings.cs new file mode 100644 index 0000000..4cd3d6c --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestGetContentSettings.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-1952756306)] + public class TLRequestGetContentSettings : TLMethod + { + public override int Constructor + { + get + { + return -1952756306; + } + } + + public Account.TLContentSettings Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Account.TLContentSettings)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestGetMultiWallPapers.cs b/src/TeleSharp.TL/TL/Account/TLRequestGetMultiWallPapers.cs new file mode 100644 index 0000000..9550111 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestGetMultiWallPapers.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(1705865692)] + public class TLRequestGetMultiWallPapers : TLMethod + { + public override int Constructor + { + get + { + return 1705865692; + } + } + + public TLVector Wallpapers { get; set; } + public TLVector Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Wallpapers = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Wallpapers, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLVector)ObjectUtils.DeserializeVector(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestGetNotifyExceptions.cs b/src/TeleSharp.TL/TL/Account/TLRequestGetNotifyExceptions.cs new file mode 100644 index 0000000..14c01ec --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestGetNotifyExceptions.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(1398240377)] + public class TLRequestGetNotifyExceptions : TLMethod + { + public override int Constructor + { + get + { + return 1398240377; + } + } + + public int Flags { get; set; } + public bool CompareSound { get; set; } + public TLAbsInputNotifyPeer Peer { get; set; } + public TLAbsUpdates Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + CompareSound = (Flags & 2) != 0; + if ((Flags & 1) != 0) + Peer = (TLAbsInputNotifyPeer)ObjectUtils.DeserializeObject(br); + else + Peer = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + if ((Flags & 1) != 0) + ObjectUtils.SerializeObject(Peer, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestGetNotifySettings.cs b/src/TeleSharp.TL/TL/Account/TLRequestGetNotifySettings.cs index 87f42d4..34d3c4c 100644 --- a/src/TeleSharp.TL/TL/Account/TLRequestGetNotifySettings.cs +++ b/src/TeleSharp.TL/TL/Account/TLRequestGetNotifySettings.cs @@ -19,7 +19,7 @@ namespace TeleSharp.TL.Account } public TLAbsInputNotifyPeer Peer { get; set; } - public TLAbsPeerNotifySettings Response { get; set; } + public TLPeerNotifySettings Response { get; set; } public void ComputeFlags() @@ -41,7 +41,7 @@ namespace TeleSharp.TL.Account } public override void DeserializeResponse(BinaryReader br) { - Response = (TLAbsPeerNotifySettings)ObjectUtils.DeserializeObject(br); + Response = (TLPeerNotifySettings)ObjectUtils.DeserializeObject(br); } } diff --git a/src/TeleSharp.TL/TL/Account/TLRequestGetPassword.cs b/src/TeleSharp.TL/TL/Account/TLRequestGetPassword.cs index 27b3b52..77c4435 100644 --- a/src/TeleSharp.TL/TL/Account/TLRequestGetPassword.cs +++ b/src/TeleSharp.TL/TL/Account/TLRequestGetPassword.cs @@ -18,7 +18,7 @@ namespace TeleSharp.TL.Account } } - public Account.TLAbsPassword Response { get; set; } + public Account.TLPassword Response { get; set; } public void ComputeFlags() @@ -38,7 +38,7 @@ namespace TeleSharp.TL.Account } public override void DeserializeResponse(BinaryReader br) { - Response = (Account.TLAbsPassword)ObjectUtils.DeserializeObject(br); + Response = (Account.TLPassword)ObjectUtils.DeserializeObject(br); } } diff --git a/src/TeleSharp.TL/TL/Account/TLRequestGetPasswordSettings.cs b/src/TeleSharp.TL/TL/Account/TLRequestGetPasswordSettings.cs index 4e22bbb..dd01d91 100644 --- a/src/TeleSharp.TL/TL/Account/TLRequestGetPasswordSettings.cs +++ b/src/TeleSharp.TL/TL/Account/TLRequestGetPasswordSettings.cs @@ -7,18 +7,18 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Account { - [TLObject(-1131605573)] + [TLObject(-1663767815)] public class TLRequestGetPasswordSettings : TLMethod { public override int Constructor { get { - return -1131605573; + return -1663767815; } } - public byte[] CurrentPasswordHash { get; set; } + public TLAbsInputCheckPasswordSRP Password { get; set; } public Account.TLPasswordSettings Response { get; set; } @@ -29,14 +29,14 @@ namespace TeleSharp.TL.Account public override void DeserializeBody(BinaryReader br) { - CurrentPasswordHash = BytesUtil.Deserialize(br); + Password = (TLAbsInputCheckPasswordSRP)ObjectUtils.DeserializeObject(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - BytesUtil.Serialize(CurrentPasswordHash, bw); + ObjectUtils.SerializeObject(Password, bw); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Account/TLRequestGetSecureValue.cs b/src/TeleSharp.TL/TL/Account/TLRequestGetSecureValue.cs new file mode 100644 index 0000000..1990a94 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestGetSecureValue.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(1936088002)] + public class TLRequestGetSecureValue : TLMethod + { + public override int Constructor + { + get + { + return 1936088002; + } + } + + public TLVector Types { get; set; } + public TLVector Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Types = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Types, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLVector)ObjectUtils.DeserializeVector(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestGetTheme.cs b/src/TeleSharp.TL/TL/Account/TLRequestGetTheme.cs new file mode 100644 index 0000000..660b8df --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestGetTheme.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-1919060949)] + public class TLRequestGetTheme : TLMethod + { + public override int Constructor + { + get + { + return -1919060949; + } + } + + public string Format { get; set; } + public TLAbsInputTheme Theme { get; set; } + public long DocumentId { get; set; } + public TLTheme Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Format = StringUtil.Deserialize(br); + Theme = (TLAbsInputTheme)ObjectUtils.DeserializeObject(br); + DocumentId = br.ReadInt64(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Format, bw); + ObjectUtils.SerializeObject(Theme, bw); + bw.Write(DocumentId); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLTheme)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestGetThemes.cs b/src/TeleSharp.TL/TL/Account/TLRequestGetThemes.cs new file mode 100644 index 0000000..c5bdfef --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestGetThemes.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(676939512)] + public class TLRequestGetThemes : TLMethod + { + public override int Constructor + { + get + { + return 676939512; + } + } + + public string Format { get; set; } + public int Hash { get; set; } + public Account.TLAbsThemes Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Format = StringUtil.Deserialize(br); + Hash = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Format, bw); + bw.Write(Hash); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Account.TLAbsThemes)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestGetTmpPassword.cs b/src/TeleSharp.TL/TL/Account/TLRequestGetTmpPassword.cs index 566914c..ce8dc36 100644 --- a/src/TeleSharp.TL/TL/Account/TLRequestGetTmpPassword.cs +++ b/src/TeleSharp.TL/TL/Account/TLRequestGetTmpPassword.cs @@ -7,18 +7,18 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Account { - [TLObject(1250046590)] + [TLObject(1151208273)] public class TLRequestGetTmpPassword : TLMethod { public override int Constructor { get { - return 1250046590; + return 1151208273; } } - public byte[] PasswordHash { get; set; } + public TLAbsInputCheckPasswordSRP Password { get; set; } public int Period { get; set; } public Account.TLTmpPassword Response { get; set; } @@ -30,7 +30,7 @@ namespace TeleSharp.TL.Account public override void DeserializeBody(BinaryReader br) { - PasswordHash = BytesUtil.Deserialize(br); + Password = (TLAbsInputCheckPasswordSRP)ObjectUtils.DeserializeObject(br); Period = br.ReadInt32(); } @@ -38,7 +38,7 @@ namespace TeleSharp.TL.Account public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - BytesUtil.Serialize(PasswordHash, bw); + ObjectUtils.SerializeObject(Password, bw); bw.Write(Period); } diff --git a/src/TeleSharp.TL/TL/Account/TLRequestGetWallPaper.cs b/src/TeleSharp.TL/TL/Account/TLRequestGetWallPaper.cs new file mode 100644 index 0000000..4294366 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestGetWallPaper.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-57811990)] + public class TLRequestGetWallPaper : TLMethod + { + public override int Constructor + { + get + { + return -57811990; + } + } + + public TLAbsInputWallPaper Wallpaper { get; set; } + public TLAbsWallPaper Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Wallpaper = (TLAbsInputWallPaper)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Wallpaper, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLAbsWallPaper)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestGetWallPapers.cs b/src/TeleSharp.TL/TL/Account/TLRequestGetWallPapers.cs index 0e9a5b9..a01dff2 100644 --- a/src/TeleSharp.TL/TL/Account/TLRequestGetWallPapers.cs +++ b/src/TeleSharp.TL/TL/Account/TLRequestGetWallPapers.cs @@ -7,18 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Account { - [TLObject(-1068696894)] + [TLObject(-1430579357)] public class TLRequestGetWallPapers : TLMethod { public override int Constructor { get { - return -1068696894; + return -1430579357; } } - public TLVector Response { get; set; } + public int Hash { get; set; } + public Account.TLAbsWallPapers Response { get; set; } public void ComputeFlags() @@ -28,17 +29,19 @@ namespace TeleSharp.TL.Account public override void DeserializeBody(BinaryReader br) { + Hash = br.ReadInt32(); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Hash); } public override void DeserializeResponse(BinaryReader br) { - Response = (TLVector)ObjectUtils.DeserializeVector(br); + Response = (Account.TLAbsWallPapers)ObjectUtils.DeserializeObject(br); } } diff --git a/src/TeleSharp.TL/TL/Account/TLRequestGetWebAuthorizations.cs b/src/TeleSharp.TL/TL/Account/TLRequestGetWebAuthorizations.cs new file mode 100644 index 0000000..95798e8 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestGetWebAuthorizations.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(405695855)] + public class TLRequestGetWebAuthorizations : TLMethod + { + public override int Constructor + { + get + { + return 405695855; + } + } + + public Account.TLWebAuthorizations Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Account.TLWebAuthorizations)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestInitTakeoutSession.cs b/src/TeleSharp.TL/TL/Account/TLRequestInitTakeoutSession.cs new file mode 100644 index 0000000..70fecf1 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestInitTakeoutSession.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-262453244)] + public class TLRequestInitTakeoutSession : TLMethod + { + public override int Constructor + { + get + { + return -262453244; + } + } + + public int Flags { get; set; } + public bool Contacts { get; set; } + public bool MessageUsers { get; set; } + public bool MessageChats { get; set; } + public bool MessageMegagroups { get; set; } + public bool MessageChannels { get; set; } + public bool Files { get; set; } + public int? FileMaxSize { get; set; } + public Account.TLTakeout Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Contacts = (Flags & 1) != 0; + MessageUsers = (Flags & 2) != 0; + MessageChats = (Flags & 4) != 0; + MessageMegagroups = (Flags & 8) != 0; + MessageChannels = (Flags & 16) != 0; + Files = (Flags & 32) != 0; + if ((Flags & 32) != 0) + FileMaxSize = br.ReadInt32(); + else + FileMaxSize = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + + + + + + if ((Flags & 32) != 0) + bw.Write(FileMaxSize.Value); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Account.TLTakeout)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestInstallTheme.cs b/src/TeleSharp.TL/TL/Account/TLRequestInstallTheme.cs new file mode 100644 index 0000000..b91a5b5 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestInstallTheme.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(2061776695)] + public class TLRequestInstallTheme : TLMethod + { + public override int Constructor + { + get + { + return 2061776695; + } + } + + public int Flags { get; set; } + public bool Dark { get; set; } + public string Format { get; set; } + public TLAbsInputTheme Theme { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Dark = (Flags & 1) != 0; + if ((Flags & 2) != 0) + Format = StringUtil.Deserialize(br); + else + Format = null; + + if ((Flags & 2) != 0) + Theme = (TLAbsInputTheme)ObjectUtils.DeserializeObject(br); + else + Theme = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + if ((Flags & 2) != 0) + StringUtil.Serialize(Format, bw); + if ((Flags & 2) != 0) + ObjectUtils.SerializeObject(Theme, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestInstallWallPaper.cs b/src/TeleSharp.TL/TL/Account/TLRequestInstallWallPaper.cs new file mode 100644 index 0000000..c1f221a --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestInstallWallPaper.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-18000023)] + public class TLRequestInstallWallPaper : TLMethod + { + public override int Constructor + { + get + { + return -18000023; + } + } + + public TLAbsInputWallPaper Wallpaper { get; set; } + public TLWallPaperSettings Settings { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Wallpaper = (TLAbsInputWallPaper)ObjectUtils.DeserializeObject(br); + Settings = (TLWallPaperSettings)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Wallpaper, bw); + ObjectUtils.SerializeObject(Settings, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestRegisterDevice.cs b/src/TeleSharp.TL/TL/Account/TLRequestRegisterDevice.cs index c912b44..31ff31d 100644 --- a/src/TeleSharp.TL/TL/Account/TLRequestRegisterDevice.cs +++ b/src/TeleSharp.TL/TL/Account/TLRequestRegisterDevice.cs @@ -7,19 +7,24 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Account { - [TLObject(1669245048)] + [TLObject(1754754159)] public class TLRequestRegisterDevice : TLMethod { public override int Constructor { get { - return 1669245048; + return 1754754159; } } + public int Flags { get; set; } + public bool NoMuted { get; set; } public int TokenType { get; set; } public string Token { get; set; } + public bool AppSandbox { get; set; } + public byte[] Secret { get; set; } + public TLVector OtherUids { get; set; } public bool Response { get; set; } @@ -30,16 +35,26 @@ namespace TeleSharp.TL.Account public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); + NoMuted = (Flags & 1) != 0; TokenType = br.ReadInt32(); Token = StringUtil.Deserialize(br); + AppSandbox = BoolUtil.Deserialize(br); + Secret = BytesUtil.Deserialize(br); + OtherUids = (TLVector)ObjectUtils.DeserializeVector(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); + bw.Write(TokenType); StringUtil.Serialize(Token, bw); + BoolUtil.Serialize(AppSandbox, bw); + BytesUtil.Serialize(Secret, bw); + ObjectUtils.SerializeObject(OtherUids, bw); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Account/TLRequestResendPasswordEmail.cs b/src/TeleSharp.TL/TL/Account/TLRequestResendPasswordEmail.cs new file mode 100644 index 0000000..d7ba2d4 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestResendPasswordEmail.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(2055154197)] + public class TLRequestResendPasswordEmail : TLMethod + { + public override int Constructor + { + get + { + return 2055154197; + } + } + + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestResetWallPapers.cs b/src/TeleSharp.TL/TL/Account/TLRequestResetWallPapers.cs new file mode 100644 index 0000000..adbed65 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestResetWallPapers.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-1153722364)] + public class TLRequestResetWallPapers : TLMethod + { + public override int Constructor + { + get + { + return -1153722364; + } + } + + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestResetWebAuthorization.cs b/src/TeleSharp.TL/TL/Account/TLRequestResetWebAuthorization.cs new file mode 100644 index 0000000..2477fb9 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestResetWebAuthorization.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(755087855)] + public class TLRequestResetWebAuthorization : TLMethod + { + public override int Constructor + { + get + { + return 755087855; + } + } + + public long Hash { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Hash = br.ReadInt64(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Hash); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestResetWebAuthorizations.cs b/src/TeleSharp.TL/TL/Account/TLRequestResetWebAuthorizations.cs new file mode 100644 index 0000000..8aba716 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestResetWebAuthorizations.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(1747789204)] + public class TLRequestResetWebAuthorizations : TLMethod + { + public override int Constructor + { + get + { + return 1747789204; + } + } + + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestSaveAutoDownloadSettings.cs b/src/TeleSharp.TL/TL/Account/TLRequestSaveAutoDownloadSettings.cs new file mode 100644 index 0000000..775dc2d --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestSaveAutoDownloadSettings.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(1995661875)] + public class TLRequestSaveAutoDownloadSettings : TLMethod + { + public override int Constructor + { + get + { + return 1995661875; + } + } + + public int Flags { get; set; } + public bool Low { get; set; } + public bool High { get; set; } + public TLAutoDownloadSettings Settings { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Low = (Flags & 1) != 0; + High = (Flags & 2) != 0; + Settings = (TLAutoDownloadSettings)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + + ObjectUtils.SerializeObject(Settings, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestSaveSecureValue.cs b/src/TeleSharp.TL/TL/Account/TLRequestSaveSecureValue.cs new file mode 100644 index 0000000..ab8ac2c --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestSaveSecureValue.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-1986010339)] + public class TLRequestSaveSecureValue : TLMethod + { + public override int Constructor + { + get + { + return -1986010339; + } + } + + public TLInputSecureValue Value { get; set; } + public long SecureSecretId { get; set; } + public TLSecureValue Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Value = (TLInputSecureValue)ObjectUtils.DeserializeObject(br); + SecureSecretId = br.ReadInt64(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Value, bw); + bw.Write(SecureSecretId); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLSecureValue)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestSaveTheme.cs b/src/TeleSharp.TL/TL/Account/TLRequestSaveTheme.cs new file mode 100644 index 0000000..80c187a --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestSaveTheme.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-229175188)] + public class TLRequestSaveTheme : TLMethod + { + public override int Constructor + { + get + { + return -229175188; + } + } + + public TLAbsInputTheme Theme { get; set; } + public bool Unsave { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Theme = (TLAbsInputTheme)ObjectUtils.DeserializeObject(br); + Unsave = BoolUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Theme, bw); + BoolUtil.Serialize(Unsave, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestSaveWallPaper.cs b/src/TeleSharp.TL/TL/Account/TLRequestSaveWallPaper.cs new file mode 100644 index 0000000..00b8a74 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestSaveWallPaper.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(1817860919)] + public class TLRequestSaveWallPaper : TLMethod + { + public override int Constructor + { + get + { + return 1817860919; + } + } + + public TLAbsInputWallPaper Wallpaper { get; set; } + public bool Unsave { get; set; } + public TLWallPaperSettings Settings { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Wallpaper = (TLAbsInputWallPaper)ObjectUtils.DeserializeObject(br); + Unsave = BoolUtil.Deserialize(br); + Settings = (TLWallPaperSettings)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Wallpaper, bw); + BoolUtil.Serialize(Unsave, bw); + ObjectUtils.SerializeObject(Settings, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestSendChangePhoneCode.cs b/src/TeleSharp.TL/TL/Account/TLRequestSendChangePhoneCode.cs index b78d568..3f9d8bb 100644 --- a/src/TeleSharp.TL/TL/Account/TLRequestSendChangePhoneCode.cs +++ b/src/TeleSharp.TL/TL/Account/TLRequestSendChangePhoneCode.cs @@ -7,54 +7,39 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Account { - [TLObject(149257707)] + [TLObject(-2108208411)] public class TLRequestSendChangePhoneCode : TLMethod { public override int Constructor { get { - return 149257707; + return -2108208411; } } - public int Flags { get; set; } - public bool AllowFlashcall { get; set; } public string PhoneNumber { get; set; } - public bool? CurrentNumber { get; set; } + public TLCodeSettings Settings { get; set; } public Auth.TLSentCode Response { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = AllowFlashcall ? (Flags | 1) : (Flags & ~1); - Flags = CurrentNumber != null ? (Flags | 1) : (Flags & ~1); } public override void DeserializeBody(BinaryReader br) { - Flags = br.ReadInt32(); - AllowFlashcall = (Flags & 1) != 0; PhoneNumber = StringUtil.Deserialize(br); - if ((Flags & 1) != 0) - CurrentNumber = BoolUtil.Deserialize(br); - else - CurrentNumber = null; - + Settings = (TLCodeSettings)ObjectUtils.DeserializeObject(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); - bw.Write(Flags); - StringUtil.Serialize(PhoneNumber, bw); - if ((Flags & 1) != 0) - BoolUtil.Serialize(CurrentNumber.Value, bw); + ObjectUtils.SerializeObject(Settings, bw); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Account/TLRequestSendConfirmPhoneCode.cs b/src/TeleSharp.TL/TL/Account/TLRequestSendConfirmPhoneCode.cs index ad6f9fb..6d962b2 100644 --- a/src/TeleSharp.TL/TL/Account/TLRequestSendConfirmPhoneCode.cs +++ b/src/TeleSharp.TL/TL/Account/TLRequestSendConfirmPhoneCode.cs @@ -7,54 +7,39 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Account { - [TLObject(353818557)] + [TLObject(457157256)] public class TLRequestSendConfirmPhoneCode : TLMethod { public override int Constructor { get { - return 353818557; + return 457157256; } } - public int Flags { get; set; } - public bool AllowFlashcall { get; set; } public string Hash { get; set; } - public bool? CurrentNumber { get; set; } + public TLCodeSettings Settings { get; set; } public Auth.TLSentCode Response { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = AllowFlashcall ? (Flags | 1) : (Flags & ~1); - Flags = CurrentNumber != null ? (Flags | 1) : (Flags & ~1); } public override void DeserializeBody(BinaryReader br) { - Flags = br.ReadInt32(); - AllowFlashcall = (Flags & 1) != 0; Hash = StringUtil.Deserialize(br); - if ((Flags & 1) != 0) - CurrentNumber = BoolUtil.Deserialize(br); - else - CurrentNumber = null; - + Settings = (TLCodeSettings)ObjectUtils.DeserializeObject(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); - bw.Write(Flags); - StringUtil.Serialize(Hash, bw); - if ((Flags & 1) != 0) - BoolUtil.Serialize(CurrentNumber.Value, bw); + ObjectUtils.SerializeObject(Settings, bw); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Account/TLRequestSendVerifyEmailCode.cs b/src/TeleSharp.TL/TL/Account/TLRequestSendVerifyEmailCode.cs new file mode 100644 index 0000000..5dafec2 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestSendVerifyEmailCode.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(1880182943)] + public class TLRequestSendVerifyEmailCode : TLMethod + { + public override int Constructor + { + get + { + return 1880182943; + } + } + + public string Email { get; set; } + public Account.TLSentEmailCode Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Email = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Email, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Account.TLSentEmailCode)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Auth/TLRequestCheckPhone.cs b/src/TeleSharp.TL/TL/Account/TLRequestSendVerifyPhoneCode.cs similarity index 62% rename from src/TeleSharp.TL/TL/Auth/TLRequestCheckPhone.cs rename to src/TeleSharp.TL/TL/Account/TLRequestSendVerifyPhoneCode.cs index f7ea4c3..d7a9076 100644 --- a/src/TeleSharp.TL/TL/Auth/TLRequestCheckPhone.cs +++ b/src/TeleSharp.TL/TL/Account/TLRequestSendVerifyPhoneCode.cs @@ -5,21 +5,22 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using TeleSharp.TL; -namespace TeleSharp.TL.Auth +namespace TeleSharp.TL.Account { - [TLObject(1877286395)] - public class TLRequestCheckPhone : TLMethod + [TLObject(-1516022023)] + public class TLRequestSendVerifyPhoneCode : TLMethod { public override int Constructor { get { - return 1877286395; + return -1516022023; } } public string PhoneNumber { get; set; } - public Auth.TLCheckedPhone Response { get; set; } + public TLCodeSettings Settings { get; set; } + public Auth.TLSentCode Response { get; set; } public void ComputeFlags() @@ -30,6 +31,7 @@ namespace TeleSharp.TL.Auth public override void DeserializeBody(BinaryReader br) { PhoneNumber = StringUtil.Deserialize(br); + Settings = (TLCodeSettings)ObjectUtils.DeserializeObject(br); } @@ -37,11 +39,12 @@ namespace TeleSharp.TL.Auth { bw.Write(Constructor); StringUtil.Serialize(PhoneNumber, bw); + ObjectUtils.SerializeObject(Settings, bw); } public override void DeserializeResponse(BinaryReader br) { - Response = (Auth.TLCheckedPhone)ObjectUtils.DeserializeObject(br); + Response = (Auth.TLSentCode)ObjectUtils.DeserializeObject(br); } } diff --git a/src/TeleSharp.TL/TL/Account/TLRequestSetContactSignUpNotification.cs b/src/TeleSharp.TL/TL/Account/TLRequestSetContactSignUpNotification.cs new file mode 100644 index 0000000..e046c7a --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestSetContactSignUpNotification.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-806076575)] + public class TLRequestSetContactSignUpNotification : TLMethod + { + public override int Constructor + { + get + { + return -806076575; + } + } + + public bool Silent { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Silent = BoolUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + BoolUtil.Serialize(Silent, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestSetContentSettings.cs b/src/TeleSharp.TL/TL/Account/TLRequestSetContentSettings.cs new file mode 100644 index 0000000..f2d50cf --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestSetContentSettings.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-1250643605)] + public class TLRequestSetContentSettings : TLMethod + { + public override int Constructor + { + get + { + return -1250643605; + } + } + + public int Flags { get; set; } + public bool SensitiveEnabled { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + SensitiveEnabled = (Flags & 1) != 0; + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestUnregisterDevice.cs b/src/TeleSharp.TL/TL/Account/TLRequestUnregisterDevice.cs index 3fb2fb2..387db11 100644 --- a/src/TeleSharp.TL/TL/Account/TLRequestUnregisterDevice.cs +++ b/src/TeleSharp.TL/TL/Account/TLRequestUnregisterDevice.cs @@ -7,19 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Account { - [TLObject(1707432768)] + [TLObject(813089983)] public class TLRequestUnregisterDevice : TLMethod { public override int Constructor { get { - return 1707432768; + return 813089983; } } public int TokenType { get; set; } public string Token { get; set; } + public TLVector OtherUids { get; set; } public bool Response { get; set; } @@ -32,6 +33,7 @@ namespace TeleSharp.TL.Account { TokenType = br.ReadInt32(); Token = StringUtil.Deserialize(br); + OtherUids = (TLVector)ObjectUtils.DeserializeVector(br); } @@ -40,6 +42,7 @@ namespace TeleSharp.TL.Account bw.Write(Constructor); bw.Write(TokenType); StringUtil.Serialize(Token, bw); + ObjectUtils.SerializeObject(OtherUids, bw); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Account/TLRequestUpdatePasswordSettings.cs b/src/TeleSharp.TL/TL/Account/TLRequestUpdatePasswordSettings.cs index 67b01d0..dbf7a82 100644 --- a/src/TeleSharp.TL/TL/Account/TLRequestUpdatePasswordSettings.cs +++ b/src/TeleSharp.TL/TL/Account/TLRequestUpdatePasswordSettings.cs @@ -7,18 +7,18 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Account { - [TLObject(-92517498)] + [TLObject(-1516564433)] public class TLRequestUpdatePasswordSettings : TLMethod { public override int Constructor { get { - return -92517498; + return -1516564433; } } - public byte[] CurrentPasswordHash { get; set; } + public TLAbsInputCheckPasswordSRP Password { get; set; } public Account.TLPasswordInputSettings NewSettings { get; set; } public bool Response { get; set; } @@ -30,7 +30,7 @@ namespace TeleSharp.TL.Account public override void DeserializeBody(BinaryReader br) { - CurrentPasswordHash = BytesUtil.Deserialize(br); + Password = (TLAbsInputCheckPasswordSRP)ObjectUtils.DeserializeObject(br); NewSettings = (Account.TLPasswordInputSettings)ObjectUtils.DeserializeObject(br); } @@ -38,7 +38,7 @@ namespace TeleSharp.TL.Account public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - BytesUtil.Serialize(CurrentPasswordHash, bw); + ObjectUtils.SerializeObject(Password, bw); ObjectUtils.SerializeObject(NewSettings, bw); } diff --git a/src/TeleSharp.TL/TL/Account/TLRequestUpdateProfile.cs b/src/TeleSharp.TL/TL/Account/TLRequestUpdateProfile.cs index 776c008..90b469c 100644 --- a/src/TeleSharp.TL/TL/Account/TLRequestUpdateProfile.cs +++ b/src/TeleSharp.TL/TL/Account/TLRequestUpdateProfile.cs @@ -27,10 +27,6 @@ namespace TeleSharp.TL.Account public void ComputeFlags() { - Flags = 0; - Flags = FirstName != null ? (Flags | 1) : (Flags & ~1); - Flags = LastName != null ? (Flags | 2) : (Flags & ~2); - Flags = About != null ? (Flags | 4) : (Flags & ~4); } @@ -58,7 +54,6 @@ namespace TeleSharp.TL.Account public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); if ((Flags & 1) != 0) StringUtil.Serialize(FirstName, bw); diff --git a/src/TeleSharp.TL/TL/Account/TLRequestUpdateTheme.cs b/src/TeleSharp.TL/TL/Account/TLRequestUpdateTheme.cs new file mode 100644 index 0000000..c397493 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestUpdateTheme.cs @@ -0,0 +1,86 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(1555261397)] + public class TLRequestUpdateTheme : TLMethod + { + public override int Constructor + { + get + { + return 1555261397; + } + } + + public int Flags { get; set; } + public string Format { get; set; } + public TLAbsInputTheme Theme { get; set; } + public string Slug { get; set; } + public string Title { get; set; } + public TLAbsInputDocument Document { get; set; } + public TLInputThemeSettings Settings { get; set; } + public TLTheme Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Format = StringUtil.Deserialize(br); + Theme = (TLAbsInputTheme)ObjectUtils.DeserializeObject(br); + if ((Flags & 1) != 0) + Slug = StringUtil.Deserialize(br); + else + Slug = null; + + if ((Flags & 2) != 0) + Title = StringUtil.Deserialize(br); + else + Title = null; + + if ((Flags & 4) != 0) + Document = (TLAbsInputDocument)ObjectUtils.DeserializeObject(br); + else + Document = null; + + if ((Flags & 8) != 0) + Settings = (TLInputThemeSettings)ObjectUtils.DeserializeObject(br); + else + Settings = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + StringUtil.Serialize(Format, bw); + ObjectUtils.SerializeObject(Theme, bw); + if ((Flags & 1) != 0) + StringUtil.Serialize(Slug, bw); + if ((Flags & 2) != 0) + StringUtil.Serialize(Title, bw); + if ((Flags & 4) != 0) + ObjectUtils.SerializeObject(Document, bw); + if ((Flags & 8) != 0) + ObjectUtils.SerializeObject(Settings, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLTheme)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputMediaUploadedThumbDocument.cs b/src/TeleSharp.TL/TL/Account/TLRequestUploadTheme.cs similarity index 50% rename from src/TeleSharp.TL/TL/TLInputMediaUploadedThumbDocument.cs rename to src/TeleSharp.TL/TL/Account/TLRequestUploadTheme.cs index aab0341..dde56af 100644 --- a/src/TeleSharp.TL/TL/TLInputMediaUploadedThumbDocument.cs +++ b/src/TeleSharp.TL/TL/Account/TLRequestUploadTheme.cs @@ -5,32 +5,29 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using TeleSharp.TL; -namespace TeleSharp.TL +namespace TeleSharp.TL.Account { - [TLObject(1356369070)] - public class TLInputMediaUploadedThumbDocument : TLAbsInputMedia + [TLObject(473805619)] + public class TLRequestUploadTheme : TLMethod { public override int Constructor { get { - return 1356369070; + return 473805619; } } public int Flags { get; set; } public TLAbsInputFile File { get; set; } public TLAbsInputFile Thumb { get; set; } + public string FileName { get; set; } public string MimeType { get; set; } - public TLVector Attributes { get; set; } - public string Caption { get; set; } - public TLVector Stickers { get; set; } + public TLAbsDocument Response { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Stickers != null ? (Flags | 1) : (Flags & ~1); } @@ -38,30 +35,30 @@ namespace TeleSharp.TL { Flags = br.ReadInt32(); File = (TLAbsInputFile)ObjectUtils.DeserializeObject(br); - Thumb = (TLAbsInputFile)ObjectUtils.DeserializeObject(br); - MimeType = StringUtil.Deserialize(br); - Attributes = (TLVector)ObjectUtils.DeserializeVector(br); - Caption = StringUtil.Deserialize(br); if ((Flags & 1) != 0) - Stickers = (TLVector)ObjectUtils.DeserializeVector(br); + Thumb = (TLAbsInputFile)ObjectUtils.DeserializeObject(br); else - Stickers = null; + Thumb = null; + FileName = StringUtil.Deserialize(br); + MimeType = StringUtil.Deserialize(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); ObjectUtils.SerializeObject(File, bw); - ObjectUtils.SerializeObject(Thumb, bw); - StringUtil.Serialize(MimeType, bw); - ObjectUtils.SerializeObject(Attributes, bw); - StringUtil.Serialize(Caption, bw); if ((Flags & 1) != 0) - ObjectUtils.SerializeObject(Stickers, bw); + ObjectUtils.SerializeObject(Thumb, bw); + StringUtil.Serialize(FileName, bw); + StringUtil.Serialize(MimeType, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLAbsDocument)ObjectUtils.DeserializeObject(br); } } diff --git a/src/TeleSharp.TL/TL/Account/TLRequestUploadWallPaper.cs b/src/TeleSharp.TL/TL/Account/TLRequestUploadWallPaper.cs new file mode 100644 index 0000000..9ed69a0 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestUploadWallPaper.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-578472351)] + public class TLRequestUploadWallPaper : TLMethod + { + public override int Constructor + { + get + { + return -578472351; + } + } + + public TLAbsInputFile File { get; set; } + public string MimeType { get; set; } + public TLWallPaperSettings Settings { get; set; } + public TLAbsWallPaper Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + File = (TLAbsInputFile)ObjectUtils.DeserializeObject(br); + MimeType = StringUtil.Deserialize(br); + Settings = (TLWallPaperSettings)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(File, bw); + StringUtil.Serialize(MimeType, bw); + ObjectUtils.SerializeObject(Settings, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLAbsWallPaper)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestVerifyEmail.cs b/src/TeleSharp.TL/TL/Account/TLRequestVerifyEmail.cs new file mode 100644 index 0000000..eb00503 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestVerifyEmail.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-323339813)] + public class TLRequestVerifyEmail : TLMethod + { + public override int Constructor + { + get + { + return -323339813; + } + } + + public string Email { get; set; } + public string Code { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Email = StringUtil.Deserialize(br); + Code = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Email, bw); + StringUtil.Serialize(Code, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLRequestVerifyPhone.cs b/src/TeleSharp.TL/TL/Account/TLRequestVerifyPhone.cs new file mode 100644 index 0000000..9c1d0fe --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLRequestVerifyPhone.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(1305716726)] + public class TLRequestVerifyPhone : TLMethod + { + public override int Constructor + { + get + { + return 1305716726; + } + } + + public string PhoneNumber { get; set; } + public string PhoneCodeHash { get; set; } + public string PhoneCode { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + PhoneNumber = StringUtil.Deserialize(br); + PhoneCodeHash = StringUtil.Deserialize(br); + PhoneCode = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(PhoneNumber, bw); + StringUtil.Serialize(PhoneCodeHash, bw); + StringUtil.Serialize(PhoneCode, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLSentEmailCode.cs b/src/TeleSharp.TL/TL/Account/TLSentEmailCode.cs new file mode 100644 index 0000000..5ba8281 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLSentEmailCode.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-2128640689)] + public class TLSentEmailCode : TLObject + { + public override int Constructor + { + get + { + return -2128640689; + } + } + + public string EmailPattern { get; set; } + public int Length { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + EmailPattern = StringUtil.Deserialize(br); + Length = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(EmailPattern, bw); + bw.Write(Length); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLTakeout.cs b/src/TeleSharp.TL/TL/Account/TLTakeout.cs new file mode 100644 index 0000000..782a600 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLTakeout.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(1304052993)] + public class TLTakeout : TLObject + { + public override int Constructor + { + get + { + return 1304052993; + } + } + + public long Id { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Id = br.ReadInt64(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Id); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLThemes.cs b/src/TeleSharp.TL/TL/Account/TLThemes.cs new file mode 100644 index 0000000..d2f48c6 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLThemes.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(2137482273)] + public class TLThemes : TLAbsThemes + { + public override int Constructor + { + get + { + return 2137482273; + } + } + + public int Hash { get; set; } + public TLVector Themes { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Hash = br.ReadInt32(); + Themes = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Hash); + ObjectUtils.SerializeObject(Themes, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLThemesNotModified.cs b/src/TeleSharp.TL/TL/Account/TLThemesNotModified.cs new file mode 100644 index 0000000..96af78b --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLThemesNotModified.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-199313886)] + public class TLThemesNotModified : TLAbsThemes + { + public override int Constructor + { + get + { + return -199313886; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLWallPapers.cs b/src/TeleSharp.TL/TL/Account/TLWallPapers.cs new file mode 100644 index 0000000..24d36d1 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLWallPapers.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(1881892265)] + public class TLWallPapers : TLAbsWallPapers + { + public override int Constructor + { + get + { + return 1881892265; + } + } + + public int Hash { get; set; } + public TLVector Wallpapers { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Hash = br.ReadInt32(); + Wallpapers = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Hash); + ObjectUtils.SerializeObject(Wallpapers, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLWallPapersNotModified.cs b/src/TeleSharp.TL/TL/Account/TLWallPapersNotModified.cs new file mode 100644 index 0000000..8f45c51 --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLWallPapersNotModified.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(471437699)] + public class TLWallPapersNotModified : TLAbsWallPapers + { + public override int Constructor + { + get + { + return 471437699; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Account/TLWebAuthorizations.cs b/src/TeleSharp.TL/TL/Account/TLWebAuthorizations.cs new file mode 100644 index 0000000..c4dd27f --- /dev/null +++ b/src/TeleSharp.TL/TL/Account/TLWebAuthorizations.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Account +{ + [TLObject(-313079300)] + public class TLWebAuthorizations : TLObject + { + public override int Constructor + { + get + { + return -313079300; + } + } + + public TLVector Authorizations { get; set; } + public TLVector Users { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Authorizations = (TLVector)ObjectUtils.DeserializeVector(br); + Users = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Authorizations, bw); + ObjectUtils.SerializeObject(Users, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Auth/TLAbsAuthorization.cs b/src/TeleSharp.TL/TL/Auth/TLAbsAuthorization.cs new file mode 100644 index 0000000..2c8b468 --- /dev/null +++ b/src/TeleSharp.TL/TL/Auth/TLAbsAuthorization.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Auth +{ + public abstract class TLAbsAuthorization : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/Auth/TLAbsLoginToken.cs b/src/TeleSharp.TL/TL/Auth/TLAbsLoginToken.cs new file mode 100644 index 0000000..bddea42 --- /dev/null +++ b/src/TeleSharp.TL/TL/Auth/TLAbsLoginToken.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Auth +{ + public abstract class TLAbsLoginToken : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/Auth/TLAuthorization.cs b/src/TeleSharp.TL/TL/Auth/TLAuthorization.cs index 12c17e3..c4df672 100644 --- a/src/TeleSharp.TL/TL/Auth/TLAuthorization.cs +++ b/src/TeleSharp.TL/TL/Auth/TLAuthorization.cs @@ -8,7 +8,7 @@ using TeleSharp.TL; namespace TeleSharp.TL.Auth { [TLObject(-855308010)] - public class TLAuthorization : TLObject + public class TLAuthorization : TLAbsAuthorization { public override int Constructor { @@ -25,8 +25,6 @@ namespace TeleSharp.TL.Auth public void ComputeFlags() { - Flags = 0; - Flags = TmpSessions != null ? (Flags | 1) : (Flags & ~1); } @@ -45,7 +43,6 @@ namespace TeleSharp.TL.Auth public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); if ((Flags & 1) != 0) bw.Write(TmpSessions.Value); diff --git a/src/TeleSharp.TL/TL/Auth/TLAuthorizationSignUpRequired.cs b/src/TeleSharp.TL/TL/Auth/TLAuthorizationSignUpRequired.cs new file mode 100644 index 0000000..0a5bdd0 --- /dev/null +++ b/src/TeleSharp.TL/TL/Auth/TLAuthorizationSignUpRequired.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Auth +{ + [TLObject(1148485274)] + public class TLAuthorizationSignUpRequired : TLAbsAuthorization + { + public override int Constructor + { + get + { + return 1148485274; + } + } + + public int Flags { get; set; } + public Help.TLTermsOfService TermsOfService { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + if ((Flags & 1) != 0) + TermsOfService = (Help.TLTermsOfService)ObjectUtils.DeserializeObject(br); + else + TermsOfService = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + if ((Flags & 1) != 0) + ObjectUtils.SerializeObject(TermsOfService, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Auth/TLLoginToken.cs b/src/TeleSharp.TL/TL/Auth/TLLoginToken.cs new file mode 100644 index 0000000..17b92aa --- /dev/null +++ b/src/TeleSharp.TL/TL/Auth/TLLoginToken.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Auth +{ + [TLObject(1654593920)] + public class TLLoginToken : TLAbsLoginToken + { + public override int Constructor + { + get + { + return 1654593920; + } + } + + public int Expires { get; set; } + public byte[] Token { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Expires = br.ReadInt32(); + Token = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Expires); + BytesUtil.Serialize(Token, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Auth/TLLoginTokenMigrateTo.cs b/src/TeleSharp.TL/TL/Auth/TLLoginTokenMigrateTo.cs new file mode 100644 index 0000000..6e44ece --- /dev/null +++ b/src/TeleSharp.TL/TL/Auth/TLLoginTokenMigrateTo.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Auth +{ + [TLObject(110008598)] + public class TLLoginTokenMigrateTo : TLAbsLoginToken + { + public override int Constructor + { + get + { + return 110008598; + } + } + + public int DcId { get; set; } + public byte[] Token { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + DcId = br.ReadInt32(); + Token = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(DcId); + BytesUtil.Serialize(Token, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Auth/TLCheckedPhone.cs b/src/TeleSharp.TL/TL/Auth/TLLoginTokenSuccess.cs similarity index 62% rename from src/TeleSharp.TL/TL/Auth/TLCheckedPhone.cs rename to src/TeleSharp.TL/TL/Auth/TLLoginTokenSuccess.cs index 98f33c8..4917551 100644 --- a/src/TeleSharp.TL/TL/Auth/TLCheckedPhone.cs +++ b/src/TeleSharp.TL/TL/Auth/TLLoginTokenSuccess.cs @@ -7,18 +7,18 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Auth { - [TLObject(-2128698738)] - public class TLCheckedPhone : TLObject + [TLObject(957176926)] + public class TLLoginTokenSuccess : TLAbsLoginToken { public override int Constructor { get { - return -2128698738; + return 957176926; } } - public bool PhoneRegistered { get; set; } + public Auth.TLAbsAuthorization Authorization { get; set; } public void ComputeFlags() @@ -28,14 +28,14 @@ namespace TeleSharp.TL.Auth public override void DeserializeBody(BinaryReader br) { - PhoneRegistered = BoolUtil.Deserialize(br); + Authorization = (Auth.TLAbsAuthorization)ObjectUtils.DeserializeObject(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - BoolUtil.Serialize(PhoneRegistered, bw); + ObjectUtils.SerializeObject(Authorization, bw); } } diff --git a/src/TeleSharp.TL/TL/Auth/TLRequestAcceptLoginToken.cs b/src/TeleSharp.TL/TL/Auth/TLRequestAcceptLoginToken.cs new file mode 100644 index 0000000..3c96965 --- /dev/null +++ b/src/TeleSharp.TL/TL/Auth/TLRequestAcceptLoginToken.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Auth +{ + [TLObject(-392909491)] + public class TLRequestAcceptLoginToken : TLMethod + { + public override int Constructor + { + get + { + return -392909491; + } + } + + public byte[] Token { get; set; } + public TLAuthorization Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Token = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + BytesUtil.Serialize(Token, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLAuthorization)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Auth/TLRequestCheckPassword.cs b/src/TeleSharp.TL/TL/Auth/TLRequestCheckPassword.cs index dd7c6fc..ab52504 100644 --- a/src/TeleSharp.TL/TL/Auth/TLRequestCheckPassword.cs +++ b/src/TeleSharp.TL/TL/Auth/TLRequestCheckPassword.cs @@ -7,19 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Auth { - [TLObject(174260510)] + [TLObject(-779399914)] public class TLRequestCheckPassword : TLMethod { public override int Constructor { get { - return 174260510; + return -779399914; } } - public byte[] PasswordHash { get; set; } - public Auth.TLAuthorization Response { get; set; } + public TLAbsInputCheckPasswordSRP Password { get; set; } + public Auth.TLAbsAuthorization Response { get; set; } public void ComputeFlags() @@ -29,19 +29,19 @@ namespace TeleSharp.TL.Auth public override void DeserializeBody(BinaryReader br) { - PasswordHash = BytesUtil.Deserialize(br); + Password = (TLAbsInputCheckPasswordSRP)ObjectUtils.DeserializeObject(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - BytesUtil.Serialize(PasswordHash, bw); + ObjectUtils.SerializeObject(Password, bw); } public override void DeserializeResponse(BinaryReader br) { - Response = (Auth.TLAuthorization)ObjectUtils.DeserializeObject(br); + Response = (Auth.TLAbsAuthorization)ObjectUtils.DeserializeObject(br); } } diff --git a/src/TeleSharp.TL/TL/Auth/TLRequestExportLoginToken.cs b/src/TeleSharp.TL/TL/Auth/TLRequestExportLoginToken.cs new file mode 100644 index 0000000..89e35c9 --- /dev/null +++ b/src/TeleSharp.TL/TL/Auth/TLRequestExportLoginToken.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Auth +{ + [TLObject(-1313598185)] + public class TLRequestExportLoginToken : TLMethod + { + public override int Constructor + { + get + { + return -1313598185; + } + } + + public int ApiId { get; set; } + public string ApiHash { get; set; } + public TLVector ExceptIds { get; set; } + public Auth.TLAbsLoginToken Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + ApiId = br.ReadInt32(); + ApiHash = StringUtil.Deserialize(br); + ExceptIds = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(ApiId); + StringUtil.Serialize(ApiHash, bw); + ObjectUtils.SerializeObject(ExceptIds, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Auth.TLAbsLoginToken)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Auth/TLRequestImportAuthorization.cs b/src/TeleSharp.TL/TL/Auth/TLRequestImportAuthorization.cs index 9b6041d..e2500a8 100644 --- a/src/TeleSharp.TL/TL/Auth/TLRequestImportAuthorization.cs +++ b/src/TeleSharp.TL/TL/Auth/TLRequestImportAuthorization.cs @@ -20,7 +20,7 @@ namespace TeleSharp.TL.Auth public int Id { get; set; } public byte[] Bytes { get; set; } - public Auth.TLAuthorization Response { get; set; } + public Auth.TLAbsAuthorization Response { get; set; } public void ComputeFlags() @@ -44,7 +44,7 @@ namespace TeleSharp.TL.Auth } public override void DeserializeResponse(BinaryReader br) { - Response = (Auth.TLAuthorization)ObjectUtils.DeserializeObject(br); + Response = (Auth.TLAbsAuthorization)ObjectUtils.DeserializeObject(br); } } diff --git a/src/TeleSharp.TL/TL/Auth/TLRequestImportBotAuthorization.cs b/src/TeleSharp.TL/TL/Auth/TLRequestImportBotAuthorization.cs index 732ffba..bde516e 100644 --- a/src/TeleSharp.TL/TL/Auth/TLRequestImportBotAuthorization.cs +++ b/src/TeleSharp.TL/TL/Auth/TLRequestImportBotAuthorization.cs @@ -22,12 +22,11 @@ namespace TeleSharp.TL.Auth public int ApiId { get; set; } public string ApiHash { get; set; } public string BotAuthToken { get; set; } - public Auth.TLAuthorization Response { get; set; } + public Auth.TLAbsAuthorization Response { get; set; } public void ComputeFlags() { - Flags = 0; } @@ -43,7 +42,6 @@ namespace TeleSharp.TL.Auth public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(ApiId); StringUtil.Serialize(ApiHash, bw); @@ -52,7 +50,7 @@ namespace TeleSharp.TL.Auth } public override void DeserializeResponse(BinaryReader br) { - Response = (Auth.TLAuthorization)ObjectUtils.DeserializeObject(br); + Response = (Auth.TLAbsAuthorization)ObjectUtils.DeserializeObject(br); } } diff --git a/src/TeleSharp.TL/TL/Auth/TLRequestImportLoginToken.cs b/src/TeleSharp.TL/TL/Auth/TLRequestImportLoginToken.cs new file mode 100644 index 0000000..b26fe44 --- /dev/null +++ b/src/TeleSharp.TL/TL/Auth/TLRequestImportLoginToken.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Auth +{ + [TLObject(-1783866140)] + public class TLRequestImportLoginToken : TLMethod + { + public override int Constructor + { + get + { + return -1783866140; + } + } + + public byte[] Token { get; set; } + public Auth.TLAbsLoginToken Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Token = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + BytesUtil.Serialize(Token, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Auth.TLAbsLoginToken)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Auth/TLRequestRecoverPassword.cs b/src/TeleSharp.TL/TL/Auth/TLRequestRecoverPassword.cs index 7ebfe41..2e35379 100644 --- a/src/TeleSharp.TL/TL/Auth/TLRequestRecoverPassword.cs +++ b/src/TeleSharp.TL/TL/Auth/TLRequestRecoverPassword.cs @@ -19,7 +19,7 @@ namespace TeleSharp.TL.Auth } public string Code { get; set; } - public Auth.TLAuthorization Response { get; set; } + public Auth.TLAbsAuthorization Response { get; set; } public void ComputeFlags() @@ -41,7 +41,7 @@ namespace TeleSharp.TL.Auth } public override void DeserializeResponse(BinaryReader br) { - Response = (Auth.TLAuthorization)ObjectUtils.DeserializeObject(br); + Response = (Auth.TLAbsAuthorization)ObjectUtils.DeserializeObject(br); } } diff --git a/src/TeleSharp.TL/TL/Auth/TLRequestSendCode.cs b/src/TeleSharp.TL/TL/Auth/TLRequestSendCode.cs index 74950a6..146a3b9 100644 --- a/src/TeleSharp.TL/TL/Auth/TLRequestSendCode.cs +++ b/src/TeleSharp.TL/TL/Auth/TLRequestSendCode.cs @@ -7,60 +7,45 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Auth { - [TLObject(-2035355412)] + [TLObject(-1502141361)] public class TLRequestSendCode : TLMethod { public override int Constructor { get { - return -2035355412; + return -1502141361; } } - public int Flags { get; set; } - public bool AllowFlashcall { get; set; } public string PhoneNumber { get; set; } - public bool? CurrentNumber { get; set; } public int ApiId { get; set; } public string ApiHash { get; set; } + public TLCodeSettings Settings { get; set; } public Auth.TLSentCode Response { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = AllowFlashcall ? (Flags | 1) : (Flags & ~1); - Flags = CurrentNumber != null ? (Flags | 1) : (Flags & ~1); } public override void DeserializeBody(BinaryReader br) { - Flags = br.ReadInt32(); - AllowFlashcall = (Flags & 1) != 0; PhoneNumber = StringUtil.Deserialize(br); - if ((Flags & 1) != 0) - CurrentNumber = BoolUtil.Deserialize(br); - else - CurrentNumber = null; - ApiId = br.ReadInt32(); ApiHash = StringUtil.Deserialize(br); + Settings = (TLCodeSettings)ObjectUtils.DeserializeObject(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); - bw.Write(Flags); - StringUtil.Serialize(PhoneNumber, bw); - if ((Flags & 1) != 0) - BoolUtil.Serialize(CurrentNumber.Value, bw); bw.Write(ApiId); StringUtil.Serialize(ApiHash, bw); + ObjectUtils.SerializeObject(Settings, bw); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Auth/TLRequestSignIn.cs b/src/TeleSharp.TL/TL/Auth/TLRequestSignIn.cs index 5f6ee13..9a75047 100644 --- a/src/TeleSharp.TL/TL/Auth/TLRequestSignIn.cs +++ b/src/TeleSharp.TL/TL/Auth/TLRequestSignIn.cs @@ -21,7 +21,7 @@ namespace TeleSharp.TL.Auth public string PhoneNumber { get; set; } public string PhoneCodeHash { get; set; } public string PhoneCode { get; set; } - public Auth.TLAuthorization Response { get; set; } + public Auth.TLAbsAuthorization Response { get; set; } public void ComputeFlags() @@ -47,7 +47,7 @@ namespace TeleSharp.TL.Auth } public override void DeserializeResponse(BinaryReader br) { - Response = (Auth.TLAuthorization)ObjectUtils.DeserializeObject(br); + Response = (Auth.TLAbsAuthorization)ObjectUtils.DeserializeObject(br); } } diff --git a/src/TeleSharp.TL/TL/Auth/TLRequestSignUp.cs b/src/TeleSharp.TL/TL/Auth/TLRequestSignUp.cs index 2e5ee69..a871429 100644 --- a/src/TeleSharp.TL/TL/Auth/TLRequestSignUp.cs +++ b/src/TeleSharp.TL/TL/Auth/TLRequestSignUp.cs @@ -7,20 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Auth { - [TLObject(453408308)] + [TLObject(-2131827673)] public class TLRequestSignUp : TLMethod { public override int Constructor { get { - return 453408308; + return -2131827673; } } public string PhoneNumber { get; set; } public string PhoneCodeHash { get; set; } - public string PhoneCode { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public Auth.TLAuthorization Response { get; set; } @@ -35,7 +34,6 @@ namespace TeleSharp.TL.Auth { PhoneNumber = StringUtil.Deserialize(br); PhoneCodeHash = StringUtil.Deserialize(br); - PhoneCode = StringUtil.Deserialize(br); FirstName = StringUtil.Deserialize(br); LastName = StringUtil.Deserialize(br); @@ -46,7 +44,6 @@ namespace TeleSharp.TL.Auth bw.Write(Constructor); StringUtil.Serialize(PhoneNumber, bw); StringUtil.Serialize(PhoneCodeHash, bw); - StringUtil.Serialize(PhoneCode, bw); StringUtil.Serialize(FirstName, bw); StringUtil.Serialize(LastName, bw); diff --git a/src/TeleSharp.TL/TL/Auth/TLSentCode.cs b/src/TeleSharp.TL/TL/Auth/TLSentCode.cs index 4bf93e0..0f58a63 100644 --- a/src/TeleSharp.TL/TL/Auth/TLSentCode.cs +++ b/src/TeleSharp.TL/TL/Auth/TLSentCode.cs @@ -19,7 +19,6 @@ namespace TeleSharp.TL.Auth } public int Flags { get; set; } - public bool PhoneRegistered { get; set; } public Auth.TLAbsSentCodeType Type { get; set; } public string PhoneCodeHash { get; set; } public Auth.TLAbsCodeType NextType { get; set; } @@ -28,17 +27,12 @@ namespace TeleSharp.TL.Auth public void ComputeFlags() { - Flags = 0; - Flags = PhoneRegistered ? (Flags | 1) : (Flags & ~1); - Flags = NextType != null ? (Flags | 2) : (Flags & ~2); - Flags = Timeout != null ? (Flags | 4) : (Flags & ~4); } public override void DeserializeBody(BinaryReader br) { Flags = br.ReadInt32(); - PhoneRegistered = (Flags & 1) != 0; Type = (Auth.TLAbsSentCodeType)ObjectUtils.DeserializeObject(br); PhoneCodeHash = StringUtil.Deserialize(br); if ((Flags & 2) != 0) @@ -57,9 +51,7 @@ namespace TeleSharp.TL.Auth public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); - ObjectUtils.SerializeObject(Type, bw); StringUtil.Serialize(PhoneCodeHash, bw); if ((Flags & 2) != 0) diff --git a/src/TeleSharp.TL/TL/Channels/TLAbsChannelParticipants.cs b/src/TeleSharp.TL/TL/Channels/TLAbsChannelParticipants.cs new file mode 100644 index 0000000..996990e --- /dev/null +++ b/src/TeleSharp.TL/TL/Channels/TLAbsChannelParticipants.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Channels +{ + public abstract class TLAbsChannelParticipants : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/Channels/TLAdminLogResults.cs b/src/TeleSharp.TL/TL/Channels/TLAdminLogResults.cs new file mode 100644 index 0000000..65febe6 --- /dev/null +++ b/src/TeleSharp.TL/TL/Channels/TLAdminLogResults.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Channels +{ + [TLObject(-309659827)] + public class TLAdminLogResults : TLObject + { + public override int Constructor + { + get + { + return -309659827; + } + } + + public TLVector Events { get; set; } + public TLVector Chats { get; set; } + public TLVector Users { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Events = (TLVector)ObjectUtils.DeserializeVector(br); + Chats = (TLVector)ObjectUtils.DeserializeVector(br); + Users = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Events, bw); + ObjectUtils.SerializeObject(Chats, bw); + ObjectUtils.SerializeObject(Users, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Channels/TLChannelParticipants.cs b/src/TeleSharp.TL/TL/Channels/TLChannelParticipants.cs index ac6650f..fd909e0 100644 --- a/src/TeleSharp.TL/TL/Channels/TLChannelParticipants.cs +++ b/src/TeleSharp.TL/TL/Channels/TLChannelParticipants.cs @@ -8,7 +8,7 @@ using TeleSharp.TL; namespace TeleSharp.TL.Channels { [TLObject(-177282392)] - public class TLChannelParticipants : TLObject + public class TLChannelParticipants : TLAbsChannelParticipants { public override int Constructor { diff --git a/src/TeleSharp.TL/TL/Channels/TLChannelParticipantsNotModified.cs b/src/TeleSharp.TL/TL/Channels/TLChannelParticipantsNotModified.cs new file mode 100644 index 0000000..abc7019 --- /dev/null +++ b/src/TeleSharp.TL/TL/Channels/TLChannelParticipantsNotModified.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Channels +{ + [TLObject(-266911767)] + public class TLChannelParticipantsNotModified : TLAbsChannelParticipants + { + public override int Constructor + { + get + { + return -266911767; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Channels/TLRequestCreateChannel.cs b/src/TeleSharp.TL/TL/Channels/TLRequestCreateChannel.cs index ccd557d..2f67cd3 100644 --- a/src/TeleSharp.TL/TL/Channels/TLRequestCreateChannel.cs +++ b/src/TeleSharp.TL/TL/Channels/TLRequestCreateChannel.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Channels { - [TLObject(-192332417)] + [TLObject(1029681423)] public class TLRequestCreateChannel : TLMethod { public override int Constructor { get { - return -192332417; + return 1029681423; } } @@ -23,14 +23,13 @@ namespace TeleSharp.TL.Channels public bool Megagroup { get; set; } public string Title { get; set; } public string About { get; set; } + public TLAbsInputGeoPoint GeoPoint { get; set; } + public string Address { get; set; } public TLAbsUpdates Response { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Broadcast ? (Flags | 1) : (Flags & ~1); - Flags = Megagroup ? (Flags | 2) : (Flags & ~2); } @@ -41,18 +40,31 @@ namespace TeleSharp.TL.Channels Megagroup = (Flags & 2) != 0; Title = StringUtil.Deserialize(br); About = StringUtil.Deserialize(br); + if ((Flags & 4) != 0) + GeoPoint = (TLAbsInputGeoPoint)ObjectUtils.DeserializeObject(br); + else + GeoPoint = null; + + if ((Flags & 4) != 0) + Address = StringUtil.Deserialize(br); + else + Address = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); StringUtil.Serialize(Title, bw); StringUtil.Serialize(About, bw); + if ((Flags & 4) != 0) + ObjectUtils.SerializeObject(GeoPoint, bw); + if ((Flags & 4) != 0) + StringUtil.Serialize(Address, bw); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Channels/TLRequestEditAbout.cs b/src/TeleSharp.TL/TL/Channels/TLRequestDeleteHistory.cs similarity index 79% rename from src/TeleSharp.TL/TL/Channels/TLRequestEditAbout.cs rename to src/TeleSharp.TL/TL/Channels/TLRequestDeleteHistory.cs index 77b480a..60cd3fd 100644 --- a/src/TeleSharp.TL/TL/Channels/TLRequestEditAbout.cs +++ b/src/TeleSharp.TL/TL/Channels/TLRequestDeleteHistory.cs @@ -7,19 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Channels { - [TLObject(333610782)] - public class TLRequestEditAbout : TLMethod + [TLObject(-1355375294)] + public class TLRequestDeleteHistory : TLMethod { public override int Constructor { get { - return 333610782; + return -1355375294; } } public TLAbsInputChannel Channel { get; set; } - public string About { get; set; } + public int MaxId { get; set; } public bool Response { get; set; } @@ -31,7 +31,7 @@ namespace TeleSharp.TL.Channels public override void DeserializeBody(BinaryReader br) { Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br); - About = StringUtil.Deserialize(br); + MaxId = br.ReadInt32(); } @@ -39,7 +39,7 @@ namespace TeleSharp.TL.Channels { bw.Write(Constructor); ObjectUtils.SerializeObject(Channel, bw); - StringUtil.Serialize(About, bw); + bw.Write(MaxId); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Channels/TLRequestEditAdmin.cs b/src/TeleSharp.TL/TL/Channels/TLRequestEditAdmin.cs index da2885b..d2276aa 100644 --- a/src/TeleSharp.TL/TL/Channels/TLRequestEditAdmin.cs +++ b/src/TeleSharp.TL/TL/Channels/TLRequestEditAdmin.cs @@ -7,20 +7,21 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Channels { - [TLObject(-344583728)] + [TLObject(-751007486)] public class TLRequestEditAdmin : TLMethod { public override int Constructor { get { - return -344583728; + return -751007486; } } public TLAbsInputChannel Channel { get; set; } public TLAbsInputUser UserId { get; set; } - public TLAbsChannelParticipantRole Role { get; set; } + public TLChatAdminRights AdminRights { get; set; } + public string Rank { get; set; } public TLAbsUpdates Response { get; set; } @@ -33,7 +34,8 @@ namespace TeleSharp.TL.Channels { Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br); UserId = (TLAbsInputUser)ObjectUtils.DeserializeObject(br); - Role = (TLAbsChannelParticipantRole)ObjectUtils.DeserializeObject(br); + AdminRights = (TLChatAdminRights)ObjectUtils.DeserializeObject(br); + Rank = StringUtil.Deserialize(br); } @@ -42,7 +44,8 @@ namespace TeleSharp.TL.Channels bw.Write(Constructor); ObjectUtils.SerializeObject(Channel, bw); ObjectUtils.SerializeObject(UserId, bw); - ObjectUtils.SerializeObject(Role, bw); + ObjectUtils.SerializeObject(AdminRights, bw); + StringUtil.Serialize(Rank, bw); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Channels/TLRequestKickFromChannel.cs b/src/TeleSharp.TL/TL/Channels/TLRequestEditBanned.cs similarity index 78% rename from src/TeleSharp.TL/TL/Channels/TLRequestKickFromChannel.cs rename to src/TeleSharp.TL/TL/Channels/TLRequestEditBanned.cs index 2c3834e..1b51eb8 100644 --- a/src/TeleSharp.TL/TL/Channels/TLRequestKickFromChannel.cs +++ b/src/TeleSharp.TL/TL/Channels/TLRequestEditBanned.cs @@ -7,20 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Channels { - [TLObject(-1502421484)] - public class TLRequestKickFromChannel : TLMethod + [TLObject(1920559378)] + public class TLRequestEditBanned : TLMethod { public override int Constructor { get { - return -1502421484; + return 1920559378; } } public TLAbsInputChannel Channel { get; set; } public TLAbsInputUser UserId { get; set; } - public bool Kicked { get; set; } + public TLChatBannedRights BannedRights { get; set; } public TLAbsUpdates Response { get; set; } @@ -33,7 +33,7 @@ namespace TeleSharp.TL.Channels { Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br); UserId = (TLAbsInputUser)ObjectUtils.DeserializeObject(br); - Kicked = BoolUtil.Deserialize(br); + BannedRights = (TLChatBannedRights)ObjectUtils.DeserializeObject(br); } @@ -42,7 +42,7 @@ namespace TeleSharp.TL.Channels bw.Write(Constructor); ObjectUtils.SerializeObject(Channel, bw); ObjectUtils.SerializeObject(UserId, bw); - BoolUtil.Serialize(Kicked, bw); + ObjectUtils.SerializeObject(BannedRights, bw); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Channels/TLRequestEditCreator.cs b/src/TeleSharp.TL/TL/Channels/TLRequestEditCreator.cs new file mode 100644 index 0000000..e53332c --- /dev/null +++ b/src/TeleSharp.TL/TL/Channels/TLRequestEditCreator.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Channels +{ + [TLObject(-1892102881)] + public class TLRequestEditCreator : TLMethod + { + public override int Constructor + { + get + { + return -1892102881; + } + } + + public TLAbsInputChannel Channel { get; set; } + public TLAbsInputUser UserId { get; set; } + public TLAbsInputCheckPasswordSRP Password { get; set; } + public TLAbsUpdates Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br); + UserId = (TLAbsInputUser)ObjectUtils.DeserializeObject(br); + Password = (TLAbsInputCheckPasswordSRP)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Channel, bw); + ObjectUtils.SerializeObject(UserId, bw); + ObjectUtils.SerializeObject(Password, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Channels/TLRequestEditLocation.cs b/src/TeleSharp.TL/TL/Channels/TLRequestEditLocation.cs new file mode 100644 index 0000000..43418b8 --- /dev/null +++ b/src/TeleSharp.TL/TL/Channels/TLRequestEditLocation.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Channels +{ + [TLObject(1491484525)] + public class TLRequestEditLocation : TLMethod + { + public override int Constructor + { + get + { + return 1491484525; + } + } + + public TLAbsInputChannel Channel { get; set; } + public TLAbsInputGeoPoint GeoPoint { get; set; } + public string Address { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br); + GeoPoint = (TLAbsInputGeoPoint)ObjectUtils.DeserializeObject(br); + Address = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Channel, bw); + ObjectUtils.SerializeObject(GeoPoint, bw); + StringUtil.Serialize(Address, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Channels/TLRequestExportMessageLink.cs b/src/TeleSharp.TL/TL/Channels/TLRequestExportMessageLink.cs index 01cd2d8..4615233 100644 --- a/src/TeleSharp.TL/TL/Channels/TLRequestExportMessageLink.cs +++ b/src/TeleSharp.TL/TL/Channels/TLRequestExportMessageLink.cs @@ -7,19 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Channels { - [TLObject(-934882771)] + [TLObject(-826838685)] public class TLRequestExportMessageLink : TLMethod { public override int Constructor { get { - return -934882771; + return -826838685; } } public TLAbsInputChannel Channel { get; set; } public int Id { get; set; } + public bool Grouped { get; set; } public TLExportedMessageLink Response { get; set; } @@ -32,6 +33,7 @@ namespace TeleSharp.TL.Channels { Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br); Id = br.ReadInt32(); + Grouped = BoolUtil.Deserialize(br); } @@ -40,6 +42,7 @@ namespace TeleSharp.TL.Channels bw.Write(Constructor); ObjectUtils.SerializeObject(Channel, bw); bw.Write(Id); + BoolUtil.Serialize(Grouped, bw); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Channels/TLRequestGetAdminLog.cs b/src/TeleSharp.TL/TL/Channels/TLRequestGetAdminLog.cs new file mode 100644 index 0000000..a66c108 --- /dev/null +++ b/src/TeleSharp.TL/TL/Channels/TLRequestGetAdminLog.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Channels +{ + [TLObject(870184064)] + public class TLRequestGetAdminLog : TLMethod + { + public override int Constructor + { + get + { + return 870184064; + } + } + + public int Flags { get; set; } + public TLAbsInputChannel Channel { get; set; } + public string Q { get; set; } + public TLChannelAdminLogEventsFilter EventsFilter { get; set; } + public TLVector Admins { get; set; } + public long MaxId { get; set; } + public long MinId { get; set; } + public int Limit { get; set; } + public Channels.TLAdminLogResults Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br); + Q = StringUtil.Deserialize(br); + if ((Flags & 1) != 0) + EventsFilter = (TLChannelAdminLogEventsFilter)ObjectUtils.DeserializeObject(br); + else + EventsFilter = null; + + if ((Flags & 2) != 0) + Admins = (TLVector)ObjectUtils.DeserializeVector(br); + else + Admins = null; + + MaxId = br.ReadInt64(); + MinId = br.ReadInt64(); + Limit = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + ObjectUtils.SerializeObject(Channel, bw); + StringUtil.Serialize(Q, bw); + if ((Flags & 1) != 0) + ObjectUtils.SerializeObject(EventsFilter, bw); + if ((Flags & 2) != 0) + ObjectUtils.SerializeObject(Admins, bw); + bw.Write(MaxId); + bw.Write(MinId); + bw.Write(Limit); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Channels.TLAdminLogResults)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Channels/TLRequestGetAdminedPublicChannels.cs b/src/TeleSharp.TL/TL/Channels/TLRequestGetAdminedPublicChannels.cs index 0409b56..1adb912 100644 --- a/src/TeleSharp.TL/TL/Channels/TLRequestGetAdminedPublicChannels.cs +++ b/src/TeleSharp.TL/TL/Channels/TLRequestGetAdminedPublicChannels.cs @@ -7,17 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Channels { - [TLObject(-1920105769)] + [TLObject(-122669393)] public class TLRequestGetAdminedPublicChannels : TLMethod { public override int Constructor { get { - return -1920105769; + return -122669393; } } + public int Flags { get; set; } + public bool ByLocation { get; set; } + public bool CheckLimit { get; set; } public Messages.TLAbsChats Response { get; set; } @@ -28,12 +31,18 @@ namespace TeleSharp.TL.Channels public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); + ByLocation = (Flags & 1) != 0; + CheckLimit = (Flags & 2) != 0; } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); + + } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Channels/TLRequestGetGroupsForDiscussion.cs b/src/TeleSharp.TL/TL/Channels/TLRequestGetGroupsForDiscussion.cs new file mode 100644 index 0000000..60d55b6 --- /dev/null +++ b/src/TeleSharp.TL/TL/Channels/TLRequestGetGroupsForDiscussion.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Channels +{ + [TLObject(-170208392)] + public class TLRequestGetGroupsForDiscussion : TLMethod + { + public override int Constructor + { + get + { + return -170208392; + } + } + + public Messages.TLAbsChats Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Messages.TLAbsChats)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Channels/TLRequestGetInactiveChannels.cs b/src/TeleSharp.TL/TL/Channels/TLRequestGetInactiveChannels.cs new file mode 100644 index 0000000..211476a --- /dev/null +++ b/src/TeleSharp.TL/TL/Channels/TLRequestGetInactiveChannels.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Channels +{ + [TLObject(300429806)] + public class TLRequestGetInactiveChannels : TLMethod + { + public override int Constructor + { + get + { + return 300429806; + } + } + + public Messages.TLInactiveChats Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Messages.TLInactiveChats)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Channels/TLRequestGetLeftChannels.cs b/src/TeleSharp.TL/TL/Channels/TLRequestGetLeftChannels.cs new file mode 100644 index 0000000..4ed95ac --- /dev/null +++ b/src/TeleSharp.TL/TL/Channels/TLRequestGetLeftChannels.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Channels +{ + [TLObject(-2092831552)] + public class TLRequestGetLeftChannels : TLMethod + { + public override int Constructor + { + get + { + return -2092831552; + } + } + + public int Offset { get; set; } + public Messages.TLAbsChats Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Offset = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Offset); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Messages.TLAbsChats)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Channels/TLRequestGetMessages.cs b/src/TeleSharp.TL/TL/Channels/TLRequestGetMessages.cs index 0469921..e4d9aa8 100644 --- a/src/TeleSharp.TL/TL/Channels/TLRequestGetMessages.cs +++ b/src/TeleSharp.TL/TL/Channels/TLRequestGetMessages.cs @@ -7,19 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Channels { - [TLObject(-1814580409)] + [TLObject(-1383294429)] public class TLRequestGetMessages : TLMethod { public override int Constructor { get { - return -1814580409; + return -1383294429; } } public TLAbsInputChannel Channel { get; set; } - public TLVector Id { get; set; } + public TLVector Id { get; set; } public Messages.TLAbsMessages Response { get; set; } @@ -31,7 +31,7 @@ namespace TeleSharp.TL.Channels public override void DeserializeBody(BinaryReader br) { Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br); - Id = (TLVector)ObjectUtils.DeserializeVector(br); + Id = (TLVector)ObjectUtils.DeserializeVector(br); } diff --git a/src/TeleSharp.TL/TL/Channels/TLRequestGetParticipants.cs b/src/TeleSharp.TL/TL/Channels/TLRequestGetParticipants.cs index ab7f76b..b5af26f 100644 --- a/src/TeleSharp.TL/TL/Channels/TLRequestGetParticipants.cs +++ b/src/TeleSharp.TL/TL/Channels/TLRequestGetParticipants.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Channels { - [TLObject(618237842)] + [TLObject(306054633)] public class TLRequestGetParticipants : TLMethod { public override int Constructor { get { - return 618237842; + return 306054633; } } @@ -22,7 +22,8 @@ namespace TeleSharp.TL.Channels public TLAbsChannelParticipantsFilter Filter { get; set; } public int Offset { get; set; } public int Limit { get; set; } - public Channels.TLChannelParticipants Response { get; set; } + public int Hash { get; set; } + public Channels.TLAbsChannelParticipants Response { get; set; } public void ComputeFlags() @@ -36,6 +37,7 @@ namespace TeleSharp.TL.Channels Filter = (TLAbsChannelParticipantsFilter)ObjectUtils.DeserializeObject(br); Offset = br.ReadInt32(); Limit = br.ReadInt32(); + Hash = br.ReadInt32(); } @@ -46,11 +48,12 @@ namespace TeleSharp.TL.Channels ObjectUtils.SerializeObject(Filter, bw); bw.Write(Offset); bw.Write(Limit); + bw.Write(Hash); } public override void DeserializeResponse(BinaryReader br) { - Response = (Channels.TLChannelParticipants)ObjectUtils.DeserializeObject(br); + Response = (Channels.TLAbsChannelParticipants)ObjectUtils.DeserializeObject(br); } } diff --git a/src/TeleSharp.TL/TL/Channels/TLRequestReadMessageContents.cs b/src/TeleSharp.TL/TL/Channels/TLRequestReadMessageContents.cs new file mode 100644 index 0000000..a7bf8d9 --- /dev/null +++ b/src/TeleSharp.TL/TL/Channels/TLRequestReadMessageContents.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Channels +{ + [TLObject(-357180360)] + public class TLRequestReadMessageContents : TLMethod + { + public override int Constructor + { + get + { + return -357180360; + } + } + + public TLAbsInputChannel Channel { get; set; } + public TLVector Id { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br); + Id = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Channel, bw); + ObjectUtils.SerializeObject(Id, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Channels/TLRequestSetDiscussionGroup.cs b/src/TeleSharp.TL/TL/Channels/TLRequestSetDiscussionGroup.cs new file mode 100644 index 0000000..547efa1 --- /dev/null +++ b/src/TeleSharp.TL/TL/Channels/TLRequestSetDiscussionGroup.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Channels +{ + [TLObject(1079520178)] + public class TLRequestSetDiscussionGroup : TLMethod + { + public override int Constructor + { + get + { + return 1079520178; + } + } + + public TLAbsInputChannel Broadcast { get; set; } + public TLAbsInputChannel Group { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Broadcast = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br); + Group = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Broadcast, bw); + ObjectUtils.SerializeObject(Group, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Channels/TLRequestSetStickers.cs b/src/TeleSharp.TL/TL/Channels/TLRequestSetStickers.cs new file mode 100644 index 0000000..ece72c3 --- /dev/null +++ b/src/TeleSharp.TL/TL/Channels/TLRequestSetStickers.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Channels +{ + [TLObject(-359881479)] + public class TLRequestSetStickers : TLMethod + { + public override int Constructor + { + get + { + return -359881479; + } + } + + public TLAbsInputChannel Channel { get; set; } + public TLAbsInputStickerSet Stickerset { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br); + Stickerset = (TLAbsInputStickerSet)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Channel, bw); + ObjectUtils.SerializeObject(Stickerset, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Channels/TLRequestToggleInvites.cs b/src/TeleSharp.TL/TL/Channels/TLRequestTogglePreHistoryHidden.cs similarity index 89% rename from src/TeleSharp.TL/TL/Channels/TLRequestToggleInvites.cs rename to src/TeleSharp.TL/TL/Channels/TLRequestTogglePreHistoryHidden.cs index 7dc57ea..018b020 100644 --- a/src/TeleSharp.TL/TL/Channels/TLRequestToggleInvites.cs +++ b/src/TeleSharp.TL/TL/Channels/TLRequestTogglePreHistoryHidden.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Channels { - [TLObject(1231065863)] - public class TLRequestToggleInvites : TLMethod + [TLObject(-356796084)] + public class TLRequestTogglePreHistoryHidden : TLMethod { public override int Constructor { get { - return 1231065863; + return -356796084; } } diff --git a/src/TeleSharp.TL/TL/Channels/TLRequestExportInvite.cs b/src/TeleSharp.TL/TL/Channels/TLRequestToggleSlowMode.cs similarity index 70% rename from src/TeleSharp.TL/TL/Channels/TLRequestExportInvite.cs rename to src/TeleSharp.TL/TL/Channels/TLRequestToggleSlowMode.cs index 0f287be..3afc2d6 100644 --- a/src/TeleSharp.TL/TL/Channels/TLRequestExportInvite.cs +++ b/src/TeleSharp.TL/TL/Channels/TLRequestToggleSlowMode.cs @@ -7,19 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Channels { - [TLObject(-950663035)] - public class TLRequestExportInvite : TLMethod + [TLObject(-304832784)] + public class TLRequestToggleSlowMode : TLMethod { public override int Constructor { get { - return -950663035; + return -304832784; } } public TLAbsInputChannel Channel { get; set; } - public TLAbsExportedChatInvite Response { get; set; } + public int Seconds { get; set; } + public TLAbsUpdates Response { get; set; } public void ComputeFlags() @@ -30,6 +31,7 @@ namespace TeleSharp.TL.Channels public override void DeserializeBody(BinaryReader br) { Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br); + Seconds = br.ReadInt32(); } @@ -37,11 +39,12 @@ namespace TeleSharp.TL.Channels { bw.Write(Constructor); ObjectUtils.SerializeObject(Channel, bw); + bw.Write(Seconds); } public override void DeserializeResponse(BinaryReader br) { - Response = (TLAbsExportedChatInvite)ObjectUtils.DeserializeObject(br); + Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br); } } diff --git a/src/TeleSharp.TL/TL/Contacts/TLContacts.cs b/src/TeleSharp.TL/TL/Contacts/TLContacts.cs index aaf63af..e6c4242 100644 --- a/src/TeleSharp.TL/TL/Contacts/TLContacts.cs +++ b/src/TeleSharp.TL/TL/Contacts/TLContacts.cs @@ -7,18 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Contacts { - [TLObject(1871416498)] + [TLObject(-353862078)] public class TLContacts : TLAbsContacts { public override int Constructor { get { - return 1871416498; + return -353862078; } } public TLVector Contacts { get; set; } + public int SavedCount { get; set; } public TLVector Users { get; set; } @@ -30,6 +31,7 @@ namespace TeleSharp.TL.Contacts public override void DeserializeBody(BinaryReader br) { Contacts = (TLVector)ObjectUtils.DeserializeVector(br); + SavedCount = br.ReadInt32(); Users = (TLVector)ObjectUtils.DeserializeVector(br); } @@ -38,6 +40,7 @@ namespace TeleSharp.TL.Contacts { bw.Write(Constructor); ObjectUtils.SerializeObject(Contacts, bw); + bw.Write(SavedCount); ObjectUtils.SerializeObject(Users, bw); } diff --git a/src/TeleSharp.TL/TL/Contacts/TLFound.cs b/src/TeleSharp.TL/TL/Contacts/TLFound.cs index 793e5b3..7070fe5 100644 --- a/src/TeleSharp.TL/TL/Contacts/TLFound.cs +++ b/src/TeleSharp.TL/TL/Contacts/TLFound.cs @@ -7,17 +7,18 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Contacts { - [TLObject(446822276)] + [TLObject(-1290580579)] public class TLFound : TLObject { public override int Constructor { get { - return 446822276; + return -1290580579; } } + public TLVector MyResults { get; set; } public TLVector Results { get; set; } public TLVector Chats { get; set; } public TLVector Users { get; set; } @@ -30,6 +31,7 @@ namespace TeleSharp.TL.Contacts public override void DeserializeBody(BinaryReader br) { + MyResults = (TLVector)ObjectUtils.DeserializeVector(br); Results = (TLVector)ObjectUtils.DeserializeVector(br); Chats = (TLVector)ObjectUtils.DeserializeVector(br); Users = (TLVector)ObjectUtils.DeserializeVector(br); @@ -39,6 +41,7 @@ namespace TeleSharp.TL.Contacts public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + ObjectUtils.SerializeObject(MyResults, bw); ObjectUtils.SerializeObject(Results, bw); ObjectUtils.SerializeObject(Chats, bw); ObjectUtils.SerializeObject(Users, bw); diff --git a/src/TeleSharp.TL/TL/Contacts/TLImportedContacts.cs b/src/TeleSharp.TL/TL/Contacts/TLImportedContacts.cs index fea30b8..a2038fa 100644 --- a/src/TeleSharp.TL/TL/Contacts/TLImportedContacts.cs +++ b/src/TeleSharp.TL/TL/Contacts/TLImportedContacts.cs @@ -7,18 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Contacts { - [TLObject(-1387117803)] + [TLObject(2010127419)] public class TLImportedContacts : TLObject { public override int Constructor { get { - return -1387117803; + return 2010127419; } } public TLVector Imported { get; set; } + public TLVector PopularInvites { get; set; } public TLVector RetryContacts { get; set; } public TLVector Users { get; set; } @@ -31,6 +32,7 @@ namespace TeleSharp.TL.Contacts public override void DeserializeBody(BinaryReader br) { Imported = (TLVector)ObjectUtils.DeserializeVector(br); + PopularInvites = (TLVector)ObjectUtils.DeserializeVector(br); RetryContacts = (TLVector)ObjectUtils.DeserializeVector(br); Users = (TLVector)ObjectUtils.DeserializeVector(br); @@ -40,6 +42,7 @@ namespace TeleSharp.TL.Contacts { bw.Write(Constructor); ObjectUtils.SerializeObject(Imported, bw); + ObjectUtils.SerializeObject(PopularInvites, bw); ObjectUtils.SerializeObject(RetryContacts, bw); ObjectUtils.SerializeObject(Users, bw); diff --git a/src/TeleSharp.TL/TL/Contacts/TLLink.cs b/src/TeleSharp.TL/TL/Contacts/TLLink.cs deleted file mode 100644 index 0d956e7..0000000 --- a/src/TeleSharp.TL/TL/Contacts/TLLink.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using TeleSharp.TL; -namespace TeleSharp.TL.Contacts -{ - [TLObject(986597452)] - public class TLLink : TLObject - { - public override int Constructor - { - get - { - return 986597452; - } - } - - public TLAbsContactLink MyLink { get; set; } - public TLAbsContactLink ForeignLink { get; set; } - public TLAbsUser User { get; set; } - - - public void ComputeFlags() - { - - } - - public override void DeserializeBody(BinaryReader br) - { - MyLink = (TLAbsContactLink)ObjectUtils.DeserializeObject(br); - ForeignLink = (TLAbsContactLink)ObjectUtils.DeserializeObject(br); - User = (TLAbsUser)ObjectUtils.DeserializeObject(br); - - } - - public override void SerializeBody(BinaryWriter bw) - { - bw.Write(Constructor); - ObjectUtils.SerializeObject(MyLink, bw); - ObjectUtils.SerializeObject(ForeignLink, bw); - ObjectUtils.SerializeObject(User, bw); - - } - } -} diff --git a/src/TeleSharp.TL/TL/Contacts/TLRequestDeleteContact.cs b/src/TeleSharp.TL/TL/Contacts/TLRequestAcceptContact.cs similarity index 76% rename from src/TeleSharp.TL/TL/Contacts/TLRequestDeleteContact.cs rename to src/TeleSharp.TL/TL/Contacts/TLRequestAcceptContact.cs index acb9f0c..a57aafe 100644 --- a/src/TeleSharp.TL/TL/Contacts/TLRequestDeleteContact.cs +++ b/src/TeleSharp.TL/TL/Contacts/TLRequestAcceptContact.cs @@ -7,19 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Contacts { - [TLObject(-1902823612)] - public class TLRequestDeleteContact : TLMethod + [TLObject(-130964977)] + public class TLRequestAcceptContact : TLMethod { public override int Constructor { get { - return -1902823612; + return -130964977; } } public TLAbsInputUser Id { get; set; } - public Contacts.TLLink Response { get; set; } + public TLAbsUpdates Response { get; set; } public void ComputeFlags() @@ -41,7 +41,7 @@ namespace TeleSharp.TL.Contacts } public override void DeserializeResponse(BinaryReader br) { - Response = (Contacts.TLLink)ObjectUtils.DeserializeObject(br); + Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br); } } diff --git a/src/TeleSharp.TL/TL/Contacts/TLRequestAddContact.cs b/src/TeleSharp.TL/TL/Contacts/TLRequestAddContact.cs new file mode 100644 index 0000000..df5d2c2 --- /dev/null +++ b/src/TeleSharp.TL/TL/Contacts/TLRequestAddContact.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Contacts +{ + [TLObject(-386636848)] + public class TLRequestAddContact : TLMethod + { + public override int Constructor + { + get + { + return -386636848; + } + } + + public int Flags { get; set; } + public bool AddPhonePrivacyException { get; set; } + public TLAbsInputUser Id { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string Phone { get; set; } + public TLAbsUpdates Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + AddPhonePrivacyException = (Flags & 1) != 0; + Id = (TLAbsInputUser)ObjectUtils.DeserializeObject(br); + FirstName = StringUtil.Deserialize(br); + LastName = StringUtil.Deserialize(br); + Phone = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + ObjectUtils.SerializeObject(Id, bw); + StringUtil.Serialize(FirstName, bw); + StringUtil.Serialize(LastName, bw); + StringUtil.Serialize(Phone, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Contacts/TLRequestImportCard.cs b/src/TeleSharp.TL/TL/Contacts/TLRequestDeleteByPhones.cs similarity index 60% rename from src/TeleSharp.TL/TL/Contacts/TLRequestImportCard.cs rename to src/TeleSharp.TL/TL/Contacts/TLRequestDeleteByPhones.cs index 82b06b1..4f8231d 100644 --- a/src/TeleSharp.TL/TL/Contacts/TLRequestImportCard.cs +++ b/src/TeleSharp.TL/TL/Contacts/TLRequestDeleteByPhones.cs @@ -7,19 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Contacts { - [TLObject(1340184318)] - public class TLRequestImportCard : TLMethod + [TLObject(269745566)] + public class TLRequestDeleteByPhones : TLMethod { public override int Constructor { get { - return 1340184318; + return 269745566; } } - public TLVector ExportCard { get; set; } - public TLAbsUser Response { get; set; } + public TLVector Phones { get; set; } + public bool Response { get; set; } public void ComputeFlags() @@ -29,19 +29,19 @@ namespace TeleSharp.TL.Contacts public override void DeserializeBody(BinaryReader br) { - ExportCard = (TLVector)ObjectUtils.DeserializeVector(br); + Phones = (TLVector)ObjectUtils.DeserializeVector(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ObjectUtils.SerializeObject(ExportCard, bw); + ObjectUtils.SerializeObject(Phones, bw); } public override void DeserializeResponse(BinaryReader br) { - Response = (TLAbsUser)ObjectUtils.DeserializeObject(br); + Response = BoolUtil.Deserialize(br); } } diff --git a/src/TeleSharp.TL/TL/Contacts/TLRequestDeleteContacts.cs b/src/TeleSharp.TL/TL/Contacts/TLRequestDeleteContacts.cs index b4d39ef..08316fb 100644 --- a/src/TeleSharp.TL/TL/Contacts/TLRequestDeleteContacts.cs +++ b/src/TeleSharp.TL/TL/Contacts/TLRequestDeleteContacts.cs @@ -7,19 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Contacts { - [TLObject(1504393374)] + [TLObject(157945344)] public class TLRequestDeleteContacts : TLMethod { public override int Constructor { get { - return 1504393374; + return 157945344; } } public TLVector Id { get; set; } - public bool Response { get; set; } + public TLAbsUpdates Response { get; set; } public void ComputeFlags() @@ -41,7 +41,7 @@ namespace TeleSharp.TL.Contacts } public override void DeserializeResponse(BinaryReader br) { - Response = BoolUtil.Deserialize(br); + Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br); } } diff --git a/src/TeleSharp.TL/TL/Contacts/TLRequestExportCard.cs b/src/TeleSharp.TL/TL/Contacts/TLRequestGetContactIDs.cs similarity index 78% rename from src/TeleSharp.TL/TL/Contacts/TLRequestExportCard.cs rename to src/TeleSharp.TL/TL/Contacts/TLRequestGetContactIDs.cs index 5c240ca..9ab50f1 100644 --- a/src/TeleSharp.TL/TL/Contacts/TLRequestExportCard.cs +++ b/src/TeleSharp.TL/TL/Contacts/TLRequestGetContactIDs.cs @@ -7,17 +7,18 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Contacts { - [TLObject(-2065352905)] - public class TLRequestExportCard : TLMethod + [TLObject(749357634)] + public class TLRequestGetContactIDs : TLMethod { public override int Constructor { get { - return -2065352905; + return 749357634; } } + public int Hash { get; set; } public TLVector Response { get; set; } @@ -28,12 +29,14 @@ namespace TeleSharp.TL.Contacts public override void DeserializeBody(BinaryReader br) { + Hash = br.ReadInt32(); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Hash); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Contacts/TLRequestGetContacts.cs b/src/TeleSharp.TL/TL/Contacts/TLRequestGetContacts.cs index 77cffcf..2524bf0 100644 --- a/src/TeleSharp.TL/TL/Contacts/TLRequestGetContacts.cs +++ b/src/TeleSharp.TL/TL/Contacts/TLRequestGetContacts.cs @@ -7,18 +7,18 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Contacts { - [TLObject(583445000)] + [TLObject(-1071414113)] public class TLRequestGetContacts : TLMethod { public override int Constructor { get { - return 583445000; + return -1071414113; } } - public string Hash { get; set; } + public int Hash { get; set; } public Contacts.TLAbsContacts Response { get; set; } @@ -29,14 +29,14 @@ namespace TeleSharp.TL.Contacts public override void DeserializeBody(BinaryReader br) { - Hash = StringUtil.Deserialize(br); + Hash = br.ReadInt32(); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - StringUtil.Serialize(Hash, bw); + bw.Write(Hash); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Contacts/TLRequestGetLocated.cs b/src/TeleSharp.TL/TL/Contacts/TLRequestGetLocated.cs new file mode 100644 index 0000000..f6b005c --- /dev/null +++ b/src/TeleSharp.TL/TL/Contacts/TLRequestGetLocated.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Contacts +{ + [TLObject(171270230)] + public class TLRequestGetLocated : TLMethod + { + public override int Constructor + { + get + { + return 171270230; + } + } + + public TLAbsInputGeoPoint GeoPoint { get; set; } + public TLAbsUpdates Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + GeoPoint = (TLAbsInputGeoPoint)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(GeoPoint, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Contacts/TLRequestGetSaved.cs b/src/TeleSharp.TL/TL/Contacts/TLRequestGetSaved.cs new file mode 100644 index 0000000..b6f6710 --- /dev/null +++ b/src/TeleSharp.TL/TL/Contacts/TLRequestGetSaved.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Contacts +{ + [TLObject(-2098076769)] + public class TLRequestGetSaved : TLMethod + { + public override int Constructor + { + get + { + return -2098076769; + } + } + + public TLVector Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLVector)ObjectUtils.DeserializeVector(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Contacts/TLRequestGetTopPeers.cs b/src/TeleSharp.TL/TL/Contacts/TLRequestGetTopPeers.cs index c4f0803..206bb6d 100644 --- a/src/TeleSharp.TL/TL/Contacts/TLRequestGetTopPeers.cs +++ b/src/TeleSharp.TL/TL/Contacts/TLRequestGetTopPeers.cs @@ -23,6 +23,8 @@ namespace TeleSharp.TL.Contacts public bool BotsPm { get; set; } public bool BotsInline { get; set; } public bool PhoneCalls { get; set; } + public bool ForwardUsers { get; set; } + public bool ForwardChats { get; set; } public bool Groups { get; set; } public bool Channels { get; set; } public int Offset { get; set; } @@ -33,13 +35,6 @@ namespace TeleSharp.TL.Contacts public void ComputeFlags() { - Flags = 0; - Flags = Correspondents ? (Flags | 1) : (Flags & ~1); - Flags = BotsPm ? (Flags | 2) : (Flags & ~2); - Flags = BotsInline ? (Flags | 4) : (Flags & ~4); - Flags = PhoneCalls ? (Flags | 8) : (Flags & ~8); - Flags = Groups ? (Flags | 1024) : (Flags & ~1024); - Flags = Channels ? (Flags | 32768) : (Flags & ~32768); } @@ -50,6 +45,8 @@ namespace TeleSharp.TL.Contacts BotsPm = (Flags & 2) != 0; BotsInline = (Flags & 4) != 0; PhoneCalls = (Flags & 8) != 0; + ForwardUsers = (Flags & 16) != 0; + ForwardChats = (Flags & 32) != 0; Groups = (Flags & 1024) != 0; Channels = (Flags & 32768) != 0; Offset = br.ReadInt32(); @@ -61,7 +58,6 @@ namespace TeleSharp.TL.Contacts public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); @@ -69,6 +65,8 @@ namespace TeleSharp.TL.Contacts + + bw.Write(Offset); bw.Write(Limit); bw.Write(Hash); diff --git a/src/TeleSharp.TL/TL/Contacts/TLRequestImportContacts.cs b/src/TeleSharp.TL/TL/Contacts/TLRequestImportContacts.cs index 076cf39..52b0af1 100644 --- a/src/TeleSharp.TL/TL/Contacts/TLRequestImportContacts.cs +++ b/src/TeleSharp.TL/TL/Contacts/TLRequestImportContacts.cs @@ -7,19 +7,18 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Contacts { - [TLObject(-634342611)] + [TLObject(746589157)] public class TLRequestImportContacts : TLMethod { public override int Constructor { get { - return -634342611; + return 746589157; } } public TLVector Contacts { get; set; } - public bool Replace { get; set; } public Contacts.TLImportedContacts Response { get; set; } @@ -31,7 +30,6 @@ namespace TeleSharp.TL.Contacts public override void DeserializeBody(BinaryReader br) { Contacts = (TLVector)ObjectUtils.DeserializeVector(br); - Replace = BoolUtil.Deserialize(br); } @@ -39,7 +37,6 @@ namespace TeleSharp.TL.Contacts { bw.Write(Constructor); ObjectUtils.SerializeObject(Contacts, bw); - BoolUtil.Serialize(Replace, bw); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Contacts/TLRequestResetSaved.cs b/src/TeleSharp.TL/TL/Contacts/TLRequestResetSaved.cs new file mode 100644 index 0000000..27f2613 --- /dev/null +++ b/src/TeleSharp.TL/TL/Contacts/TLRequestResetSaved.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Contacts +{ + [TLObject(-2020263951)] + public class TLRequestResetSaved : TLMethod + { + public override int Constructor + { + get + { + return -2020263951; + } + } + + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestToggleChatAdmins.cs b/src/TeleSharp.TL/TL/Contacts/TLRequestToggleTopPeers.cs similarity index 66% rename from src/TeleSharp.TL/TL/Messages/TLRequestToggleChatAdmins.cs rename to src/TeleSharp.TL/TL/Contacts/TLRequestToggleTopPeers.cs index 179bb89..f844862 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestToggleChatAdmins.cs +++ b/src/TeleSharp.TL/TL/Contacts/TLRequestToggleTopPeers.cs @@ -5,22 +5,21 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using TeleSharp.TL; -namespace TeleSharp.TL.Messages +namespace TeleSharp.TL.Contacts { - [TLObject(-326379039)] - public class TLRequestToggleChatAdmins : TLMethod + [TLObject(-2062238246)] + public class TLRequestToggleTopPeers : TLMethod { public override int Constructor { get { - return -326379039; + return -2062238246; } } - public int ChatId { get; set; } public bool Enabled { get; set; } - public TLAbsUpdates Response { get; set; } + public bool Response { get; set; } public void ComputeFlags() @@ -30,7 +29,6 @@ namespace TeleSharp.TL.Messages public override void DeserializeBody(BinaryReader br) { - ChatId = br.ReadInt32(); Enabled = BoolUtil.Deserialize(br); } @@ -38,13 +36,12 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - bw.Write(ChatId); BoolUtil.Serialize(Enabled, bw); } public override void DeserializeResponse(BinaryReader br) { - Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br); + Response = BoolUtil.Deserialize(br); } } diff --git a/src/TeleSharp.TL/TL/Contacts/TLTopPeersDisabled.cs b/src/TeleSharp.TL/TL/Contacts/TLTopPeersDisabled.cs new file mode 100644 index 0000000..5acd604 --- /dev/null +++ b/src/TeleSharp.TL/TL/Contacts/TLTopPeersDisabled.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Contacts +{ + [TLObject(-1255369827)] + public class TLTopPeersDisabled : TLAbsTopPeers + { + public override int Constructor + { + get + { + return -1255369827; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Folders/TLRequestDeleteFolder.cs b/src/TeleSharp.TL/TL/Folders/TLRequestDeleteFolder.cs new file mode 100644 index 0000000..bd4b3dc --- /dev/null +++ b/src/TeleSharp.TL/TL/Folders/TLRequestDeleteFolder.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Folders +{ + [TLObject(472471681)] + public class TLRequestDeleteFolder : TLMethod + { + public override int Constructor + { + get + { + return 472471681; + } + } + + public int FolderId { get; set; } + public TLAbsUpdates Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + FolderId = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(FolderId); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Folders/TLRequestEditPeerFolders.cs b/src/TeleSharp.TL/TL/Folders/TLRequestEditPeerFolders.cs new file mode 100644 index 0000000..35dd0d9 --- /dev/null +++ b/src/TeleSharp.TL/TL/Folders/TLRequestEditPeerFolders.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Folders +{ + [TLObject(1749536939)] + public class TLRequestEditPeerFolders : TLMethod + { + public override int Constructor + { + get + { + return 1749536939; + } + } + + public TLVector FolderPeers { get; set; } + public TLAbsUpdates Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + FolderPeers = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(FolderPeers, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLAbsDeepLinkInfo.cs b/src/TeleSharp.TL/TL/Help/TLAbsDeepLinkInfo.cs new file mode 100644 index 0000000..bdb4cc5 --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLAbsDeepLinkInfo.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + public abstract class TLAbsDeepLinkInfo : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLAbsPassportConfig.cs b/src/TeleSharp.TL/TL/Help/TLAbsPassportConfig.cs new file mode 100644 index 0000000..d269b2e --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLAbsPassportConfig.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + public abstract class TLAbsPassportConfig : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLAbsProxyData.cs b/src/TeleSharp.TL/TL/Help/TLAbsProxyData.cs new file mode 100644 index 0000000..911cfca --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLAbsProxyData.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + public abstract class TLAbsProxyData : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLAbsTermsOfServiceUpdate.cs b/src/TeleSharp.TL/TL/Help/TLAbsTermsOfServiceUpdate.cs new file mode 100644 index 0000000..da76158 --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLAbsTermsOfServiceUpdate.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + public abstract class TLAbsTermsOfServiceUpdate : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLAbsUserInfo.cs b/src/TeleSharp.TL/TL/Help/TLAbsUserInfo.cs new file mode 100644 index 0000000..239ba59 --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLAbsUserInfo.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + public abstract class TLAbsUserInfo : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLAppUpdate.cs b/src/TeleSharp.TL/TL/Help/TLAppUpdate.cs index a7a4772..b41df57 100644 --- a/src/TeleSharp.TL/TL/Help/TLAppUpdate.cs +++ b/src/TeleSharp.TL/TL/Help/TLAppUpdate.cs @@ -7,21 +7,25 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Help { - [TLObject(-1987579119)] + [TLObject(497489295)] public class TLAppUpdate : TLAbsAppUpdate { public override int Constructor { get { - return -1987579119; + return 497489295; } } + public int Flags { get; set; } + public bool CanNotSkip { get; set; } public int Id { get; set; } - public bool Critical { get; set; } - public string Url { get; set; } + public string Version { get; set; } public string Text { get; set; } + public TLVector Entities { get; set; } + public TLAbsDocument Document { get; set; } + public string Url { get; set; } public void ComputeFlags() @@ -31,20 +35,38 @@ namespace TeleSharp.TL.Help public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); + CanNotSkip = (Flags & 1) != 0; Id = br.ReadInt32(); - Critical = BoolUtil.Deserialize(br); - Url = StringUtil.Deserialize(br); + Version = StringUtil.Deserialize(br); Text = StringUtil.Deserialize(br); + Entities = (TLVector)ObjectUtils.DeserializeVector(br); + if ((Flags & 2) != 0) + Document = (TLAbsDocument)ObjectUtils.DeserializeObject(br); + else + Document = null; + + if ((Flags & 4) != 0) + Url = StringUtil.Deserialize(br); + else + Url = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); + bw.Write(Id); - BoolUtil.Serialize(Critical, bw); - StringUtil.Serialize(Url, bw); + StringUtil.Serialize(Version, bw); StringUtil.Serialize(Text, bw); + ObjectUtils.SerializeObject(Entities, bw); + if ((Flags & 2) != 0) + ObjectUtils.SerializeObject(Document, bw); + if ((Flags & 4) != 0) + StringUtil.Serialize(Url, bw); } } diff --git a/src/TeleSharp.TL/TL/Help/TLDeepLinkInfo.cs b/src/TeleSharp.TL/TL/Help/TLDeepLinkInfo.cs new file mode 100644 index 0000000..ec40290 --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLDeepLinkInfo.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(1783556146)] + public class TLDeepLinkInfo : TLAbsDeepLinkInfo + { + public override int Constructor + { + get + { + return 1783556146; + } + } + + public int Flags { get; set; } + public bool UpdateApp { get; set; } + public string Message { get; set; } + public TLVector Entities { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + UpdateApp = (Flags & 1) != 0; + Message = StringUtil.Deserialize(br); + if ((Flags & 2) != 0) + Entities = (TLVector)ObjectUtils.DeserializeVector(br); + else + Entities = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + StringUtil.Serialize(Message, bw); + if ((Flags & 2) != 0) + ObjectUtils.SerializeObject(Entities, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLDeepLinkInfoEmpty.cs b/src/TeleSharp.TL/TL/Help/TLDeepLinkInfoEmpty.cs new file mode 100644 index 0000000..c7604fb --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLDeepLinkInfoEmpty.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(1722786150)] + public class TLDeepLinkInfoEmpty : TLAbsDeepLinkInfo + { + public override int Constructor + { + get + { + return 1722786150; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLPassportConfig.cs b/src/TeleSharp.TL/TL/Help/TLPassportConfig.cs new file mode 100644 index 0000000..f1b6d75 --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLPassportConfig.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(-1600596305)] + public class TLPassportConfig : TLAbsPassportConfig + { + public override int Constructor + { + get + { + return -1600596305; + } + } + + public int Hash { get; set; } + public TLDataJSON CountriesLangs { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Hash = br.ReadInt32(); + CountriesLangs = (TLDataJSON)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Hash); + ObjectUtils.SerializeObject(CountriesLangs, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLPassportConfigNotModified.cs b/src/TeleSharp.TL/TL/Help/TLPassportConfigNotModified.cs new file mode 100644 index 0000000..e10dd46 --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLPassportConfigNotModified.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(-1078332329)] + public class TLPassportConfigNotModified : TLAbsPassportConfig + { + public override int Constructor + { + get + { + return -1078332329; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLProxyDataEmpty.cs b/src/TeleSharp.TL/TL/Help/TLProxyDataEmpty.cs new file mode 100644 index 0000000..072218b --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLProxyDataEmpty.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(-526508104)] + public class TLProxyDataEmpty : TLAbsProxyData + { + public override int Constructor + { + get + { + return -526508104; + } + } + + public int Expires { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Expires = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Expires); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLProxyDataPromo.cs b/src/TeleSharp.TL/TL/Help/TLProxyDataPromo.cs new file mode 100644 index 0000000..37f477f --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLProxyDataPromo.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(737668643)] + public class TLProxyDataPromo : TLAbsProxyData + { + public override int Constructor + { + get + { + return 737668643; + } + } + + public int Expires { get; set; } + public TLAbsPeer Peer { get; set; } + public TLVector Chats { get; set; } + public TLVector Users { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Expires = br.ReadInt32(); + Peer = (TLAbsPeer)ObjectUtils.DeserializeObject(br); + Chats = (TLVector)ObjectUtils.DeserializeVector(br); + Users = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Expires); + ObjectUtils.SerializeObject(Peer, bw); + ObjectUtils.SerializeObject(Chats, bw); + ObjectUtils.SerializeObject(Users, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLRecentMeUrls.cs b/src/TeleSharp.TL/TL/Help/TLRecentMeUrls.cs new file mode 100644 index 0000000..301fbc3 --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLRecentMeUrls.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(235081943)] + public class TLRecentMeUrls : TLObject + { + public override int Constructor + { + get + { + return 235081943; + } + } + + public TLVector Urls { get; set; } + public TLVector Chats { get; set; } + public TLVector Users { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Urls = (TLVector)ObjectUtils.DeserializeVector(br); + Chats = (TLVector)ObjectUtils.DeserializeVector(br); + Users = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Urls, bw); + ObjectUtils.SerializeObject(Chats, bw); + ObjectUtils.SerializeObject(Users, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLRequestAcceptTermsOfService.cs b/src/TeleSharp.TL/TL/Help/TLRequestAcceptTermsOfService.cs new file mode 100644 index 0000000..c1dd052 --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLRequestAcceptTermsOfService.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(-294455398)] + public class TLRequestAcceptTermsOfService : TLMethod + { + public override int Constructor + { + get + { + return -294455398; + } + } + + public TLDataJSON Id { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Id = (TLDataJSON)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Id, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLRequestEditUserInfo.cs b/src/TeleSharp.TL/TL/Help/TLRequestEditUserInfo.cs new file mode 100644 index 0000000..3750a3b --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLRequestEditUserInfo.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(1723407216)] + public class TLRequestEditUserInfo : TLMethod + { + public override int Constructor + { + get + { + return 1723407216; + } + } + + public TLAbsInputUser UserId { get; set; } + public string Message { get; set; } + public TLVector Entities { get; set; } + public Help.TLAbsUserInfo Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + UserId = (TLAbsInputUser)ObjectUtils.DeserializeObject(br); + Message = StringUtil.Deserialize(br); + Entities = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(UserId, bw); + StringUtil.Serialize(Message, bw); + ObjectUtils.SerializeObject(Entities, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Help.TLAbsUserInfo)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLRequestGetTermsOfService.cs b/src/TeleSharp.TL/TL/Help/TLRequestGetAppConfig.cs similarity index 71% rename from src/TeleSharp.TL/TL/Help/TLRequestGetTermsOfService.cs rename to src/TeleSharp.TL/TL/Help/TLRequestGetAppConfig.cs index db90934..ab85ffe 100644 --- a/src/TeleSharp.TL/TL/Help/TLRequestGetTermsOfService.cs +++ b/src/TeleSharp.TL/TL/Help/TLRequestGetAppConfig.cs @@ -7,18 +7,18 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Help { - [TLObject(889286899)] - public class TLRequestGetTermsOfService : TLMethod + [TLObject(-1735311088)] + public class TLRequestGetAppConfig : TLMethod { public override int Constructor { get { - return 889286899; + return -1735311088; } } - public Help.TLTermsOfService Response { get; set; } + public TLAbsJSONValue Response { get; set; } public void ComputeFlags() @@ -38,7 +38,7 @@ namespace TeleSharp.TL.Help } public override void DeserializeResponse(BinaryReader br) { - Response = (Help.TLTermsOfService)ObjectUtils.DeserializeObject(br); + Response = (TLAbsJSONValue)ObjectUtils.DeserializeObject(br); } } diff --git a/src/TeleSharp.TL/TL/Help/TLRequestGetAppUpdate.cs b/src/TeleSharp.TL/TL/Help/TLRequestGetAppUpdate.cs index 620942e..ecb4402 100644 --- a/src/TeleSharp.TL/TL/Help/TLRequestGetAppUpdate.cs +++ b/src/TeleSharp.TL/TL/Help/TLRequestGetAppUpdate.cs @@ -7,17 +7,18 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Help { - [TLObject(-1372724842)] + [TLObject(1378703997)] public class TLRequestGetAppUpdate : TLMethod { public override int Constructor { get { - return -1372724842; + return 1378703997; } } + public string Source { get; set; } public Help.TLAbsAppUpdate Response { get; set; } @@ -28,12 +29,14 @@ namespace TeleSharp.TL.Help public override void DeserializeBody(BinaryReader br) { + Source = StringUtil.Deserialize(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + StringUtil.Serialize(Source, bw); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Help/TLRequestGetDeepLinkInfo.cs b/src/TeleSharp.TL/TL/Help/TLRequestGetDeepLinkInfo.cs new file mode 100644 index 0000000..df5d93d --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLRequestGetDeepLinkInfo.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(1072547679)] + public class TLRequestGetDeepLinkInfo : TLMethod + { + public override int Constructor + { + get + { + return 1072547679; + } + } + + public string Path { get; set; } + public Help.TLAbsDeepLinkInfo Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Path = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Path, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Help.TLAbsDeepLinkInfo)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLRequestGetPassportConfig.cs b/src/TeleSharp.TL/TL/Help/TLRequestGetPassportConfig.cs new file mode 100644 index 0000000..6252e55 --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLRequestGetPassportConfig.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(-966677240)] + public class TLRequestGetPassportConfig : TLMethod + { + public override int Constructor + { + get + { + return -966677240; + } + } + + public int Hash { get; set; } + public Help.TLAbsPassportConfig Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Hash = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Hash); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Help.TLAbsPassportConfig)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLRequestGetProxyData.cs b/src/TeleSharp.TL/TL/Help/TLRequestGetProxyData.cs new file mode 100644 index 0000000..9391a30 --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLRequestGetProxyData.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(1031231713)] + public class TLRequestGetProxyData : TLMethod + { + public override int Constructor + { + get + { + return 1031231713; + } + } + + public Help.TLAbsProxyData Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Help.TLAbsProxyData)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLRequestGetRecentMeUrls.cs b/src/TeleSharp.TL/TL/Help/TLRequestGetRecentMeUrls.cs new file mode 100644 index 0000000..874b8ec --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLRequestGetRecentMeUrls.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(1036054804)] + public class TLRequestGetRecentMeUrls : TLMethod + { + public override int Constructor + { + get + { + return 1036054804; + } + } + + public string Referer { get; set; } + public Help.TLRecentMeUrls Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Referer = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Referer, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Help.TLRecentMeUrls)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLRequestGetSupportName.cs b/src/TeleSharp.TL/TL/Help/TLRequestGetSupportName.cs new file mode 100644 index 0000000..865abd5 --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLRequestGetSupportName.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(-748624084)] + public class TLRequestGetSupportName : TLMethod + { + public override int Constructor + { + get + { + return -748624084; + } + } + + public Help.TLSupportName Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Help.TLSupportName)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLRequestGetTermsOfServiceUpdate.cs b/src/TeleSharp.TL/TL/Help/TLRequestGetTermsOfServiceUpdate.cs new file mode 100644 index 0000000..70e6ae8 --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLRequestGetTermsOfServiceUpdate.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(749019089)] + public class TLRequestGetTermsOfServiceUpdate : TLMethod + { + public override int Constructor + { + get + { + return 749019089; + } + } + + public Help.TLAbsTermsOfServiceUpdate Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Help.TLAbsTermsOfServiceUpdate)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLRequestGetUserInfo.cs b/src/TeleSharp.TL/TL/Help/TLRequestGetUserInfo.cs new file mode 100644 index 0000000..c19870e --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLRequestGetUserInfo.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(59377875)] + public class TLRequestGetUserInfo : TLMethod + { + public override int Constructor + { + get + { + return 59377875; + } + } + + public TLAbsInputUser UserId { get; set; } + public Help.TLAbsUserInfo Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + UserId = (TLAbsInputUser)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(UserId, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Help.TLAbsUserInfo)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLSupportName.cs b/src/TeleSharp.TL/TL/Help/TLSupportName.cs new file mode 100644 index 0000000..a3132ba --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLSupportName.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(-1945767479)] + public class TLSupportName : TLObject + { + public override int Constructor + { + get + { + return -1945767479; + } + } + + public string Name { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Name = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Name, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLTermsOfService.cs b/src/TeleSharp.TL/TL/Help/TLTermsOfService.cs index 32d4b98..0e4dd15 100644 --- a/src/TeleSharp.TL/TL/Help/TLTermsOfService.cs +++ b/src/TeleSharp.TL/TL/Help/TLTermsOfService.cs @@ -7,18 +7,23 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Help { - [TLObject(-236044656)] + [TLObject(2013922064)] public class TLTermsOfService : TLObject { public override int Constructor { get { - return -236044656; + return 2013922064; } } + public int Flags { get; set; } + public bool Popup { get; set; } + public TLDataJSON Id { get; set; } public string Text { get; set; } + public TLVector Entities { get; set; } + public int? MinAgeConfirm { get; set; } public void ComputeFlags() @@ -28,14 +33,29 @@ namespace TeleSharp.TL.Help public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); + Popup = (Flags & 1) != 0; + Id = (TLDataJSON)ObjectUtils.DeserializeObject(br); Text = StringUtil.Deserialize(br); + Entities = (TLVector)ObjectUtils.DeserializeVector(br); + if ((Flags & 2) != 0) + MinAgeConfirm = br.ReadInt32(); + else + MinAgeConfirm = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); + + ObjectUtils.SerializeObject(Id, bw); StringUtil.Serialize(Text, bw); + ObjectUtils.SerializeObject(Entities, bw); + if ((Flags & 2) != 0) + bw.Write(MinAgeConfirm.Value); } } diff --git a/src/TeleSharp.TL/TL/Help/TLTermsOfServiceUpdate.cs b/src/TeleSharp.TL/TL/Help/TLTermsOfServiceUpdate.cs new file mode 100644 index 0000000..70b2c5a --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLTermsOfServiceUpdate.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(686618977)] + public class TLTermsOfServiceUpdate : TLAbsTermsOfServiceUpdate + { + public override int Constructor + { + get + { + return 686618977; + } + } + + public int Expires { get; set; } + public Help.TLTermsOfService TermsOfService { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Expires = br.ReadInt32(); + TermsOfService = (Help.TLTermsOfService)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Expires); + ObjectUtils.SerializeObject(TermsOfService, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLTermsOfServiceUpdateEmpty.cs b/src/TeleSharp.TL/TL/Help/TLTermsOfServiceUpdateEmpty.cs new file mode 100644 index 0000000..cbffcb4 --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLTermsOfServiceUpdateEmpty.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(-483352705)] + public class TLTermsOfServiceUpdateEmpty : TLAbsTermsOfServiceUpdate + { + public override int Constructor + { + get + { + return -483352705; + } + } + + public int Expires { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Expires = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Expires); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLUserInfo.cs b/src/TeleSharp.TL/TL/Help/TLUserInfo.cs new file mode 100644 index 0000000..ff854ed --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLUserInfo.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(32192344)] + public class TLUserInfo : TLAbsUserInfo + { + public override int Constructor + { + get + { + return 32192344; + } + } + + public string Message { get; set; } + public TLVector Entities { get; set; } + public string Author { get; set; } + public int Date { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Message = StringUtil.Deserialize(br); + Entities = (TLVector)ObjectUtils.DeserializeVector(br); + Author = StringUtil.Deserialize(br); + Date = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Message, bw); + ObjectUtils.SerializeObject(Entities, bw); + StringUtil.Serialize(Author, bw); + bw.Write(Date); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Help/TLUserInfoEmpty.cs b/src/TeleSharp.TL/TL/Help/TLUserInfoEmpty.cs new file mode 100644 index 0000000..bdbbbe9 --- /dev/null +++ b/src/TeleSharp.TL/TL/Help/TLUserInfoEmpty.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Help +{ + [TLObject(-206688531)] + public class TLUserInfoEmpty : TLAbsUserInfo + { + public override int Constructor + { + get + { + return -206688531; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Langpack/TLRequestGetDifference.cs b/src/TeleSharp.TL/TL/Langpack/TLRequestGetDifference.cs new file mode 100644 index 0000000..f5a7a57 --- /dev/null +++ b/src/TeleSharp.TL/TL/Langpack/TLRequestGetDifference.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Langpack +{ + [TLObject(-845657435)] + public class TLRequestGetDifference : TLMethod + { + public override int Constructor + { + get + { + return -845657435; + } + } + + public string LangPack { get; set; } + public string LangCode { get; set; } + public int FromVersion { get; set; } + public TLLangPackDifference Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + LangPack = StringUtil.Deserialize(br); + LangCode = StringUtil.Deserialize(br); + FromVersion = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(LangPack, bw); + StringUtil.Serialize(LangCode, bw); + bw.Write(FromVersion); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLLangPackDifference)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Langpack/TLRequestGetLangPack.cs b/src/TeleSharp.TL/TL/Langpack/TLRequestGetLangPack.cs new file mode 100644 index 0000000..9d0b43b --- /dev/null +++ b/src/TeleSharp.TL/TL/Langpack/TLRequestGetLangPack.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Langpack +{ + [TLObject(-219008246)] + public class TLRequestGetLangPack : TLMethod + { + public override int Constructor + { + get + { + return -219008246; + } + } + + public string LangPack { get; set; } + public string LangCode { get; set; } + public TLLangPackDifference Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + LangPack = StringUtil.Deserialize(br); + LangCode = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(LangPack, bw); + StringUtil.Serialize(LangCode, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLLangPackDifference)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Langpack/TLRequestGetLanguage.cs b/src/TeleSharp.TL/TL/Langpack/TLRequestGetLanguage.cs new file mode 100644 index 0000000..202acc4 --- /dev/null +++ b/src/TeleSharp.TL/TL/Langpack/TLRequestGetLanguage.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Langpack +{ + [TLObject(1784243458)] + public class TLRequestGetLanguage : TLMethod + { + public override int Constructor + { + get + { + return 1784243458; + } + } + + public string LangPack { get; set; } + public string LangCode { get; set; } + public TLLangPackLanguage Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + LangPack = StringUtil.Deserialize(br); + LangCode = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(LangPack, bw); + StringUtil.Serialize(LangCode, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLLangPackLanguage)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Langpack/TLRequestGetLanguages.cs b/src/TeleSharp.TL/TL/Langpack/TLRequestGetLanguages.cs new file mode 100644 index 0000000..1ce107c --- /dev/null +++ b/src/TeleSharp.TL/TL/Langpack/TLRequestGetLanguages.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Langpack +{ + [TLObject(1120311183)] + public class TLRequestGetLanguages : TLMethod + { + public override int Constructor + { + get + { + return 1120311183; + } + } + + public string LangPack { get; set; } + public TLVector Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + LangPack = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(LangPack, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLVector)ObjectUtils.DeserializeVector(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Langpack/TLRequestGetStrings.cs b/src/TeleSharp.TL/TL/Langpack/TLRequestGetStrings.cs new file mode 100644 index 0000000..f7ca2f2 --- /dev/null +++ b/src/TeleSharp.TL/TL/Langpack/TLRequestGetStrings.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Langpack +{ + [TLObject(-269862909)] + public class TLRequestGetStrings : TLMethod + { + public override int Constructor + { + get + { + return -269862909; + } + } + + public string LangPack { get; set; } + public string LangCode { get; set; } + public TLVector Keys { get; set; } + public TLVector Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + LangPack = StringUtil.Deserialize(br); + LangCode = StringUtil.Deserialize(br); + Keys = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(LangPack, bw); + StringUtil.Serialize(LangCode, bw); + ObjectUtils.SerializeObject(Keys, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLVector)ObjectUtils.DeserializeVector(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLAbsFavedStickers.cs b/src/TeleSharp.TL/TL/Messages/TLAbsFavedStickers.cs new file mode 100644 index 0000000..c3a9fe1 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLAbsFavedStickers.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + public abstract class TLAbsFavedStickers : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLAbsFoundStickerSets.cs b/src/TeleSharp.TL/TL/Messages/TLAbsFoundStickerSets.cs new file mode 100644 index 0000000..cc073c0 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLAbsFoundStickerSets.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + public abstract class TLAbsFoundStickerSets : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLBotCallbackAnswer.cs b/src/TeleSharp.TL/TL/Messages/TLBotCallbackAnswer.cs index a33b8a6..44a3562 100644 --- a/src/TeleSharp.TL/TL/Messages/TLBotCallbackAnswer.cs +++ b/src/TeleSharp.TL/TL/Messages/TLBotCallbackAnswer.cs @@ -21,6 +21,7 @@ namespace TeleSharp.TL.Messages public int Flags { get; set; } public bool Alert { get; set; } public bool HasUrl { get; set; } + public bool NativeUi { get; set; } public string Message { get; set; } public string Url { get; set; } public int CacheTime { get; set; } @@ -28,11 +29,6 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - Flags = 0; - Flags = Alert ? (Flags | 2) : (Flags & ~2); - Flags = HasUrl ? (Flags | 8) : (Flags & ~8); - Flags = Message != null ? (Flags | 1) : (Flags & ~1); - Flags = Url != null ? (Flags | 4) : (Flags & ~4); } @@ -41,6 +37,7 @@ namespace TeleSharp.TL.Messages Flags = br.ReadInt32(); Alert = (Flags & 2) != 0; HasUrl = (Flags & 8) != 0; + NativeUi = (Flags & 16) != 0; if ((Flags & 1) != 0) Message = StringUtil.Deserialize(br); else @@ -58,10 +55,10 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + if ((Flags & 1) != 0) StringUtil.Serialize(Message, bw); if ((Flags & 4) != 0) diff --git a/src/TeleSharp.TL/TL/Messages/TLBotResults.cs b/src/TeleSharp.TL/TL/Messages/TLBotResults.cs index f524520..65d107f 100644 --- a/src/TeleSharp.TL/TL/Messages/TLBotResults.cs +++ b/src/TeleSharp.TL/TL/Messages/TLBotResults.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(-858565059)] + [TLObject(-1803769784)] public class TLBotResults : TLObject { public override int Constructor { get { - return -858565059; + return -1803769784; } } @@ -25,14 +25,11 @@ namespace TeleSharp.TL.Messages public TLInlineBotSwitchPM SwitchPm { get; set; } public TLVector Results { get; set; } public int CacheTime { get; set; } + public TLVector Users { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Gallery ? (Flags | 1) : (Flags & ~1); - Flags = NextOffset != null ? (Flags | 2) : (Flags & ~2); - Flags = SwitchPm != null ? (Flags | 4) : (Flags & ~4); } @@ -53,13 +50,13 @@ namespace TeleSharp.TL.Messages Results = (TLVector)ObjectUtils.DeserializeVector(br); CacheTime = br.ReadInt32(); + Users = (TLVector)ObjectUtils.DeserializeVector(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(QueryId); @@ -69,6 +66,7 @@ namespace TeleSharp.TL.Messages ObjectUtils.SerializeObject(SwitchPm, bw); ObjectUtils.SerializeObject(Results, bw); bw.Write(CacheTime); + ObjectUtils.SerializeObject(Users, bw); } } diff --git a/src/TeleSharp.TL/TL/Messages/TLChannelMessages.cs b/src/TeleSharp.TL/TL/Messages/TLChannelMessages.cs index 04b6d3e..98df6b7 100644 --- a/src/TeleSharp.TL/TL/Messages/TLChannelMessages.cs +++ b/src/TeleSharp.TL/TL/Messages/TLChannelMessages.cs @@ -19,6 +19,7 @@ namespace TeleSharp.TL.Messages } public int Flags { get; set; } + public bool Inexact { get; set; } public int Pts { get; set; } public int Count { get; set; } public TLVector Messages { get; set; } @@ -28,13 +29,13 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - Flags = 0; } public override void DeserializeBody(BinaryReader br) { Flags = br.ReadInt32(); + Inexact = (Flags & 2) != 0; Pts = br.ReadInt32(); Count = br.ReadInt32(); Messages = (TLVector)ObjectUtils.DeserializeVector(br); @@ -46,8 +47,8 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + bw.Write(Pts); bw.Write(Count); ObjectUtils.SerializeObject(Messages, bw); diff --git a/src/TeleSharp.TL/TL/Messages/TLDialogs.cs b/src/TeleSharp.TL/TL/Messages/TLDialogs.cs index be6d0f2..df65236 100644 --- a/src/TeleSharp.TL/TL/Messages/TLDialogs.cs +++ b/src/TeleSharp.TL/TL/Messages/TLDialogs.cs @@ -18,7 +18,7 @@ namespace TeleSharp.TL.Messages } } - public TLVector Dialogs { get; set; } + public TLVector Dialogs { get; set; } public TLVector Messages { get; set; } public TLVector Chats { get; set; } public TLVector Users { get; set; } @@ -31,7 +31,7 @@ namespace TeleSharp.TL.Messages public override void DeserializeBody(BinaryReader br) { - Dialogs = (TLVector)ObjectUtils.DeserializeVector(br); + Dialogs = (TLVector)ObjectUtils.DeserializeVector(br); Messages = (TLVector)ObjectUtils.DeserializeVector(br); Chats = (TLVector)ObjectUtils.DeserializeVector(br); Users = (TLVector)ObjectUtils.DeserializeVector(br); diff --git a/src/TeleSharp.TL/TL/Messages/TLDialogsNotModified.cs b/src/TeleSharp.TL/TL/Messages/TLDialogsNotModified.cs new file mode 100644 index 0000000..c59071b --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLDialogsNotModified.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-253500010)] + public class TLDialogsNotModified : TLAbsDialogs + { + public override int Constructor + { + get + { + return -253500010; + } + } + + public int Count { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Count = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Count); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLDialogsSlice.cs b/src/TeleSharp.TL/TL/Messages/TLDialogsSlice.cs index 87e6642..9879a28 100644 --- a/src/TeleSharp.TL/TL/Messages/TLDialogsSlice.cs +++ b/src/TeleSharp.TL/TL/Messages/TLDialogsSlice.cs @@ -19,7 +19,7 @@ namespace TeleSharp.TL.Messages } public int Count { get; set; } - public TLVector Dialogs { get; set; } + public TLVector Dialogs { get; set; } public TLVector Messages { get; set; } public TLVector Chats { get; set; } public TLVector Users { get; set; } @@ -33,7 +33,7 @@ namespace TeleSharp.TL.Messages public override void DeserializeBody(BinaryReader br) { Count = br.ReadInt32(); - Dialogs = (TLVector)ObjectUtils.DeserializeVector(br); + Dialogs = (TLVector)ObjectUtils.DeserializeVector(br); Messages = (TLVector)ObjectUtils.DeserializeVector(br); Chats = (TLVector)ObjectUtils.DeserializeVector(br); Users = (TLVector)ObjectUtils.DeserializeVector(br); diff --git a/src/TeleSharp.TL/TL/Messages/TLFavedStickers.cs b/src/TeleSharp.TL/TL/Messages/TLFavedStickers.cs new file mode 100644 index 0000000..e5fb836 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLFavedStickers.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-209768682)] + public class TLFavedStickers : TLAbsFavedStickers + { + public override int Constructor + { + get + { + return -209768682; + } + } + + public int Hash { get; set; } + public TLVector Packs { get; set; } + public TLVector Stickers { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Hash = br.ReadInt32(); + Packs = (TLVector)ObjectUtils.DeserializeVector(br); + Stickers = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Hash); + ObjectUtils.SerializeObject(Packs, bw); + ObjectUtils.SerializeObject(Stickers, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPeerNotifyEventsEmpty.cs b/src/TeleSharp.TL/TL/Messages/TLFavedStickersNotModified.cs similarity index 76% rename from src/TeleSharp.TL/TL/TLPeerNotifyEventsEmpty.cs rename to src/TeleSharp.TL/TL/Messages/TLFavedStickersNotModified.cs index 3e3b952..7bf4532 100644 --- a/src/TeleSharp.TL/TL/TLPeerNotifyEventsEmpty.cs +++ b/src/TeleSharp.TL/TL/Messages/TLFavedStickersNotModified.cs @@ -5,16 +5,16 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using TeleSharp.TL; -namespace TeleSharp.TL +namespace TeleSharp.TL.Messages { - [TLObject(-1378534221)] - public class TLPeerNotifyEventsEmpty : TLAbsPeerNotifyEvents + [TLObject(-1634752813)] + public class TLFavedStickersNotModified : TLAbsFavedStickers { public override int Constructor { get { - return -1378534221; + return -1634752813; } } diff --git a/src/TeleSharp.TL/TL/Messages/TLFoundStickerSets.cs b/src/TeleSharp.TL/TL/Messages/TLFoundStickerSets.cs new file mode 100644 index 0000000..abee511 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLFoundStickerSets.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(1359533640)] + public class TLFoundStickerSets : TLAbsFoundStickerSets + { + public override int Constructor + { + get + { + return 1359533640; + } + } + + public int Hash { get; set; } + public TLVector Sets { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Hash = br.ReadInt32(); + Sets = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Hash); + ObjectUtils.SerializeObject(Sets, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLFoundStickerSetsNotModified.cs b/src/TeleSharp.TL/TL/Messages/TLFoundStickerSetsNotModified.cs new file mode 100644 index 0000000..190400a --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLFoundStickerSetsNotModified.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(223655517)] + public class TLFoundStickerSetsNotModified : TLAbsFoundStickerSets + { + public override int Constructor + { + get + { + return 223655517; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLInactiveChats.cs b/src/TeleSharp.TL/TL/Messages/TLInactiveChats.cs new file mode 100644 index 0000000..8f8e98f --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLInactiveChats.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-1456996667)] + public class TLInactiveChats : TLObject + { + public override int Constructor + { + get + { + return -1456996667; + } + } + + public TLVector Dates { get; set; } + public TLVector Chats { get; set; } + public TLVector Users { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Dates = (TLVector)ObjectUtils.DeserializeVector(br); + Chats = (TLVector)ObjectUtils.DeserializeVector(br); + Users = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Dates, bw); + ObjectUtils.SerializeObject(Chats, bw); + ObjectUtils.SerializeObject(Users, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLMessageEditData.cs b/src/TeleSharp.TL/TL/Messages/TLMessageEditData.cs index 744a655..cff61f2 100644 --- a/src/TeleSharp.TL/TL/Messages/TLMessageEditData.cs +++ b/src/TeleSharp.TL/TL/Messages/TLMessageEditData.cs @@ -24,8 +24,6 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - Flags = 0; - Flags = Caption ? (Flags | 1) : (Flags & ~1); } @@ -39,7 +37,6 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); diff --git a/src/TeleSharp.TL/TL/Messages/TLMessagesNotModified.cs b/src/TeleSharp.TL/TL/Messages/TLMessagesNotModified.cs new file mode 100644 index 0000000..c8817ba --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLMessagesNotModified.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(1951620897)] + public class TLMessagesNotModified : TLAbsMessages + { + public override int Constructor + { + get + { + return 1951620897; + } + } + + public int Count { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Count = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Count); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLMessagesSlice.cs b/src/TeleSharp.TL/TL/Messages/TLMessagesSlice.cs index 51c928a..c74b9ea 100644 --- a/src/TeleSharp.TL/TL/Messages/TLMessagesSlice.cs +++ b/src/TeleSharp.TL/TL/Messages/TLMessagesSlice.cs @@ -7,18 +7,21 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(189033187)] + [TLObject(-923939298)] public class TLMessagesSlice : TLAbsMessages { public override int Constructor { get { - return 189033187; + return -923939298; } } + public int Flags { get; set; } + public bool Inexact { get; set; } public int Count { get; set; } + public int? NextRate { get; set; } public TLVector Messages { get; set; } public TLVector Chats { get; set; } public TLVector Users { get; set; } @@ -31,7 +34,14 @@ namespace TeleSharp.TL.Messages public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); + Inexact = (Flags & 2) != 0; Count = br.ReadInt32(); + if ((Flags & 1) != 0) + NextRate = br.ReadInt32(); + else + NextRate = null; + Messages = (TLVector)ObjectUtils.DeserializeVector(br); Chats = (TLVector)ObjectUtils.DeserializeVector(br); Users = (TLVector)ObjectUtils.DeserializeVector(br); @@ -41,7 +51,11 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); + bw.Write(Count); + if ((Flags & 1) != 0) + bw.Write(NextRate.Value); ObjectUtils.SerializeObject(Messages, bw); ObjectUtils.SerializeObject(Chats, bw); ObjectUtils.SerializeObject(Users, bw); diff --git a/src/TeleSharp.TL/TL/Messages/TLPeerDialogs.cs b/src/TeleSharp.TL/TL/Messages/TLPeerDialogs.cs index 0d717f6..bae02dd 100644 --- a/src/TeleSharp.TL/TL/Messages/TLPeerDialogs.cs +++ b/src/TeleSharp.TL/TL/Messages/TLPeerDialogs.cs @@ -18,7 +18,7 @@ namespace TeleSharp.TL.Messages } } - public TLVector Dialogs { get; set; } + public TLVector Dialogs { get; set; } public TLVector Messages { get; set; } public TLVector Chats { get; set; } public TLVector Users { get; set; } @@ -32,7 +32,7 @@ namespace TeleSharp.TL.Messages public override void DeserializeBody(BinaryReader br) { - Dialogs = (TLVector)ObjectUtils.DeserializeVector(br); + Dialogs = (TLVector)ObjectUtils.DeserializeVector(br); Messages = (TLVector)ObjectUtils.DeserializeVector(br); Chats = (TLVector)ObjectUtils.DeserializeVector(br); Users = (TLVector)ObjectUtils.DeserializeVector(br); diff --git a/src/TeleSharp.TL/TL/Messages/TLRecentStickers.cs b/src/TeleSharp.TL/TL/Messages/TLRecentStickers.cs index 80adc92..2507eb7 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRecentStickers.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRecentStickers.cs @@ -7,19 +7,21 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(1558317424)] + [TLObject(586395571)] public class TLRecentStickers : TLAbsRecentStickers { public override int Constructor { get { - return 1558317424; + return 586395571; } } public int Hash { get; set; } + public TLVector Packs { get; set; } public TLVector Stickers { get; set; } + public TLVector Dates { get; set; } public void ComputeFlags() @@ -30,7 +32,9 @@ namespace TeleSharp.TL.Messages public override void DeserializeBody(BinaryReader br) { Hash = br.ReadInt32(); + Packs = (TLVector)ObjectUtils.DeserializeVector(br); Stickers = (TLVector)ObjectUtils.DeserializeVector(br); + Dates = (TLVector)ObjectUtils.DeserializeVector(br); } @@ -38,7 +42,9 @@ namespace TeleSharp.TL.Messages { bw.Write(Constructor); bw.Write(Hash); + ObjectUtils.SerializeObject(Packs, bw); ObjectUtils.SerializeObject(Stickers, bw); + ObjectUtils.SerializeObject(Dates, bw); } } diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestAcceptUrlAuth.cs b/src/TeleSharp.TL/TL/Messages/TLRequestAcceptUrlAuth.cs new file mode 100644 index 0000000..573e148 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestAcceptUrlAuth.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-148247912)] + public class TLRequestAcceptUrlAuth : TLMethod + { + public override int Constructor + { + get + { + return -148247912; + } + } + + public int Flags { get; set; } + public bool WriteAllowed { get; set; } + public TLAbsInputPeer Peer { get; set; } + public int MsgId { get; set; } + public int ButtonId { get; set; } + public TLAbsUrlAuthResult Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + WriteAllowed = (Flags & 1) != 0; + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + MsgId = br.ReadInt32(); + ButtonId = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + ObjectUtils.SerializeObject(Peer, bw); + bw.Write(MsgId); + bw.Write(ButtonId); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLAbsUrlAuthResult)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestClearAllDrafts.cs b/src/TeleSharp.TL/TL/Messages/TLRequestClearAllDrafts.cs new file mode 100644 index 0000000..e383bad --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestClearAllDrafts.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(2119757468)] + public class TLRequestClearAllDrafts : TLMethod + { + public override int Constructor + { + get + { + return 2119757468; + } + } + + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestClearRecentStickers.cs b/src/TeleSharp.TL/TL/Messages/TLRequestClearRecentStickers.cs index 052214a..8fad38d 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestClearRecentStickers.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestClearRecentStickers.cs @@ -25,8 +25,6 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - Flags = 0; - Flags = Attached ? (Flags | 1) : (Flags & ~1); } @@ -40,7 +38,6 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestDeleteHistory.cs b/src/TeleSharp.TL/TL/Messages/TLRequestDeleteHistory.cs index 917180f..1357d30 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestDeleteHistory.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestDeleteHistory.cs @@ -20,6 +20,7 @@ namespace TeleSharp.TL.Messages public int Flags { get; set; } public bool JustClear { get; set; } + public bool Revoke { get; set; } public TLAbsInputPeer Peer { get; set; } public int MaxId { get; set; } public Messages.TLAffectedHistory Response { get; set; } @@ -27,8 +28,6 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - Flags = 0; - Flags = JustClear ? (Flags | 1) : (Flags & ~1); } @@ -36,6 +35,7 @@ namespace TeleSharp.TL.Messages { Flags = br.ReadInt32(); JustClear = (Flags & 1) != 0; + Revoke = (Flags & 2) != 0; Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); MaxId = br.ReadInt32(); @@ -44,9 +44,9 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + ObjectUtils.SerializeObject(Peer, bw); bw.Write(MaxId); diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestDeleteMessages.cs b/src/TeleSharp.TL/TL/Messages/TLRequestDeleteMessages.cs index f47d99d..74a9847 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestDeleteMessages.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestDeleteMessages.cs @@ -26,8 +26,6 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - Flags = 0; - Flags = Revoke ? (Flags | 1) : (Flags & ~1); } @@ -42,7 +40,6 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); ObjectUtils.SerializeObject(Id, bw); diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestDeleteScheduledMessages.cs b/src/TeleSharp.TL/TL/Messages/TLRequestDeleteScheduledMessages.cs new file mode 100644 index 0000000..bf4412e --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestDeleteScheduledMessages.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(1504586518)] + public class TLRequestDeleteScheduledMessages : TLMethod + { + public override int Constructor + { + get + { + return 1504586518; + } + } + + public TLAbsInputPeer Peer { get; set; } + public TLVector Id { get; set; } + public TLAbsUpdates Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + Id = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + ObjectUtils.SerializeObject(Id, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestEditChatAbout.cs b/src/TeleSharp.TL/TL/Messages/TLRequestEditChatAbout.cs new file mode 100644 index 0000000..0685038 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestEditChatAbout.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-554301545)] + public class TLRequestEditChatAbout : TLMethod + { + public override int Constructor + { + get + { + return -554301545; + } + } + + public TLAbsInputPeer Peer { get; set; } + public string About { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + About = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + StringUtil.Serialize(About, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestEditChatDefaultBannedRights.cs b/src/TeleSharp.TL/TL/Messages/TLRequestEditChatDefaultBannedRights.cs new file mode 100644 index 0000000..8459eb4 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestEditChatDefaultBannedRights.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-1517917375)] + public class TLRequestEditChatDefaultBannedRights : TLMethod + { + public override int Constructor + { + get + { + return -1517917375; + } + } + + public TLAbsInputPeer Peer { get; set; } + public TLChatBannedRights BannedRights { get; set; } + public TLAbsUpdates Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + BannedRights = (TLChatBannedRights)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + ObjectUtils.SerializeObject(BannedRights, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestEditInlineBotMessage.cs b/src/TeleSharp.TL/TL/Messages/TLRequestEditInlineBotMessage.cs index cf8340f..0ff7a8d 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestEditInlineBotMessage.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestEditInlineBotMessage.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(319564933)] + [TLObject(-2091549254)] public class TLRequestEditInlineBotMessage : TLMethod { public override int Constructor { get { - return 319564933; + return -2091549254; } } @@ -22,6 +22,7 @@ namespace TeleSharp.TL.Messages public bool NoWebpage { get; set; } public TLInputBotInlineMessageID Id { get; set; } public string Message { get; set; } + public TLAbsInputMedia Media { get; set; } public TLAbsReplyMarkup ReplyMarkup { get; set; } public TLVector Entities { get; set; } public bool Response { get; set; } @@ -29,11 +30,6 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - Flags = 0; - Flags = NoWebpage ? (Flags | 2) : (Flags & ~2); - Flags = Message != null ? (Flags | 2048) : (Flags & ~2048); - Flags = ReplyMarkup != null ? (Flags | 4) : (Flags & ~4); - Flags = Entities != null ? (Flags | 8) : (Flags & ~8); } @@ -47,6 +43,11 @@ namespace TeleSharp.TL.Messages else Message = null; + if ((Flags & 16384) != 0) + Media = (TLAbsInputMedia)ObjectUtils.DeserializeObject(br); + else + Media = null; + if ((Flags & 4) != 0) ReplyMarkup = (TLAbsReplyMarkup)ObjectUtils.DeserializeObject(br); else @@ -63,12 +64,13 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); ObjectUtils.SerializeObject(Id, bw); if ((Flags & 2048) != 0) StringUtil.Serialize(Message, bw); + if ((Flags & 16384) != 0) + ObjectUtils.SerializeObject(Media, bw); if ((Flags & 4) != 0) ObjectUtils.SerializeObject(ReplyMarkup, bw); if ((Flags & 8) != 0) diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestEditMessage.cs b/src/TeleSharp.TL/TL/Messages/TLRequestEditMessage.cs index d9109de..13c205b 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestEditMessage.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestEditMessage.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(-829299510)] + [TLObject(1224152952)] public class TLRequestEditMessage : TLMethod { public override int Constructor { get { - return -829299510; + return 1224152952; } } @@ -23,18 +23,15 @@ namespace TeleSharp.TL.Messages public TLAbsInputPeer Peer { get; set; } public int Id { get; set; } public string Message { get; set; } + public TLAbsInputMedia Media { get; set; } public TLAbsReplyMarkup ReplyMarkup { get; set; } public TLVector Entities { get; set; } + public int? ScheduleDate { get; set; } public TLAbsUpdates Response { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = NoWebpage ? (Flags | 2) : (Flags & ~2); - Flags = Message != null ? (Flags | 2048) : (Flags & ~2048); - Flags = ReplyMarkup != null ? (Flags | 4) : (Flags & ~4); - Flags = Entities != null ? (Flags | 8) : (Flags & ~8); } @@ -49,6 +46,11 @@ namespace TeleSharp.TL.Messages else Message = null; + if ((Flags & 16384) != 0) + Media = (TLAbsInputMedia)ObjectUtils.DeserializeObject(br); + else + Media = null; + if ((Flags & 4) != 0) ReplyMarkup = (TLAbsReplyMarkup)ObjectUtils.DeserializeObject(br); else @@ -59,23 +61,31 @@ namespace TeleSharp.TL.Messages else Entities = null; + if ((Flags & 32768) != 0) + ScheduleDate = br.ReadInt32(); + else + ScheduleDate = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); ObjectUtils.SerializeObject(Peer, bw); bw.Write(Id); if ((Flags & 2048) != 0) StringUtil.Serialize(Message, bw); + if ((Flags & 16384) != 0) + ObjectUtils.SerializeObject(Media, bw); if ((Flags & 4) != 0) ObjectUtils.SerializeObject(ReplyMarkup, bw); if ((Flags & 8) != 0) ObjectUtils.SerializeObject(Entities, bw); + if ((Flags & 32768) != 0) + bw.Write(ScheduleDate.Value); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestExportChatInvite.cs b/src/TeleSharp.TL/TL/Messages/TLRequestExportChatInvite.cs index 1e35315..1496158 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestExportChatInvite.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestExportChatInvite.cs @@ -7,18 +7,18 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(2106086025)] + [TLObject(234312524)] public class TLRequestExportChatInvite : TLMethod { public override int Constructor { get { - return 2106086025; + return 234312524; } } - public int ChatId { get; set; } + public TLAbsInputPeer Peer { get; set; } public TLAbsExportedChatInvite Response { get; set; } @@ -29,14 +29,14 @@ namespace TeleSharp.TL.Messages public override void DeserializeBody(BinaryReader br) { - ChatId = br.ReadInt32(); + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - bw.Write(ChatId); + ObjectUtils.SerializeObject(Peer, bw); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestFaveSticker.cs b/src/TeleSharp.TL/TL/Messages/TLRequestFaveSticker.cs new file mode 100644 index 0000000..53ad208 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestFaveSticker.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-1174420133)] + public class TLRequestFaveSticker : TLMethod + { + public override int Constructor + { + get + { + return -1174420133; + } + } + + public TLAbsInputDocument Id { get; set; } + public bool Unfave { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Id = (TLAbsInputDocument)ObjectUtils.DeserializeObject(br); + Unfave = BoolUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Id, bw); + BoolUtil.Serialize(Unfave, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestForwardMessages.cs b/src/TeleSharp.TL/TL/Messages/TLRequestForwardMessages.cs index ac85f71..166656e 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestForwardMessages.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestForwardMessages.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(1888354709)] + [TLObject(-637606386)] public class TLRequestForwardMessages : TLMethod { public override int Constructor { get { - return 1888354709; + return -637606386; } } @@ -22,19 +22,17 @@ namespace TeleSharp.TL.Messages public bool Silent { get; set; } public bool Background { get; set; } public bool WithMyScore { get; set; } + public bool Grouped { get; set; } public TLAbsInputPeer FromPeer { get; set; } public TLVector Id { get; set; } public TLVector RandomId { get; set; } public TLAbsInputPeer ToPeer { get; set; } + public int? ScheduleDate { get; set; } public TLAbsUpdates Response { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Silent ? (Flags | 32) : (Flags & ~32); - Flags = Background ? (Flags | 64) : (Flags & ~64); - Flags = WithMyScore ? (Flags | 256) : (Flags & ~256); } @@ -44,25 +42,33 @@ namespace TeleSharp.TL.Messages Silent = (Flags & 32) != 0; Background = (Flags & 64) != 0; WithMyScore = (Flags & 256) != 0; + Grouped = (Flags & 512) != 0; FromPeer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); Id = (TLVector)ObjectUtils.DeserializeVector(br); RandomId = (TLVector)ObjectUtils.DeserializeVector(br); ToPeer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + if ((Flags & 1024) != 0) + ScheduleDate = br.ReadInt32(); + else + ScheduleDate = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + ObjectUtils.SerializeObject(FromPeer, bw); ObjectUtils.SerializeObject(Id, bw); ObjectUtils.SerializeObject(RandomId, bw); ObjectUtils.SerializeObject(ToPeer, bw); + if ((Flags & 1024) != 0) + bw.Write(ScheduleDate.Value); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetArchivedStickers.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetArchivedStickers.cs index 065673a..e1d7e1e 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestGetArchivedStickers.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetArchivedStickers.cs @@ -27,8 +27,6 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - Flags = 0; - Flags = Masks ? (Flags | 1) : (Flags & ~1); } @@ -44,7 +42,6 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(OffsetId); diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetBotCallbackAnswer.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetBotCallbackAnswer.cs index e22366d..cdb4a16 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestGetBotCallbackAnswer.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetBotCallbackAnswer.cs @@ -28,9 +28,6 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - Flags = 0; - Flags = Game ? (Flags | 2) : (Flags & ~2); - Flags = Data != null ? (Flags | 1) : (Flags & ~1); } @@ -51,7 +48,6 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); ObjectUtils.SerializeObject(Peer, bw); diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetDialogUnreadMarks.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetDialogUnreadMarks.cs new file mode 100644 index 0000000..14e93e3 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetDialogUnreadMarks.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(585256482)] + public class TLRequestGetDialogUnreadMarks : TLMethod + { + public override int Constructor + { + get + { + return 585256482; + } + } + + public TLVector Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLVector)ObjectUtils.DeserializeVector(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetDialogs.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetDialogs.cs index 34ea1f3..b028b0e 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestGetDialogs.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetDialogs.cs @@ -7,30 +7,30 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(421243333)] + [TLObject(-1594999949)] public class TLRequestGetDialogs : TLMethod { public override int Constructor { get { - return 421243333; + return -1594999949; } } public int Flags { get; set; } public bool ExcludePinned { get; set; } + public int? FolderId { get; set; } public int OffsetDate { get; set; } public int OffsetId { get; set; } public TLAbsInputPeer OffsetPeer { get; set; } public int Limit { get; set; } + public int Hash { get; set; } public Messages.TLAbsDialogs Response { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = ExcludePinned ? (Flags | 1) : (Flags & ~1); } @@ -38,23 +38,31 @@ namespace TeleSharp.TL.Messages { Flags = br.ReadInt32(); ExcludePinned = (Flags & 1) != 0; + if ((Flags & 2) != 0) + FolderId = br.ReadInt32(); + else + FolderId = null; + OffsetDate = br.ReadInt32(); OffsetId = br.ReadInt32(); OffsetPeer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); Limit = br.ReadInt32(); + Hash = br.ReadInt32(); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + if ((Flags & 2) != 0) + bw.Write(FolderId.Value); bw.Write(OffsetDate); bw.Write(OffsetId); ObjectUtils.SerializeObject(OffsetPeer, bw); bw.Write(Limit); + bw.Write(Hash); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetEmojiKeywords.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetEmojiKeywords.cs new file mode 100644 index 0000000..65aacfd --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetEmojiKeywords.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(899735650)] + public class TLRequestGetEmojiKeywords : TLMethod + { + public override int Constructor + { + get + { + return 899735650; + } + } + + public string LangCode { get; set; } + public TLEmojiKeywordsDifference Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + LangCode = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(LangCode, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLEmojiKeywordsDifference)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetEmojiKeywordsDifference.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetEmojiKeywordsDifference.cs new file mode 100644 index 0000000..9848318 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetEmojiKeywordsDifference.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(352892591)] + public class TLRequestGetEmojiKeywordsDifference : TLMethod + { + public override int Constructor + { + get + { + return 352892591; + } + } + + public string LangCode { get; set; } + public int FromVersion { get; set; } + public TLEmojiKeywordsDifference Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + LangCode = StringUtil.Deserialize(br); + FromVersion = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(LangCode, bw); + bw.Write(FromVersion); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLEmojiKeywordsDifference)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetEmojiKeywordsLanguages.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetEmojiKeywordsLanguages.cs new file mode 100644 index 0000000..ba15f1e --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetEmojiKeywordsLanguages.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(1318675378)] + public class TLRequestGetEmojiKeywordsLanguages : TLMethod + { + public override int Constructor + { + get + { + return 1318675378; + } + } + + public TLVector LangCodes { get; set; } + public TLVector Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + LangCodes = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(LangCodes, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLVector)ObjectUtils.DeserializeVector(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetEmojiURL.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetEmojiURL.cs new file mode 100644 index 0000000..685768f --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetEmojiURL.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-709817306)] + public class TLRequestGetEmojiURL : TLMethod + { + public override int Constructor + { + get + { + return -709817306; + } + } + + public string LangCode { get; set; } + public TLEmojiURL Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + LangCode = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(LangCode, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLEmojiURL)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetFavedStickers.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetFavedStickers.cs new file mode 100644 index 0000000..65b4704 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetFavedStickers.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(567151374)] + public class TLRequestGetFavedStickers : TLMethod + { + public override int Constructor + { + get + { + return 567151374; + } + } + + public int Hash { get; set; } + public Messages.TLAbsFavedStickers Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Hash = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Hash); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Messages.TLAbsFavedStickers)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetHistory.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetHistory.cs index f78f360..085ca0f 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestGetHistory.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetHistory.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(-1347868602)] + [TLObject(-591691168)] public class TLRequestGetHistory : TLMethod { public override int Constructor { get { - return -1347868602; + return -591691168; } } @@ -25,6 +25,7 @@ namespace TeleSharp.TL.Messages public int Limit { get; set; } public int MaxId { get; set; } public int MinId { get; set; } + public int Hash { get; set; } public Messages.TLAbsMessages Response { get; set; } @@ -42,6 +43,7 @@ namespace TeleSharp.TL.Messages Limit = br.ReadInt32(); MaxId = br.ReadInt32(); MinId = br.ReadInt32(); + Hash = br.ReadInt32(); } @@ -55,6 +57,7 @@ namespace TeleSharp.TL.Messages bw.Write(Limit); bw.Write(MaxId); bw.Write(MinId); + bw.Write(Hash); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetInlineBotResults.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetInlineBotResults.cs index 7399be4..ff5c09a 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestGetInlineBotResults.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetInlineBotResults.cs @@ -29,8 +29,6 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - Flags = 0; - Flags = GeoPoint != null ? (Flags | 1) : (Flags & ~1); } @@ -52,7 +50,6 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); ObjectUtils.SerializeObject(Bot, bw); ObjectUtils.SerializeObject(Peer, bw); diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetMessages.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetMessages.cs index bbd12d9..b9b00ba 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestGetMessages.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetMessages.cs @@ -7,18 +7,18 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(1109588596)] + [TLObject(1673946374)] public class TLRequestGetMessages : TLMethod { public override int Constructor { get { - return 1109588596; + return 1673946374; } } - public TLVector Id { get; set; } + public TLVector Id { get; set; } public Messages.TLAbsMessages Response { get; set; } @@ -29,7 +29,7 @@ namespace TeleSharp.TL.Messages public override void DeserializeBody(BinaryReader br) { - Id = (TLVector)ObjectUtils.DeserializeVector(br); + Id = (TLVector)ObjectUtils.DeserializeVector(br); } diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetOnlines.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetOnlines.cs new file mode 100644 index 0000000..5c9d434 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetOnlines.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(1848369232)] + public class TLRequestGetOnlines : TLMethod + { + public override int Constructor + { + get + { + return 1848369232; + } + } + + public TLAbsInputPeer Peer { get; set; } + public TLChatOnlines Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLChatOnlines)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetPeerDialogs.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetPeerDialogs.cs index 6ad2466..0cb43ce 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestGetPeerDialogs.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetPeerDialogs.cs @@ -7,18 +7,18 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(764901049)] + [TLObject(-462373635)] public class TLRequestGetPeerDialogs : TLMethod { public override int Constructor { get { - return 764901049; + return -462373635; } } - public TLVector Peers { get; set; } + public TLVector Peers { get; set; } public Messages.TLPeerDialogs Response { get; set; } @@ -29,7 +29,7 @@ namespace TeleSharp.TL.Messages public override void DeserializeBody(BinaryReader br) { - Peers = (TLVector)ObjectUtils.DeserializeVector(br); + Peers = (TLVector)ObjectUtils.DeserializeVector(br); } diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetPinnedDialogs.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetPinnedDialogs.cs index 4b8cee8..016ca07 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestGetPinnedDialogs.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetPinnedDialogs.cs @@ -7,17 +7,18 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(-497756594)] + [TLObject(-692498958)] public class TLRequestGetPinnedDialogs : TLMethod { public override int Constructor { get { - return -497756594; + return -692498958; } } + public int FolderId { get; set; } public Messages.TLPeerDialogs Response { get; set; } @@ -28,12 +29,14 @@ namespace TeleSharp.TL.Messages public override void DeserializeBody(BinaryReader br) { + FolderId = br.ReadInt32(); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(FolderId); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetPollResults.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetPollResults.cs new file mode 100644 index 0000000..fc1511c --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetPollResults.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(1941660731)] + public class TLRequestGetPollResults : TLMethod + { + public override int Constructor + { + get + { + return 1941660731; + } + } + + public TLAbsInputPeer Peer { get; set; } + public int MsgId { get; set; } + public TLAbsUpdates Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + MsgId = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + bw.Write(MsgId); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetRecentLocations.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetRecentLocations.cs new file mode 100644 index 0000000..f91c2d3 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetRecentLocations.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-1144759543)] + public class TLRequestGetRecentLocations : TLMethod + { + public override int Constructor + { + get + { + return -1144759543; + } + } + + public TLAbsInputPeer Peer { get; set; } + public int Limit { get; set; } + public int Hash { get; set; } + public Messages.TLAbsMessages Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + Limit = br.ReadInt32(); + Hash = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + bw.Write(Limit); + bw.Write(Hash); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Messages.TLAbsMessages)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetRecentStickers.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetRecentStickers.cs index 4d9ac23..d70f8ef 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestGetRecentStickers.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetRecentStickers.cs @@ -26,8 +26,6 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - Flags = 0; - Flags = Attached ? (Flags | 1) : (Flags & ~1); } @@ -42,7 +40,6 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(Hash); diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetScheduledHistory.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetScheduledHistory.cs new file mode 100644 index 0000000..9c2516b --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetScheduledHistory.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-490575781)] + public class TLRequestGetScheduledHistory : TLMethod + { + public override int Constructor + { + get + { + return -490575781; + } + } + + public TLAbsInputPeer Peer { get; set; } + public int Hash { get; set; } + public Messages.TLAbsMessages Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + Hash = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + bw.Write(Hash); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Messages.TLAbsMessages)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetScheduledMessages.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetScheduledMessages.cs new file mode 100644 index 0000000..149a956 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetScheduledMessages.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-1111817116)] + public class TLRequestGetScheduledMessages : TLMethod + { + public override int Constructor + { + get + { + return -1111817116; + } + } + + public TLAbsInputPeer Peer { get; set; } + public TLVector Id { get; set; } + public Messages.TLAbsMessages Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + Id = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + ObjectUtils.SerializeObject(Id, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Messages.TLAbsMessages)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetSearchCounters.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetSearchCounters.cs new file mode 100644 index 0000000..1a16f88 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetSearchCounters.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(1932455680)] + public class TLRequestGetSearchCounters : TLMethod + { + public override int Constructor + { + get + { + return 1932455680; + } + } + + public TLAbsInputPeer Peer { get; set; } + public TLVector Filters { get; set; } + public TLVector Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + Filters = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + ObjectUtils.SerializeObject(Filters, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLVector)ObjectUtils.DeserializeVector(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetSplitRanges.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetSplitRanges.cs new file mode 100644 index 0000000..90f92bd --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetSplitRanges.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(486505992)] + public class TLRequestGetSplitRanges : TLMethod + { + public override int Constructor + { + get + { + return 486505992; + } + } + + public TLVector Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLVector)ObjectUtils.DeserializeVector(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetStatsURL.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetStatsURL.cs new file mode 100644 index 0000000..4f6a6c4 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetStatsURL.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-2127811866)] + public class TLRequestGetStatsURL : TLMethod + { + public override int Constructor + { + get + { + return -2127811866; + } + } + + public int Flags { get; set; } + public bool Dark { get; set; } + public TLAbsInputPeer Peer { get; set; } + public string Params { get; set; } + public TLStatsURL Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Dark = (Flags & 1) != 0; + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + Params = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + ObjectUtils.SerializeObject(Peer, bw); + StringUtil.Serialize(Params, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLStatsURL)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetStickers.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetStickers.cs new file mode 100644 index 0000000..7027d14 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetStickers.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(71126828)] + public class TLRequestGetStickers : TLMethod + { + public override int Constructor + { + get + { + return 71126828; + } + } + + public string Emoticon { get; set; } + public int Hash { get; set; } + public Messages.TLAbsStickers Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Emoticon = StringUtil.Deserialize(br); + Hash = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Emoticon, bw); + bw.Write(Hash); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Messages.TLAbsStickers)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetUnreadMentions.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetUnreadMentions.cs new file mode 100644 index 0000000..51dbad6 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetUnreadMentions.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(1180140658)] + public class TLRequestGetUnreadMentions : TLMethod + { + public override int Constructor + { + get + { + return 1180140658; + } + } + + public TLAbsInputPeer Peer { get; set; } + public int OffsetId { get; set; } + public int AddOffset { get; set; } + public int Limit { get; set; } + public int MaxId { get; set; } + public int MinId { get; set; } + public Messages.TLAbsMessages Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + OffsetId = br.ReadInt32(); + AddOffset = br.ReadInt32(); + Limit = br.ReadInt32(); + MaxId = br.ReadInt32(); + MinId = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + bw.Write(OffsetId); + bw.Write(AddOffset); + bw.Write(Limit); + bw.Write(MaxId); + bw.Write(MinId); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Messages.TLAbsMessages)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestGetWebPagePreview.cs b/src/TeleSharp.TL/TL/Messages/TLRequestGetWebPagePreview.cs index 8ae9571..00d5076 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestGetWebPagePreview.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestGetWebPagePreview.cs @@ -7,18 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(623001124)] + [TLObject(-1956073268)] public class TLRequestGetWebPagePreview : TLMethod { public override int Constructor { get { - return 623001124; + return -1956073268; } } + public int Flags { get; set; } public string Message { get; set; } + public TLVector Entities { get; set; } public TLAbsMessageMedia Response { get; set; } @@ -29,14 +31,23 @@ namespace TeleSharp.TL.Messages public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); Message = StringUtil.Deserialize(br); + if ((Flags & 8) != 0) + Entities = (TLVector)ObjectUtils.DeserializeVector(br); + else + Entities = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); StringUtil.Serialize(Message, bw); + if ((Flags & 8) != 0) + ObjectUtils.SerializeObject(Entities, bw); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestHideReportSpam.cs b/src/TeleSharp.TL/TL/Messages/TLRequestHidePeerSettingsBar.cs similarity index 88% rename from src/TeleSharp.TL/TL/Messages/TLRequestHideReportSpam.cs rename to src/TeleSharp.TL/TL/Messages/TLRequestHidePeerSettingsBar.cs index b65333b..db1693e 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestHideReportSpam.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestHidePeerSettingsBar.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(-1460572005)] - public class TLRequestHideReportSpam : TLMethod + [TLObject(1336717624)] + public class TLRequestHidePeerSettingsBar : TLMethod { public override int Constructor { get { - return -1460572005; + return 1336717624; } } diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestMarkDialogUnread.cs b/src/TeleSharp.TL/TL/Messages/TLRequestMarkDialogUnread.cs new file mode 100644 index 0000000..11507fa --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestMarkDialogUnread.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-1031349873)] + public class TLRequestMarkDialogUnread : TLMethod + { + public override int Constructor + { + get + { + return -1031349873; + } + } + + public int Flags { get; set; } + public bool Unread { get; set; } + public TLAbsInputDialogPeer Peer { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Unread = (Flags & 1) != 0; + Peer = (TLAbsInputDialogPeer)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + ObjectUtils.SerializeObject(Peer, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestReadMentions.cs b/src/TeleSharp.TL/TL/Messages/TLRequestReadMentions.cs new file mode 100644 index 0000000..ff1a197 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestReadMentions.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(251759059)] + public class TLRequestReadMentions : TLMethod + { + public override int Constructor + { + get + { + return 251759059; + } + } + + public TLAbsInputPeer Peer { get; set; } + public Messages.TLAffectedHistory Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Messages.TLAffectedHistory)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestReorderPinnedDialogs.cs b/src/TeleSharp.TL/TL/Messages/TLRequestReorderPinnedDialogs.cs index 47fdd9c..efbd87d 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestReorderPinnedDialogs.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestReorderPinnedDialogs.cs @@ -7,27 +7,26 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(-1784678844)] + [TLObject(991616823)] public class TLRequestReorderPinnedDialogs : TLMethod { public override int Constructor { get { - return -1784678844; + return 991616823; } } public int Flags { get; set; } public bool Force { get; set; } - public TLVector Order { get; set; } + public int FolderId { get; set; } + public TLVector Order { get; set; } public bool Response { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Force ? (Flags | 1) : (Flags & ~1); } @@ -35,16 +34,17 @@ namespace TeleSharp.TL.Messages { Flags = br.ReadInt32(); Force = (Flags & 1) != 0; - Order = (TLVector)ObjectUtils.DeserializeVector(br); + FolderId = br.ReadInt32(); + Order = (TLVector)ObjectUtils.DeserializeVector(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + bw.Write(FolderId); ObjectUtils.SerializeObject(Order, bw); } diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestReorderStickerSets.cs b/src/TeleSharp.TL/TL/Messages/TLRequestReorderStickerSets.cs index 4bb0256..cbb160f 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestReorderStickerSets.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestReorderStickerSets.cs @@ -26,8 +26,6 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - Flags = 0; - Flags = Masks ? (Flags | 1) : (Flags & ~1); } @@ -42,7 +40,6 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); ObjectUtils.SerializeObject(Order, bw); diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestReport.cs b/src/TeleSharp.TL/TL/Messages/TLRequestReport.cs new file mode 100644 index 0000000..7a4f066 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestReport.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-1115507112)] + public class TLRequestReport : TLMethod + { + public override int Constructor + { + get + { + return -1115507112; + } + } + + public TLAbsInputPeer Peer { get; set; } + public TLVector Id { get; set; } + public TLAbsReportReason Reason { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + Id = (TLVector)ObjectUtils.DeserializeVector(br); + Reason = (TLAbsReportReason)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + ObjectUtils.SerializeObject(Id, bw); + ObjectUtils.SerializeObject(Reason, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestRequestUrlAuth.cs b/src/TeleSharp.TL/TL/Messages/TLRequestRequestUrlAuth.cs new file mode 100644 index 0000000..0b68f83 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestRequestUrlAuth.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-482388461)] + public class TLRequestRequestUrlAuth : TLMethod + { + public override int Constructor + { + get + { + return -482388461; + } + } + + public TLAbsInputPeer Peer { get; set; } + public int MsgId { get; set; } + public int ButtonId { get; set; } + public TLAbsUrlAuthResult Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + MsgId = br.ReadInt32(); + ButtonId = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + bw.Write(MsgId); + bw.Write(ButtonId); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLAbsUrlAuthResult)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestSaveDraft.cs b/src/TeleSharp.TL/TL/Messages/TLRequestSaveDraft.cs index 4c31964..f04311d 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestSaveDraft.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestSaveDraft.cs @@ -29,10 +29,6 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - Flags = 0; - Flags = NoWebpage ? (Flags | 2) : (Flags & ~2); - Flags = ReplyToMsgId != null ? (Flags | 1) : (Flags & ~1); - Flags = Entities != null ? (Flags | 8) : (Flags & ~8); } @@ -58,7 +54,6 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); if ((Flags & 1) != 0) diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestSaveRecentSticker.cs b/src/TeleSharp.TL/TL/Messages/TLRequestSaveRecentSticker.cs index 524b75e..e45eb00 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestSaveRecentSticker.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestSaveRecentSticker.cs @@ -27,8 +27,6 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - Flags = 0; - Flags = Attached ? (Flags | 1) : (Flags & ~1); } @@ -44,7 +42,6 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); ObjectUtils.SerializeObject(Id, bw); diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestSearch.cs b/src/TeleSharp.TL/TL/Messages/TLRequestSearch.cs index b9fb8b3..8815830 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestSearch.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestSearch.cs @@ -7,32 +7,35 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(-732523960)] + [TLObject(-2045448344)] public class TLRequestSearch : TLMethod { public override int Constructor { get { - return -732523960; + return -2045448344; } } public int Flags { get; set; } public TLAbsInputPeer Peer { get; set; } public string Q { get; set; } + public TLAbsInputUser FromId { get; set; } public TLAbsMessagesFilter Filter { get; set; } public int MinDate { get; set; } public int MaxDate { get; set; } - public int Offset { get; set; } - public int MaxId { get; set; } + public int OffsetId { get; set; } + public int AddOffset { get; set; } public int Limit { get; set; } + public int MaxId { get; set; } + public int MinId { get; set; } + public int Hash { get; set; } public Messages.TLAbsMessages Response { get; set; } public void ComputeFlags() { - Flags = 0; } @@ -41,28 +44,40 @@ namespace TeleSharp.TL.Messages Flags = br.ReadInt32(); Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); Q = StringUtil.Deserialize(br); + if ((Flags & 1) != 0) + FromId = (TLAbsInputUser)ObjectUtils.DeserializeObject(br); + else + FromId = null; + Filter = (TLAbsMessagesFilter)ObjectUtils.DeserializeObject(br); MinDate = br.ReadInt32(); MaxDate = br.ReadInt32(); - Offset = br.ReadInt32(); - MaxId = br.ReadInt32(); + OffsetId = br.ReadInt32(); + AddOffset = br.ReadInt32(); Limit = br.ReadInt32(); + MaxId = br.ReadInt32(); + MinId = br.ReadInt32(); + Hash = br.ReadInt32(); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); ObjectUtils.SerializeObject(Peer, bw); StringUtil.Serialize(Q, bw); + if ((Flags & 1) != 0) + ObjectUtils.SerializeObject(FromId, bw); ObjectUtils.SerializeObject(Filter, bw); bw.Write(MinDate); bw.Write(MaxDate); - bw.Write(Offset); - bw.Write(MaxId); + bw.Write(OffsetId); + bw.Write(AddOffset); bw.Write(Limit); + bw.Write(MaxId); + bw.Write(MinId); + bw.Write(Hash); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestSearchGlobal.cs b/src/TeleSharp.TL/TL/Messages/TLRequestSearchGlobal.cs index 990d5b1..d9e025a 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestSearchGlobal.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestSearchGlobal.cs @@ -7,19 +7,21 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(-1640190800)] + [TLObject(-1083038300)] public class TLRequestSearchGlobal : TLMethod { public override int Constructor { get { - return -1640190800; + return -1083038300; } } + public int Flags { get; set; } + public int? FolderId { get; set; } public string Q { get; set; } - public int OffsetDate { get; set; } + public int OffsetRate { get; set; } public TLAbsInputPeer OffsetPeer { get; set; } public int OffsetId { get; set; } public int Limit { get; set; } @@ -33,8 +35,14 @@ namespace TeleSharp.TL.Messages public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); + if ((Flags & 1) != 0) + FolderId = br.ReadInt32(); + else + FolderId = null; + Q = StringUtil.Deserialize(br); - OffsetDate = br.ReadInt32(); + OffsetRate = br.ReadInt32(); OffsetPeer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); OffsetId = br.ReadInt32(); Limit = br.ReadInt32(); @@ -44,8 +52,11 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); + if ((Flags & 1) != 0) + bw.Write(FolderId.Value); StringUtil.Serialize(Q, bw); - bw.Write(OffsetDate); + bw.Write(OffsetRate); ObjectUtils.SerializeObject(OffsetPeer, bw); bw.Write(OffsetId); bw.Write(Limit); diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestSearchStickerSets.cs b/src/TeleSharp.TL/TL/Messages/TLRequestSearchStickerSets.cs new file mode 100644 index 0000000..c6ee3ae --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestSearchStickerSets.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-1028140917)] + public class TLRequestSearchStickerSets : TLMethod + { + public override int Constructor + { + get + { + return -1028140917; + } + } + + public int Flags { get; set; } + public bool ExcludeFeatured { get; set; } + public string Q { get; set; } + public int Hash { get; set; } + public Messages.TLAbsFoundStickerSets Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + ExcludeFeatured = (Flags & 1) != 0; + Q = StringUtil.Deserialize(br); + Hash = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + StringUtil.Serialize(Q, bw); + bw.Write(Hash); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (Messages.TLAbsFoundStickerSets)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestSendInlineBotResult.cs b/src/TeleSharp.TL/TL/Messages/TLRequestSendInlineBotResult.cs index 74b5c25..80323ae 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestSendInlineBotResult.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestSendInlineBotResult.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(-1318189314)] + [TLObject(570955184)] public class TLRequestSendInlineBotResult : TLMethod { public override int Constructor { get { - return -1318189314; + return 570955184; } } @@ -22,21 +22,18 @@ namespace TeleSharp.TL.Messages public bool Silent { get; set; } public bool Background { get; set; } public bool ClearDraft { get; set; } + public bool HideVia { get; set; } public TLAbsInputPeer Peer { get; set; } public int? ReplyToMsgId { get; set; } public long RandomId { get; set; } public long QueryId { get; set; } public string Id { get; set; } + public int? ScheduleDate { get; set; } public TLAbsUpdates Response { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Silent ? (Flags | 32) : (Flags & ~32); - Flags = Background ? (Flags | 64) : (Flags & ~64); - Flags = ClearDraft ? (Flags | 128) : (Flags & ~128); - Flags = ReplyToMsgId != null ? (Flags | 1) : (Flags & ~1); } @@ -46,6 +43,7 @@ namespace TeleSharp.TL.Messages Silent = (Flags & 32) != 0; Background = (Flags & 64) != 0; ClearDraft = (Flags & 128) != 0; + HideVia = (Flags & 2048) != 0; Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); if ((Flags & 1) != 0) ReplyToMsgId = br.ReadInt32(); @@ -55,23 +53,30 @@ namespace TeleSharp.TL.Messages RandomId = br.ReadInt64(); QueryId = br.ReadInt64(); Id = StringUtil.Deserialize(br); + if ((Flags & 1024) != 0) + ScheduleDate = br.ReadInt32(); + else + ScheduleDate = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + ObjectUtils.SerializeObject(Peer, bw); if ((Flags & 1) != 0) bw.Write(ReplyToMsgId.Value); bw.Write(RandomId); bw.Write(QueryId); StringUtil.Serialize(Id, bw); + if ((Flags & 1024) != 0) + bw.Write(ScheduleDate.Value); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestSendMedia.cs b/src/TeleSharp.TL/TL/Messages/TLRequestSendMedia.cs index f8606e7..2c92d58 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestSendMedia.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestSendMedia.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(-923703407)] + [TLObject(881978281)] public class TLRequestSendMedia : TLMethod { public override int Constructor { get { - return -923703407; + return 881978281; } } @@ -25,19 +25,16 @@ namespace TeleSharp.TL.Messages public TLAbsInputPeer Peer { get; set; } public int? ReplyToMsgId { get; set; } public TLAbsInputMedia Media { get; set; } + public string Message { get; set; } public long RandomId { get; set; } public TLAbsReplyMarkup ReplyMarkup { get; set; } + public TLVector Entities { get; set; } + public int? ScheduleDate { get; set; } public TLAbsUpdates Response { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Silent ? (Flags | 32) : (Flags & ~32); - Flags = Background ? (Flags | 64) : (Flags & ~64); - Flags = ClearDraft ? (Flags | 128) : (Flags & ~128); - Flags = ReplyToMsgId != null ? (Flags | 1) : (Flags & ~1); - Flags = ReplyMarkup != null ? (Flags | 4) : (Flags & ~4); } @@ -54,19 +51,29 @@ namespace TeleSharp.TL.Messages ReplyToMsgId = null; Media = (TLAbsInputMedia)ObjectUtils.DeserializeObject(br); + Message = StringUtil.Deserialize(br); RandomId = br.ReadInt64(); if ((Flags & 4) != 0) ReplyMarkup = (TLAbsReplyMarkup)ObjectUtils.DeserializeObject(br); else ReplyMarkup = null; + if ((Flags & 8) != 0) + Entities = (TLVector)ObjectUtils.DeserializeVector(br); + else + Entities = null; + + if ((Flags & 1024) != 0) + ScheduleDate = br.ReadInt32(); + else + ScheduleDate = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); @@ -75,9 +82,14 @@ namespace TeleSharp.TL.Messages if ((Flags & 1) != 0) bw.Write(ReplyToMsgId.Value); ObjectUtils.SerializeObject(Media, bw); + StringUtil.Serialize(Message, bw); bw.Write(RandomId); if ((Flags & 4) != 0) ObjectUtils.SerializeObject(ReplyMarkup, bw); + if ((Flags & 8) != 0) + ObjectUtils.SerializeObject(Entities, bw); + if ((Flags & 1024) != 0) + bw.Write(ScheduleDate.Value); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestSendMessage.cs b/src/TeleSharp.TL/TL/Messages/TLRequestSendMessage.cs index 84d0a2a..946206a 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestSendMessage.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestSendMessage.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(-91733382)] + [TLObject(1376532592)] public class TLRequestSendMessage : TLMethod { public override int Constructor { get { - return -91733382; + return 1376532592; } } @@ -29,19 +29,12 @@ namespace TeleSharp.TL.Messages public long RandomId { get; set; } public TLAbsReplyMarkup ReplyMarkup { get; set; } public TLVector Entities { get; set; } + public int? ScheduleDate { get; set; } public TLAbsUpdates Response { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = NoWebpage ? (Flags | 2) : (Flags & ~2); - Flags = Silent ? (Flags | 32) : (Flags & ~32); - Flags = Background ? (Flags | 64) : (Flags & ~64); - Flags = ClearDraft ? (Flags | 128) : (Flags & ~128); - Flags = ReplyToMsgId != null ? (Flags | 1) : (Flags & ~1); - Flags = ReplyMarkup != null ? (Flags | 4) : (Flags & ~4); - Flags = Entities != null ? (Flags | 8) : (Flags & ~8); } @@ -70,13 +63,17 @@ namespace TeleSharp.TL.Messages else Entities = null; + if ((Flags & 1024) != 0) + ScheduleDate = br.ReadInt32(); + else + ScheduleDate = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); @@ -91,6 +88,8 @@ namespace TeleSharp.TL.Messages ObjectUtils.SerializeObject(ReplyMarkup, bw); if ((Flags & 8) != 0) ObjectUtils.SerializeObject(Entities, bw); + if ((Flags & 1024) != 0) + bw.Write(ScheduleDate.Value); } public override void DeserializeResponse(BinaryReader br) diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestSendMultiMedia.cs b/src/TeleSharp.TL/TL/Messages/TLRequestSendMultiMedia.cs new file mode 100644 index 0000000..adc80bd --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestSendMultiMedia.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-872345397)] + public class TLRequestSendMultiMedia : TLMethod + { + public override int Constructor + { + get + { + return -872345397; + } + } + + public int Flags { get; set; } + public bool Silent { get; set; } + public bool Background { get; set; } + public bool ClearDraft { get; set; } + public TLAbsInputPeer Peer { get; set; } + public int? ReplyToMsgId { get; set; } + public TLVector MultiMedia { get; set; } + public int? ScheduleDate { get; set; } + public TLAbsUpdates Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Silent = (Flags & 32) != 0; + Background = (Flags & 64) != 0; + ClearDraft = (Flags & 128) != 0; + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + if ((Flags & 1) != 0) + ReplyToMsgId = br.ReadInt32(); + else + ReplyToMsgId = null; + + MultiMedia = (TLVector)ObjectUtils.DeserializeVector(br); + if ((Flags & 1024) != 0) + ScheduleDate = br.ReadInt32(); + else + ScheduleDate = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + + + ObjectUtils.SerializeObject(Peer, bw); + if ((Flags & 1) != 0) + bw.Write(ReplyToMsgId.Value); + ObjectUtils.SerializeObject(MultiMedia, bw); + if ((Flags & 1024) != 0) + bw.Write(ScheduleDate.Value); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestSendScheduledMessages.cs b/src/TeleSharp.TL/TL/Messages/TLRequestSendScheduledMessages.cs new file mode 100644 index 0000000..40ccce9 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestSendScheduledMessages.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-1120369398)] + public class TLRequestSendScheduledMessages : TLMethod + { + public override int Constructor + { + get + { + return -1120369398; + } + } + + public TLAbsInputPeer Peer { get; set; } + public TLVector Id { get; set; } + public TLAbsUpdates Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + Id = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + ObjectUtils.SerializeObject(Id, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestForwardMessage.cs b/src/TeleSharp.TL/TL/Messages/TLRequestSendScreenshotNotification.cs similarity index 80% rename from src/TeleSharp.TL/TL/Messages/TLRequestForwardMessage.cs rename to src/TeleSharp.TL/TL/Messages/TLRequestSendScreenshotNotification.cs index cb704cd..6726538 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestForwardMessage.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestSendScreenshotNotification.cs @@ -7,19 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(865483769)] - public class TLRequestForwardMessage : TLMethod + [TLObject(-914493408)] + public class TLRequestSendScreenshotNotification : TLMethod { public override int Constructor { get { - return 865483769; + return -914493408; } } public TLAbsInputPeer Peer { get; set; } - public int Id { get; set; } + public int ReplyToMsgId { get; set; } public long RandomId { get; set; } public TLAbsUpdates Response { get; set; } @@ -32,7 +32,7 @@ namespace TeleSharp.TL.Messages public override void DeserializeBody(BinaryReader br) { Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); - Id = br.ReadInt32(); + ReplyToMsgId = br.ReadInt32(); RandomId = br.ReadInt64(); } @@ -41,7 +41,7 @@ namespace TeleSharp.TL.Messages { bw.Write(Constructor); ObjectUtils.SerializeObject(Peer, bw); - bw.Write(Id); + bw.Write(ReplyToMsgId); bw.Write(RandomId); } diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestSendVote.cs b/src/TeleSharp.TL/TL/Messages/TLRequestSendVote.cs new file mode 100644 index 0000000..150aaba --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestSendVote.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(283795844)] + public class TLRequestSendVote : TLMethod + { + public override int Constructor + { + get + { + return 283795844; + } + } + + public TLAbsInputPeer Peer { get; set; } + public int MsgId { get; set; } + public TLVector Options { get; set; } + public TLAbsUpdates Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + MsgId = br.ReadInt32(); + Options = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + bw.Write(MsgId); + ObjectUtils.SerializeObject(Options, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLAbsUpdates)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestSetBotCallbackAnswer.cs b/src/TeleSharp.TL/TL/Messages/TLRequestSetBotCallbackAnswer.cs index 96ab6ff..6fe8f21 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestSetBotCallbackAnswer.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestSetBotCallbackAnswer.cs @@ -29,10 +29,6 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - Flags = 0; - Flags = Alert ? (Flags | 2) : (Flags & ~2); - Flags = Message != null ? (Flags | 1) : (Flags & ~1); - Flags = Url != null ? (Flags | 4) : (Flags & ~4); } @@ -58,7 +54,6 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(QueryId); diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestSetBotPrecheckoutResults.cs b/src/TeleSharp.TL/TL/Messages/TLRequestSetBotPrecheckoutResults.cs index 88311c3..a2cdcf1 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestSetBotPrecheckoutResults.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestSetBotPrecheckoutResults.cs @@ -27,9 +27,6 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - Flags = 0; - Flags = Success ? (Flags | 2) : (Flags & ~2); - Flags = Error != null ? (Flags | 1) : (Flags & ~1); } @@ -49,7 +46,6 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(QueryId); diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestSetBotShippingResults.cs b/src/TeleSharp.TL/TL/Messages/TLRequestSetBotShippingResults.cs index 80e4d84..137ea73 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestSetBotShippingResults.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestSetBotShippingResults.cs @@ -27,9 +27,6 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - Flags = 0; - Flags = Error != null ? (Flags | 1) : (Flags & ~1); - Flags = ShippingOptions != null ? (Flags | 2) : (Flags & ~2); } @@ -53,7 +50,6 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(QueryId); if ((Flags & 1) != 0) diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestSetGameScore.cs b/src/TeleSharp.TL/TL/Messages/TLRequestSetGameScore.cs index 111327e..817e962 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestSetGameScore.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestSetGameScore.cs @@ -30,9 +30,6 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - Flags = 0; - Flags = EditMessage ? (Flags | 1) : (Flags & ~1); - Flags = Force ? (Flags | 2) : (Flags & ~2); } @@ -51,7 +48,6 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestSetInlineBotResults.cs b/src/TeleSharp.TL/TL/Messages/TLRequestSetInlineBotResults.cs index 666e6fa..737ad32 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestSetInlineBotResults.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestSetInlineBotResults.cs @@ -31,11 +31,6 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - Flags = 0; - Flags = Gallery ? (Flags | 1) : (Flags & ~1); - Flags = Private ? (Flags | 2) : (Flags & ~2); - Flags = NextOffset != null ? (Flags | 4) : (Flags & ~4); - Flags = SwitchPm != null ? (Flags | 8) : (Flags & ~8); } @@ -63,7 +58,6 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestSetInlineGameScore.cs b/src/TeleSharp.TL/TL/Messages/TLRequestSetInlineGameScore.cs index 336ad0f..67e805c 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestSetInlineGameScore.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestSetInlineGameScore.cs @@ -29,9 +29,6 @@ namespace TeleSharp.TL.Messages public void ComputeFlags() { - Flags = 0; - Flags = EditMessage ? (Flags | 1) : (Flags & ~1); - Flags = Force ? (Flags | 2) : (Flags & ~2); } @@ -49,7 +46,6 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestToggleDialogPin.cs b/src/TeleSharp.TL/TL/Messages/TLRequestToggleDialogPin.cs index cfc6029..22c17c3 100644 --- a/src/TeleSharp.TL/TL/Messages/TLRequestToggleDialogPin.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestToggleDialogPin.cs @@ -7,27 +7,25 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(847887978)] + [TLObject(-1489903017)] public class TLRequestToggleDialogPin : TLMethod { public override int Constructor { get { - return 847887978; + return -1489903017; } } public int Flags { get; set; } public bool Pinned { get; set; } - public TLAbsInputPeer Peer { get; set; } + public TLAbsInputDialogPeer Peer { get; set; } public bool Response { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Pinned ? (Flags | 1) : (Flags & ~1); } @@ -35,14 +33,13 @@ namespace TeleSharp.TL.Messages { Flags = br.ReadInt32(); Pinned = (Flags & 1) != 0; - Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + Peer = (TLAbsInputDialogPeer)ObjectUtils.DeserializeObject(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); ObjectUtils.SerializeObject(Peer, bw); diff --git a/src/TeleSharp.TL/TL/Channels/TLRequestUpdatePinnedMessage.cs b/src/TeleSharp.TL/TL/Messages/TLRequestUpdatePinnedMessage.cs similarity index 73% rename from src/TeleSharp.TL/TL/Channels/TLRequestUpdatePinnedMessage.cs rename to src/TeleSharp.TL/TL/Messages/TLRequestUpdatePinnedMessage.cs index 45014fd..995269a 100644 --- a/src/TeleSharp.TL/TL/Channels/TLRequestUpdatePinnedMessage.cs +++ b/src/TeleSharp.TL/TL/Messages/TLRequestUpdatePinnedMessage.cs @@ -5,30 +5,28 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using TeleSharp.TL; -namespace TeleSharp.TL.Channels +namespace TeleSharp.TL.Messages { - [TLObject(-1490162350)] + [TLObject(-760547348)] public class TLRequestUpdatePinnedMessage : TLMethod { public override int Constructor { get { - return -1490162350; + return -760547348; } } public int Flags { get; set; } public bool Silent { get; set; } - public TLAbsInputChannel Channel { get; set; } + public TLAbsInputPeer Peer { get; set; } public int Id { get; set; } public TLAbsUpdates Response { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Silent ? (Flags | 1) : (Flags & ~1); } @@ -36,7 +34,7 @@ namespace TeleSharp.TL.Channels { Flags = br.ReadInt32(); Silent = (Flags & 1) != 0; - Channel = (TLAbsInputChannel)ObjectUtils.DeserializeObject(br); + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); Id = br.ReadInt32(); } @@ -44,10 +42,9 @@ namespace TeleSharp.TL.Channels public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); - ObjectUtils.SerializeObject(Channel, bw); + ObjectUtils.SerializeObject(Peer, bw); bw.Write(Id); } diff --git a/src/TeleSharp.TL/TL/Messages/TLRequestUploadEncryptedFile.cs b/src/TeleSharp.TL/TL/Messages/TLRequestUploadEncryptedFile.cs new file mode 100644 index 0000000..f7554c3 --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLRequestUploadEncryptedFile.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(1347929239)] + public class TLRequestUploadEncryptedFile : TLMethod + { + public override int Constructor + { + get + { + return 1347929239; + } + } + + public TLInputEncryptedChat Peer { get; set; } + public TLAbsInputEncryptedFile File { get; set; } + public TLAbsEncryptedFile Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLInputEncryptedChat)ObjectUtils.DeserializeObject(br); + File = (TLAbsInputEncryptedFile)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + ObjectUtils.SerializeObject(File, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLAbsEncryptedFile)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLSearchCounter.cs b/src/TeleSharp.TL/TL/Messages/TLSearchCounter.cs new file mode 100644 index 0000000..71a00fb --- /dev/null +++ b/src/TeleSharp.TL/TL/Messages/TLSearchCounter.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Messages +{ + [TLObject(-398136321)] + public class TLSearchCounter : TLObject + { + public override int Constructor + { + get + { + return -398136321; + } + } + + public int Flags { get; set; } + public bool Inexact { get; set; } + public TLAbsMessagesFilter Filter { get; set; } + public int Count { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Inexact = (Flags & 2) != 0; + Filter = (TLAbsMessagesFilter)ObjectUtils.DeserializeObject(br); + Count = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + ObjectUtils.SerializeObject(Filter, bw); + bw.Write(Count); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Messages/TLStickerSet.cs b/src/TeleSharp.TL/TL/Messages/TLStickerSet.cs index c481a04..1e4c5f8 100644 --- a/src/TeleSharp.TL/TL/Messages/TLStickerSet.cs +++ b/src/TeleSharp.TL/TL/Messages/TLStickerSet.cs @@ -18,7 +18,7 @@ namespace TeleSharp.TL.Messages } } - public TL.TLStickerSet Set { get; set; } + public TLStickerSet Set { get; set; } public TLVector Packs { get; set; } public TLVector Documents { get; set; } @@ -30,7 +30,7 @@ namespace TeleSharp.TL.Messages public override void DeserializeBody(BinaryReader br) { - Set = (TL.TLStickerSet)ObjectUtils.DeserializeObject(br); + Set = (TLStickerSet)ObjectUtils.DeserializeObject(br); Packs = (TLVector)ObjectUtils.DeserializeVector(br); Documents = (TLVector)ObjectUtils.DeserializeVector(br); diff --git a/src/TeleSharp.TL/TL/Messages/TLStickers.cs b/src/TeleSharp.TL/TL/Messages/TLStickers.cs index 479e8fa..b230516 100644 --- a/src/TeleSharp.TL/TL/Messages/TLStickers.cs +++ b/src/TeleSharp.TL/TL/Messages/TLStickers.cs @@ -7,18 +7,18 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Messages { - [TLObject(-1970352846)] + [TLObject(-463889475)] public class TLStickers : TLAbsStickers { public override int Constructor { get { - return -1970352846; + return -463889475; } } - public string Hash { get; set; } + public int Hash { get; set; } public TLVector Stickers { get; set; } @@ -29,7 +29,7 @@ namespace TeleSharp.TL.Messages public override void DeserializeBody(BinaryReader br) { - Hash = StringUtil.Deserialize(br); + Hash = br.ReadInt32(); Stickers = (TLVector)ObjectUtils.DeserializeVector(br); } @@ -37,7 +37,7 @@ namespace TeleSharp.TL.Messages public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - StringUtil.Serialize(Hash, bw); + bw.Write(Hash); ObjectUtils.SerializeObject(Stickers, bw); } diff --git a/src/TeleSharp.TL/TL/Payments/TLPaymentForm.cs b/src/TeleSharp.TL/TL/Payments/TLPaymentForm.cs index 8f5c435..0dff455 100644 --- a/src/TeleSharp.TL/TL/Payments/TLPaymentForm.cs +++ b/src/TeleSharp.TL/TL/Payments/TLPaymentForm.cs @@ -34,13 +34,6 @@ namespace TeleSharp.TL.Payments public void ComputeFlags() { - Flags = 0; - Flags = CanSaveCredentials ? (Flags | 4) : (Flags & ~4); - Flags = PasswordMissing ? (Flags | 8) : (Flags & ~8); - Flags = NativeProvider != null ? (Flags | 16) : (Flags & ~16); - Flags = NativeParams != null ? (Flags | 16) : (Flags & ~16); - Flags = SavedInfo != null ? (Flags | 1) : (Flags & ~1); - Flags = SavedCredentials != null ? (Flags | 2) : (Flags & ~2); } @@ -80,7 +73,6 @@ namespace TeleSharp.TL.Payments public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); diff --git a/src/TeleSharp.TL/TL/Payments/TLPaymentReceipt.cs b/src/TeleSharp.TL/TL/Payments/TLPaymentReceipt.cs index 3faf5a4..4eb2311 100644 --- a/src/TeleSharp.TL/TL/Payments/TLPaymentReceipt.cs +++ b/src/TeleSharp.TL/TL/Payments/TLPaymentReceipt.cs @@ -33,9 +33,6 @@ namespace TeleSharp.TL.Payments public void ComputeFlags() { - Flags = 0; - Flags = Info != null ? (Flags | 1) : (Flags & ~1); - Flags = Shipping != null ? (Flags | 2) : (Flags & ~2); } @@ -66,7 +63,6 @@ namespace TeleSharp.TL.Payments public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(Date); bw.Write(BotId); diff --git a/src/TeleSharp.TL/TL/Payments/TLPaymentVerficationNeeded.cs b/src/TeleSharp.TL/TL/Payments/TLPaymentVerificationNeeded.cs similarity index 84% rename from src/TeleSharp.TL/TL/Payments/TLPaymentVerficationNeeded.cs rename to src/TeleSharp.TL/TL/Payments/TLPaymentVerificationNeeded.cs index 314f0f7..b0751aa 100644 --- a/src/TeleSharp.TL/TL/Payments/TLPaymentVerficationNeeded.cs +++ b/src/TeleSharp.TL/TL/Payments/TLPaymentVerificationNeeded.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Payments { - [TLObject(1800845601)] - public class TLPaymentVerficationNeeded : TLAbsPaymentResult + [TLObject(-666824391)] + public class TLPaymentVerificationNeeded : TLAbsPaymentResult { public override int Constructor { get { - return 1800845601; + return -666824391; } } diff --git a/src/TeleSharp.TL/TL/Payments/TLRequestClearSavedInfo.cs b/src/TeleSharp.TL/TL/Payments/TLRequestClearSavedInfo.cs index 009a75b..a288b50 100644 --- a/src/TeleSharp.TL/TL/Payments/TLRequestClearSavedInfo.cs +++ b/src/TeleSharp.TL/TL/Payments/TLRequestClearSavedInfo.cs @@ -26,9 +26,6 @@ namespace TeleSharp.TL.Payments public void ComputeFlags() { - Flags = 0; - Flags = Credentials ? (Flags | 1) : (Flags & ~1); - Flags = Info ? (Flags | 2) : (Flags & ~2); } @@ -43,7 +40,6 @@ namespace TeleSharp.TL.Payments public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); diff --git a/src/TeleSharp.TL/TL/Payments/TLRequestSendPaymentForm.cs b/src/TeleSharp.TL/TL/Payments/TLRequestSendPaymentForm.cs index ad5f901..060e8ed 100644 --- a/src/TeleSharp.TL/TL/Payments/TLRequestSendPaymentForm.cs +++ b/src/TeleSharp.TL/TL/Payments/TLRequestSendPaymentForm.cs @@ -28,9 +28,6 @@ namespace TeleSharp.TL.Payments public void ComputeFlags() { - Flags = 0; - Flags = RequestedInfoId != null ? (Flags | 1) : (Flags & ~1); - Flags = ShippingOptionId != null ? (Flags | 2) : (Flags & ~2); } @@ -55,7 +52,6 @@ namespace TeleSharp.TL.Payments public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(MsgId); if ((Flags & 1) != 0) diff --git a/src/TeleSharp.TL/TL/Payments/TLRequestValidateRequestedInfo.cs b/src/TeleSharp.TL/TL/Payments/TLRequestValidateRequestedInfo.cs index 286b894..206e1fe 100644 --- a/src/TeleSharp.TL/TL/Payments/TLRequestValidateRequestedInfo.cs +++ b/src/TeleSharp.TL/TL/Payments/TLRequestValidateRequestedInfo.cs @@ -27,8 +27,6 @@ namespace TeleSharp.TL.Payments public void ComputeFlags() { - Flags = 0; - Flags = Save ? (Flags | 1) : (Flags & ~1); } @@ -44,7 +42,6 @@ namespace TeleSharp.TL.Payments public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(MsgId); diff --git a/src/TeleSharp.TL/TL/Payments/TLSavedInfo.cs b/src/TeleSharp.TL/TL/Payments/TLSavedInfo.cs index e093e24..adb0f18 100644 --- a/src/TeleSharp.TL/TL/Payments/TLSavedInfo.cs +++ b/src/TeleSharp.TL/TL/Payments/TLSavedInfo.cs @@ -25,9 +25,6 @@ namespace TeleSharp.TL.Payments public void ComputeFlags() { - Flags = 0; - Flags = HasSavedCredentials ? (Flags | 2) : (Flags & ~2); - Flags = SavedInfo != null ? (Flags | 1) : (Flags & ~1); } @@ -46,7 +43,6 @@ namespace TeleSharp.TL.Payments public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); if ((Flags & 1) != 0) diff --git a/src/TeleSharp.TL/TL/Payments/TLValidatedRequestedInfo.cs b/src/TeleSharp.TL/TL/Payments/TLValidatedRequestedInfo.cs index d6936d6..dad5e4c 100644 --- a/src/TeleSharp.TL/TL/Payments/TLValidatedRequestedInfo.cs +++ b/src/TeleSharp.TL/TL/Payments/TLValidatedRequestedInfo.cs @@ -25,9 +25,6 @@ namespace TeleSharp.TL.Payments public void ComputeFlags() { - Flags = 0; - Flags = Id != null ? (Flags | 1) : (Flags & ~1); - Flags = ShippingOptions != null ? (Flags | 2) : (Flags & ~2); } @@ -50,7 +47,6 @@ namespace TeleSharp.TL.Payments public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); if ((Flags & 1) != 0) StringUtil.Serialize(Id, bw); diff --git a/src/TeleSharp.TL/TL/Phone/TLRequestDiscardCall.cs b/src/TeleSharp.TL/TL/Phone/TLRequestDiscardCall.cs index 6004e95..c965537 100644 --- a/src/TeleSharp.TL/TL/Phone/TLRequestDiscardCall.cs +++ b/src/TeleSharp.TL/TL/Phone/TLRequestDiscardCall.cs @@ -7,17 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Phone { - [TLObject(2027164582)] + [TLObject(-1295269440)] public class TLRequestDiscardCall : TLMethod { public override int Constructor { get { - return 2027164582; + return -1295269440; } } + public int Flags { get; set; } + public bool Video { get; set; } public TLInputPhoneCall Peer { get; set; } public int Duration { get; set; } public TLAbsPhoneCallDiscardReason Reason { get; set; } @@ -32,6 +34,8 @@ namespace TeleSharp.TL.Phone public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); + Video = (Flags & 1) != 0; Peer = (TLInputPhoneCall)ObjectUtils.DeserializeObject(br); Duration = br.ReadInt32(); Reason = (TLAbsPhoneCallDiscardReason)ObjectUtils.DeserializeObject(br); @@ -42,6 +46,8 @@ namespace TeleSharp.TL.Phone public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); + ObjectUtils.SerializeObject(Peer, bw); bw.Write(Duration); ObjectUtils.SerializeObject(Reason, bw); diff --git a/src/TeleSharp.TL/TL/Phone/TLRequestRequestCall.cs b/src/TeleSharp.TL/TL/Phone/TLRequestRequestCall.cs index db230f2..340950f 100644 --- a/src/TeleSharp.TL/TL/Phone/TLRequestRequestCall.cs +++ b/src/TeleSharp.TL/TL/Phone/TLRequestRequestCall.cs @@ -7,17 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Phone { - [TLObject(1536537556)] + [TLObject(1124046573)] public class TLRequestRequestCall : TLMethod { public override int Constructor { get { - return 1536537556; + return 1124046573; } } + public int Flags { get; set; } + public bool Video { get; set; } public TLAbsInputUser UserId { get; set; } public int RandomId { get; set; } public byte[] GAHash { get; set; } @@ -32,6 +34,8 @@ namespace TeleSharp.TL.Phone public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); + Video = (Flags & 1) != 0; UserId = (TLAbsInputUser)ObjectUtils.DeserializeObject(br); RandomId = br.ReadInt32(); GAHash = BytesUtil.Deserialize(br); @@ -42,6 +46,8 @@ namespace TeleSharp.TL.Phone public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); + ObjectUtils.SerializeObject(UserId, bw); bw.Write(RandomId); BytesUtil.Serialize(GAHash, bw); diff --git a/src/TeleSharp.TL/TL/Phone/TLRequestSetCallRating.cs b/src/TeleSharp.TL/TL/Phone/TLRequestSetCallRating.cs index 14a1c9f..35d9eb7 100644 --- a/src/TeleSharp.TL/TL/Phone/TLRequestSetCallRating.cs +++ b/src/TeleSharp.TL/TL/Phone/TLRequestSetCallRating.cs @@ -7,17 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Phone { - [TLObject(475228724)] + [TLObject(1508562471)] public class TLRequestSetCallRating : TLMethod { public override int Constructor { get { - return 475228724; + return 1508562471; } } + public int Flags { get; set; } + public bool UserInitiative { get; set; } public TLInputPhoneCall Peer { get; set; } public int Rating { get; set; } public string Comment { get; set; } @@ -31,6 +33,8 @@ namespace TeleSharp.TL.Phone public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); + UserInitiative = (Flags & 1) != 0; Peer = (TLInputPhoneCall)ObjectUtils.DeserializeObject(br); Rating = br.ReadInt32(); Comment = StringUtil.Deserialize(br); @@ -40,6 +44,8 @@ namespace TeleSharp.TL.Phone public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); + ObjectUtils.SerializeObject(Peer, bw); bw.Write(Rating); StringUtil.Serialize(Comment, bw); diff --git a/src/TeleSharp.TL/TL/Stickers/TLRequestChangeStickerPosition.cs b/src/TeleSharp.TL/TL/Stickers/TLRequestChangeStickerPosition.cs index 637effd..d5d3043 100644 --- a/src/TeleSharp.TL/TL/Stickers/TLRequestChangeStickerPosition.cs +++ b/src/TeleSharp.TL/TL/Stickers/TLRequestChangeStickerPosition.cs @@ -7,20 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Stickers { - [TLObject(1322714570)] + [TLObject(-4795190)] public class TLRequestChangeStickerPosition : TLMethod { public override int Constructor { get { - return 1322714570; + return -4795190; } } public TLAbsInputDocument Sticker { get; set; } public int Position { get; set; } - public bool Response { get; set; } + public Messages.TLStickerSet Response { get; set; } public void ComputeFlags() @@ -44,7 +44,7 @@ namespace TeleSharp.TL.Stickers } public override void DeserializeResponse(BinaryReader br) { - Response = BoolUtil.Deserialize(br); + Response = (Messages.TLStickerSet)ObjectUtils.DeserializeObject(br); } } diff --git a/src/TeleSharp.TL/TL/Stickers/TLRequestCreateStickerSet.cs b/src/TeleSharp.TL/TL/Stickers/TLRequestCreateStickerSet.cs index 3fae8cd..532ae66 100644 --- a/src/TeleSharp.TL/TL/Stickers/TLRequestCreateStickerSet.cs +++ b/src/TeleSharp.TL/TL/Stickers/TLRequestCreateStickerSet.cs @@ -29,8 +29,6 @@ namespace TeleSharp.TL.Stickers public void ComputeFlags() { - Flags = 0; - Flags = Masks ? (Flags | 1) : (Flags & ~1); } @@ -48,7 +46,6 @@ namespace TeleSharp.TL.Stickers public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); ObjectUtils.SerializeObject(UserId, bw); diff --git a/src/TeleSharp.TL/TL/Stickers/TLRequestRemoveStickerFromSet.cs b/src/TeleSharp.TL/TL/Stickers/TLRequestRemoveStickerFromSet.cs index b038891..d0be816 100644 --- a/src/TeleSharp.TL/TL/Stickers/TLRequestRemoveStickerFromSet.cs +++ b/src/TeleSharp.TL/TL/Stickers/TLRequestRemoveStickerFromSet.cs @@ -7,19 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Stickers { - [TLObject(69556532)] + [TLObject(-143257775)] public class TLRequestRemoveStickerFromSet : TLMethod { public override int Constructor { get { - return 69556532; + return -143257775; } } public TLAbsInputDocument Sticker { get; set; } - public bool Response { get; set; } + public Messages.TLStickerSet Response { get; set; } public void ComputeFlags() @@ -41,7 +41,7 @@ namespace TeleSharp.TL.Stickers } public override void DeserializeResponse(BinaryReader br) { - Response = BoolUtil.Deserialize(br); + Response = (Messages.TLStickerSet)ObjectUtils.DeserializeObject(br); } } diff --git a/src/TeleSharp.TL/TL/TLAbsContactLink.cs b/src/TeleSharp.TL/TL/TLAbsBaseTheme.cs similarity index 78% rename from src/TeleSharp.TL/TL/TLAbsContactLink.cs rename to src/TeleSharp.TL/TL/TLAbsBaseTheme.cs index 096f1cf..fd8a55a 100644 --- a/src/TeleSharp.TL/TL/TLAbsContactLink.cs +++ b/src/TeleSharp.TL/TL/TLAbsBaseTheme.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - public abstract class TLAbsContactLink : TLObject + public abstract class TLAbsBaseTheme : TLObject { } } diff --git a/src/TeleSharp.TL/TL/TLAbsChannelParticipantRole.cs b/src/TeleSharp.TL/TL/TLAbsChannelAdminLogEventAction.cs similarity index 73% rename from src/TeleSharp.TL/TL/TLAbsChannelParticipantRole.cs rename to src/TeleSharp.TL/TL/TLAbsChannelAdminLogEventAction.cs index c162b88..d9a2c94 100644 --- a/src/TeleSharp.TL/TL/TLAbsChannelParticipantRole.cs +++ b/src/TeleSharp.TL/TL/TLAbsChannelAdminLogEventAction.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - public abstract class TLAbsChannelParticipantRole : TLObject + public abstract class TLAbsChannelAdminLogEventAction : TLObject { } } diff --git a/src/TeleSharp.TL/TL/TLAbsPeerNotifyEvents.cs b/src/TeleSharp.TL/TL/TLAbsChannelLocation.cs similarity index 76% rename from src/TeleSharp.TL/TL/TLAbsPeerNotifyEvents.cs rename to src/TeleSharp.TL/TL/TLAbsChannelLocation.cs index b0df9f6..06efa7a 100644 --- a/src/TeleSharp.TL/TL/TLAbsPeerNotifyEvents.cs +++ b/src/TeleSharp.TL/TL/TLAbsChannelLocation.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - public abstract class TLAbsPeerNotifyEvents : TLObject + public abstract class TLAbsChannelLocation : TLObject { } } diff --git a/src/TeleSharp.TL/TL/TLAbsPage.cs b/src/TeleSharp.TL/TL/TLAbsDialog.cs similarity index 79% rename from src/TeleSharp.TL/TL/TLAbsPage.cs rename to src/TeleSharp.TL/TL/TLAbsDialog.cs index 92ef907..6b6957b 100644 --- a/src/TeleSharp.TL/TL/TLAbsPage.cs +++ b/src/TeleSharp.TL/TL/TLAbsDialog.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - public abstract class TLAbsPage : TLObject + public abstract class TLAbsDialog : TLObject { } } diff --git a/src/TeleSharp.TL/TL/TLAbsFileLocation.cs b/src/TeleSharp.TL/TL/TLAbsDialogPeer.cs similarity index 77% rename from src/TeleSharp.TL/TL/TLAbsFileLocation.cs rename to src/TeleSharp.TL/TL/TLAbsDialogPeer.cs index c813e5e..36bfd2b 100644 --- a/src/TeleSharp.TL/TL/TLAbsFileLocation.cs +++ b/src/TeleSharp.TL/TL/TLAbsDialogPeer.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - public abstract class TLAbsFileLocation : TLObject + public abstract class TLAbsDialogPeer : TLObject { } } diff --git a/src/TeleSharp.TL/TL/TLAbsEmojiKeyword.cs b/src/TeleSharp.TL/TL/TLAbsEmojiKeyword.cs new file mode 100644 index 0000000..f7863f0 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAbsEmojiKeyword.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsEmojiKeyword : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/TLAbsInputPeerNotifyEvents.cs b/src/TeleSharp.TL/TL/TLAbsInputCheckPasswordSRP.cs similarity index 75% rename from src/TeleSharp.TL/TL/TLAbsInputPeerNotifyEvents.cs rename to src/TeleSharp.TL/TL/TLAbsInputCheckPasswordSRP.cs index 7266e4f..3078106 100644 --- a/src/TeleSharp.TL/TL/TLAbsInputPeerNotifyEvents.cs +++ b/src/TeleSharp.TL/TL/TLAbsInputCheckPasswordSRP.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - public abstract class TLAbsInputPeerNotifyEvents : TLObject + public abstract class TLAbsInputCheckPasswordSRP : TLObject { } } diff --git a/src/TeleSharp.TL/TL/TLAbsInputDialogPeer.cs b/src/TeleSharp.TL/TL/TLAbsInputDialogPeer.cs new file mode 100644 index 0000000..7c33afb --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAbsInputDialogPeer.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsInputDialogPeer : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/TLAbsInputMessage.cs b/src/TeleSharp.TL/TL/TLAbsInputMessage.cs new file mode 100644 index 0000000..2856cba --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAbsInputMessage.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsInputMessage : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/TLAbsInputSecureFile.cs b/src/TeleSharp.TL/TL/TLAbsInputSecureFile.cs new file mode 100644 index 0000000..e229086 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAbsInputSecureFile.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsInputSecureFile : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/TLAbsInputTheme.cs b/src/TeleSharp.TL/TL/TLAbsInputTheme.cs new file mode 100644 index 0000000..2411765 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAbsInputTheme.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsInputTheme : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/TLAbsInputWallPaper.cs b/src/TeleSharp.TL/TL/TLAbsInputWallPaper.cs new file mode 100644 index 0000000..cfe4c68 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAbsInputWallPaper.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsInputWallPaper : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/TLAbsInputWebFileLocation.cs b/src/TeleSharp.TL/TL/TLAbsInputWebFileLocation.cs new file mode 100644 index 0000000..8429261 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAbsInputWebFileLocation.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsInputWebFileLocation : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/TLAbsJSONValue.cs b/src/TeleSharp.TL/TL/TLAbsJSONValue.cs new file mode 100644 index 0000000..78d7f38 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAbsJSONValue.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsJSONValue : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/TLAbsLangPackString.cs b/src/TeleSharp.TL/TL/TLAbsLangPackString.cs new file mode 100644 index 0000000..22f0413 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAbsLangPackString.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsLangPackString : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/TLAbsPageListItem.cs b/src/TeleSharp.TL/TL/TLAbsPageListItem.cs new file mode 100644 index 0000000..c20dd9a --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAbsPageListItem.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsPageListItem : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/TLAbsPageListOrderedItem.cs b/src/TeleSharp.TL/TL/TLAbsPageListOrderedItem.cs new file mode 100644 index 0000000..2aba19a --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAbsPageListOrderedItem.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsPageListOrderedItem : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/TLAbsPasswordKdfAlgo.cs b/src/TeleSharp.TL/TL/TLAbsPasswordKdfAlgo.cs new file mode 100644 index 0000000..a7a0997 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAbsPasswordKdfAlgo.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsPasswordKdfAlgo : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/TLAbsPeerNotifySettings.cs b/src/TeleSharp.TL/TL/TLAbsPeerNotifySettings.cs deleted file mode 100644 index 57c5087..0000000 --- a/src/TeleSharp.TL/TL/TLAbsPeerNotifySettings.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using TeleSharp.TL; -namespace TeleSharp.TL -{ - public abstract class TLAbsPeerNotifySettings : TLObject - { - } -} diff --git a/src/TeleSharp.TL/TL/TLAbsRecentMeUrl.cs b/src/TeleSharp.TL/TL/TLAbsRecentMeUrl.cs new file mode 100644 index 0000000..33b50a2 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAbsRecentMeUrl.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsRecentMeUrl : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/TLAbsSecureFile.cs b/src/TeleSharp.TL/TL/TLAbsSecureFile.cs new file mode 100644 index 0000000..cce05ab --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAbsSecureFile.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsSecureFile : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/TLAbsSecurePasswordKdfAlgo.cs b/src/TeleSharp.TL/TL/TLAbsSecurePasswordKdfAlgo.cs new file mode 100644 index 0000000..f4bdcde --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAbsSecurePasswordKdfAlgo.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsSecurePasswordKdfAlgo : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/TLAbsSecurePlainData.cs b/src/TeleSharp.TL/TL/TLAbsSecurePlainData.cs new file mode 100644 index 0000000..f21db4d --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAbsSecurePlainData.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsSecurePlainData : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/TLAbsSecureRequiredType.cs b/src/TeleSharp.TL/TL/TLAbsSecureRequiredType.cs new file mode 100644 index 0000000..ba91498 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAbsSecureRequiredType.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsSecureRequiredType : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/TLAbsSecureValueError.cs b/src/TeleSharp.TL/TL/TLAbsSecureValueError.cs new file mode 100644 index 0000000..8c90037 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAbsSecureValueError.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsSecureValueError : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/TLAbsSecureValueType.cs b/src/TeleSharp.TL/TL/TLAbsSecureValueType.cs new file mode 100644 index 0000000..d76a640 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAbsSecureValueType.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsSecureValueType : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/TLAbsUrlAuthResult.cs b/src/TeleSharp.TL/TL/TLAbsUrlAuthResult.cs new file mode 100644 index 0000000..3be0131 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAbsUrlAuthResult.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsUrlAuthResult : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/TLAbsWebDocument.cs b/src/TeleSharp.TL/TL/TLAbsWebDocument.cs new file mode 100644 index 0000000..6e2bfb7 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAbsWebDocument.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + public abstract class TLAbsWebDocument : TLObject + { + } +} diff --git a/src/TeleSharp.TL/TL/TLAuthorization.cs b/src/TeleSharp.TL/TL/TLAuthorization.cs index fbf369f..f522c8e 100644 --- a/src/TeleSharp.TL/TL/TLAuthorization.cs +++ b/src/TeleSharp.TL/TL/TLAuthorization.cs @@ -7,19 +7,22 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(2079516406)] + [TLObject(-1392388579)] public class TLAuthorization : TLObject { public override int Constructor { get { - return 2079516406; + return -1392388579; } } - public long Hash { get; set; } public int Flags { get; set; } + public bool Current { get; set; } + public bool OfficialApp { get; set; } + public bool PasswordPending { get; set; } + public long Hash { get; set; } public string DeviceModel { get; set; } public string Platform { get; set; } public string SystemVersion { get; set; } @@ -35,14 +38,16 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; } public override void DeserializeBody(BinaryReader br) { - Hash = br.ReadInt64(); Flags = br.ReadInt32(); + Current = (Flags & 1) != 0; + OfficialApp = (Flags & 2) != 0; + PasswordPending = (Flags & 4) != 0; + Hash = br.ReadInt64(); DeviceModel = StringUtil.Deserialize(br); Platform = StringUtil.Deserialize(br); SystemVersion = StringUtil.Deserialize(br); @@ -60,8 +65,10 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + + + bw.Write(Hash); StringUtil.Serialize(DeviceModel, bw); StringUtil.Serialize(Platform, bw); diff --git a/src/TeleSharp.TL/TL/TLAutoDownloadSettings.cs b/src/TeleSharp.TL/TL/TLAutoDownloadSettings.cs new file mode 100644 index 0000000..90f4ddd --- /dev/null +++ b/src/TeleSharp.TL/TL/TLAutoDownloadSettings.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-532532493)] + public class TLAutoDownloadSettings : TLObject + { + public override int Constructor + { + get + { + return -532532493; + } + } + + public int Flags { get; set; } + public bool Disabled { get; set; } + public bool VideoPreloadLarge { get; set; } + public bool AudioPreloadNext { get; set; } + public bool PhonecallsLessData { get; set; } + public int PhotoSizeMax { get; set; } + public int VideoSizeMax { get; set; } + public int FileSizeMax { get; set; } + public int VideoUploadMaxbitrate { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Disabled = (Flags & 1) != 0; + VideoPreloadLarge = (Flags & 2) != 0; + AudioPreloadNext = (Flags & 4) != 0; + PhonecallsLessData = (Flags & 8) != 0; + PhotoSizeMax = br.ReadInt32(); + VideoSizeMax = br.ReadInt32(); + FileSizeMax = br.ReadInt32(); + VideoUploadMaxbitrate = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + + + + bw.Write(PhotoSizeMax); + bw.Write(VideoSizeMax); + bw.Write(FileSizeMax); + bw.Write(VideoUploadMaxbitrate); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLContactLinkNone.cs b/src/TeleSharp.TL/TL/TLBaseThemeArctic.cs similarity index 82% rename from src/TeleSharp.TL/TL/TLContactLinkNone.cs rename to src/TeleSharp.TL/TL/TLBaseThemeArctic.cs index 66a0bd9..019e26e 100644 --- a/src/TeleSharp.TL/TL/TLContactLinkNone.cs +++ b/src/TeleSharp.TL/TL/TLBaseThemeArctic.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-17968211)] - public class TLContactLinkNone : TLAbsContactLink + [TLObject(1527845466)] + public class TLBaseThemeArctic : TLAbsBaseTheme { public override int Constructor { get { - return -17968211; + return 1527845466; } } diff --git a/src/TeleSharp.TL/TL/TLContactLinkHasPhone.cs b/src/TeleSharp.TL/TL/TLBaseThemeClassic.cs similarity index 82% rename from src/TeleSharp.TL/TL/TLContactLinkHasPhone.cs rename to src/TeleSharp.TL/TL/TLBaseThemeClassic.cs index 6ac2fd4..d3b44c2 100644 --- a/src/TeleSharp.TL/TL/TLContactLinkHasPhone.cs +++ b/src/TeleSharp.TL/TL/TLBaseThemeClassic.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(646922073)] - public class TLContactLinkHasPhone : TLAbsContactLink + [TLObject(-1012849566)] + public class TLBaseThemeClassic : TLAbsBaseTheme { public override int Constructor { get { - return 646922073; + return -1012849566; } } diff --git a/src/TeleSharp.TL/TL/TLNotifyAll.cs b/src/TeleSharp.TL/TL/TLBaseThemeDay.cs similarity index 83% rename from src/TeleSharp.TL/TL/TLNotifyAll.cs rename to src/TeleSharp.TL/TL/TLBaseThemeDay.cs index 47d2946..a8d1466 100644 --- a/src/TeleSharp.TL/TL/TLNotifyAll.cs +++ b/src/TeleSharp.TL/TL/TLBaseThemeDay.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(1959820384)] - public class TLNotifyAll : TLAbsNotifyPeer + [TLObject(-69724536)] + public class TLBaseThemeDay : TLAbsBaseTheme { public override int Constructor { get { - return 1959820384; + return -69724536; } } diff --git a/src/TeleSharp.TL/TL/TLContactLinkContact.cs b/src/TeleSharp.TL/TL/TLBaseThemeNight.cs similarity index 82% rename from src/TeleSharp.TL/TL/TLContactLinkContact.cs rename to src/TeleSharp.TL/TL/TLBaseThemeNight.cs index 3c3b673..5bcd54f 100644 --- a/src/TeleSharp.TL/TL/TLContactLinkContact.cs +++ b/src/TeleSharp.TL/TL/TLBaseThemeNight.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-721239344)] - public class TLContactLinkContact : TLAbsContactLink + [TLObject(-1212997976)] + public class TLBaseThemeNight : TLAbsBaseTheme { public override int Constructor { get { - return -721239344; + return -1212997976; } } diff --git a/src/TeleSharp.TL/TL/TLBaseThemeTinted.cs b/src/TeleSharp.TL/TL/TLBaseThemeTinted.cs new file mode 100644 index 0000000..e127e6c --- /dev/null +++ b/src/TeleSharp.TL/TL/TLBaseThemeTinted.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1834973166)] + public class TLBaseThemeTinted : TLAbsBaseTheme + { + public override int Constructor + { + get + { + return 1834973166; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLBotInlineMediaResult.cs b/src/TeleSharp.TL/TL/TLBotInlineMediaResult.cs index c6765bd..7e7c67a 100644 --- a/src/TeleSharp.TL/TL/TLBotInlineMediaResult.cs +++ b/src/TeleSharp.TL/TL/TLBotInlineMediaResult.cs @@ -30,11 +30,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Photo != null ? (Flags | 1) : (Flags & ~1); - Flags = Document != null ? (Flags | 2) : (Flags & ~2); - Flags = Title != null ? (Flags | 4) : (Flags & ~4); - Flags = Description != null ? (Flags | 8) : (Flags & ~8); } @@ -70,7 +65,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); StringUtil.Serialize(Id, bw); StringUtil.Serialize(Type, bw); diff --git a/src/TeleSharp.TL/TL/TLBotInlineMessageMediaAuto.cs b/src/TeleSharp.TL/TL/TLBotInlineMessageMediaAuto.cs index bbaeee4..4d52cbd 100644 --- a/src/TeleSharp.TL/TL/TLBotInlineMessageMediaAuto.cs +++ b/src/TeleSharp.TL/TL/TLBotInlineMessageMediaAuto.cs @@ -7,33 +7,37 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(175419739)] + [TLObject(1984755728)] public class TLBotInlineMessageMediaAuto : TLAbsBotInlineMessage { public override int Constructor { get { - return 175419739; + return 1984755728; } } public int Flags { get; set; } - public string Caption { get; set; } + public string Message { get; set; } + public TLVector Entities { get; set; } public TLAbsReplyMarkup ReplyMarkup { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = ReplyMarkup != null ? (Flags | 4) : (Flags & ~4); } public override void DeserializeBody(BinaryReader br) { Flags = br.ReadInt32(); - Caption = StringUtil.Deserialize(br); + Message = StringUtil.Deserialize(br); + if ((Flags & 2) != 0) + Entities = (TLVector)ObjectUtils.DeserializeVector(br); + else + Entities = null; + if ((Flags & 4) != 0) ReplyMarkup = (TLAbsReplyMarkup)ObjectUtils.DeserializeObject(br); else @@ -45,9 +49,10 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); - StringUtil.Serialize(Caption, bw); + StringUtil.Serialize(Message, bw); + if ((Flags & 2) != 0) + ObjectUtils.SerializeObject(Entities, bw); if ((Flags & 4) != 0) ObjectUtils.SerializeObject(ReplyMarkup, bw); diff --git a/src/TeleSharp.TL/TL/TLBotInlineMessageMediaContact.cs b/src/TeleSharp.TL/TL/TLBotInlineMessageMediaContact.cs index efb067e..33a35e3 100644 --- a/src/TeleSharp.TL/TL/TLBotInlineMessageMediaContact.cs +++ b/src/TeleSharp.TL/TL/TLBotInlineMessageMediaContact.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(904770772)] + [TLObject(416402882)] public class TLBotInlineMessageMediaContact : TLAbsBotInlineMessage { public override int Constructor { get { - return 904770772; + return 416402882; } } @@ -22,13 +22,12 @@ namespace TeleSharp.TL public string PhoneNumber { get; set; } public string FirstName { get; set; } public string LastName { get; set; } + public string Vcard { get; set; } public TLAbsReplyMarkup ReplyMarkup { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = ReplyMarkup != null ? (Flags | 4) : (Flags & ~4); } @@ -38,6 +37,7 @@ namespace TeleSharp.TL PhoneNumber = StringUtil.Deserialize(br); FirstName = StringUtil.Deserialize(br); LastName = StringUtil.Deserialize(br); + Vcard = StringUtil.Deserialize(br); if ((Flags & 4) != 0) ReplyMarkup = (TLAbsReplyMarkup)ObjectUtils.DeserializeObject(br); else @@ -49,11 +49,11 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); StringUtil.Serialize(PhoneNumber, bw); StringUtil.Serialize(FirstName, bw); StringUtil.Serialize(LastName, bw); + StringUtil.Serialize(Vcard, bw); if ((Flags & 4) != 0) ObjectUtils.SerializeObject(ReplyMarkup, bw); diff --git a/src/TeleSharp.TL/TL/TLBotInlineMessageMediaGeo.cs b/src/TeleSharp.TL/TL/TLBotInlineMessageMediaGeo.cs index caf8bda..6623413 100644 --- a/src/TeleSharp.TL/TL/TLBotInlineMessageMediaGeo.cs +++ b/src/TeleSharp.TL/TL/TLBotInlineMessageMediaGeo.cs @@ -7,26 +7,25 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(982505656)] + [TLObject(-1222451611)] public class TLBotInlineMessageMediaGeo : TLAbsBotInlineMessage { public override int Constructor { get { - return 982505656; + return -1222451611; } } public int Flags { get; set; } public TLAbsGeoPoint Geo { get; set; } + public int Period { get; set; } public TLAbsReplyMarkup ReplyMarkup { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = ReplyMarkup != null ? (Flags | 4) : (Flags & ~4); } @@ -34,6 +33,7 @@ namespace TeleSharp.TL { Flags = br.ReadInt32(); Geo = (TLAbsGeoPoint)ObjectUtils.DeserializeObject(br); + Period = br.ReadInt32(); if ((Flags & 4) != 0) ReplyMarkup = (TLAbsReplyMarkup)ObjectUtils.DeserializeObject(br); else @@ -45,9 +45,9 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); ObjectUtils.SerializeObject(Geo, bw); + bw.Write(Period); if ((Flags & 4) != 0) ObjectUtils.SerializeObject(ReplyMarkup, bw); diff --git a/src/TeleSharp.TL/TL/TLBotInlineMessageMediaVenue.cs b/src/TeleSharp.TL/TL/TLBotInlineMessageMediaVenue.cs index ee1e589..0a04875 100644 --- a/src/TeleSharp.TL/TL/TLBotInlineMessageMediaVenue.cs +++ b/src/TeleSharp.TL/TL/TLBotInlineMessageMediaVenue.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(1130767150)] + [TLObject(-1970903652)] public class TLBotInlineMessageMediaVenue : TLAbsBotInlineMessage { public override int Constructor { get { - return 1130767150; + return -1970903652; } } @@ -24,13 +24,12 @@ namespace TeleSharp.TL public string Address { get; set; } public string Provider { get; set; } public string VenueId { get; set; } + public string VenueType { get; set; } public TLAbsReplyMarkup ReplyMarkup { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = ReplyMarkup != null ? (Flags | 4) : (Flags & ~4); } @@ -42,6 +41,7 @@ namespace TeleSharp.TL Address = StringUtil.Deserialize(br); Provider = StringUtil.Deserialize(br); VenueId = StringUtil.Deserialize(br); + VenueType = StringUtil.Deserialize(br); if ((Flags & 4) != 0) ReplyMarkup = (TLAbsReplyMarkup)ObjectUtils.DeserializeObject(br); else @@ -53,13 +53,13 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); ObjectUtils.SerializeObject(Geo, bw); StringUtil.Serialize(Title, bw); StringUtil.Serialize(Address, bw); StringUtil.Serialize(Provider, bw); StringUtil.Serialize(VenueId, bw); + StringUtil.Serialize(VenueType, bw); if ((Flags & 4) != 0) ObjectUtils.SerializeObject(ReplyMarkup, bw); diff --git a/src/TeleSharp.TL/TL/TLBotInlineMessageText.cs b/src/TeleSharp.TL/TL/TLBotInlineMessageText.cs index 7e8a319..c4e0520 100644 --- a/src/TeleSharp.TL/TL/TLBotInlineMessageText.cs +++ b/src/TeleSharp.TL/TL/TLBotInlineMessageText.cs @@ -27,10 +27,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = NoWebpage ? (Flags | 1) : (Flags & ~1); - Flags = Entities != null ? (Flags | 2) : (Flags & ~2); - Flags = ReplyMarkup != null ? (Flags | 4) : (Flags & ~4); } @@ -55,7 +51,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); StringUtil.Serialize(Message, bw); diff --git a/src/TeleSharp.TL/TL/TLBotInlineResult.cs b/src/TeleSharp.TL/TL/TLBotInlineResult.cs index 574f7c9..d331995 100644 --- a/src/TeleSharp.TL/TL/TLBotInlineResult.cs +++ b/src/TeleSharp.TL/TL/TLBotInlineResult.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1679053127)] + [TLObject(295067450)] public class TLBotInlineResult : TLAbsBotInlineResult { public override int Constructor { get { - return -1679053127; + return 295067450; } } @@ -24,27 +24,13 @@ namespace TeleSharp.TL public string Title { get; set; } public string Description { get; set; } public string Url { get; set; } - public string ThumbUrl { get; set; } - public string ContentUrl { get; set; } - public string ContentType { get; set; } - public int? W { get; set; } - public int? H { get; set; } - public int? Duration { get; set; } + public TLAbsWebDocument Thumb { get; set; } + public TLAbsWebDocument Content { get; set; } public TLAbsBotInlineMessage SendMessage { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Title != null ? (Flags | 2) : (Flags & ~2); - Flags = Description != null ? (Flags | 4) : (Flags & ~4); - Flags = Url != null ? (Flags | 8) : (Flags & ~8); - Flags = ThumbUrl != null ? (Flags | 16) : (Flags & ~16); - Flags = ContentUrl != null ? (Flags | 32) : (Flags & ~32); - Flags = ContentType != null ? (Flags | 32) : (Flags & ~32); - Flags = W != null ? (Flags | 64) : (Flags & ~64); - Flags = H != null ? (Flags | 64) : (Flags & ~64); - Flags = Duration != null ? (Flags | 128) : (Flags & ~128); } @@ -69,34 +55,14 @@ namespace TeleSharp.TL Url = null; if ((Flags & 16) != 0) - ThumbUrl = StringUtil.Deserialize(br); + Thumb = (TLAbsWebDocument)ObjectUtils.DeserializeObject(br); else - ThumbUrl = null; + Thumb = null; if ((Flags & 32) != 0) - ContentUrl = StringUtil.Deserialize(br); + Content = (TLAbsWebDocument)ObjectUtils.DeserializeObject(br); else - ContentUrl = null; - - if ((Flags & 32) != 0) - ContentType = StringUtil.Deserialize(br); - else - ContentType = null; - - if ((Flags & 64) != 0) - W = br.ReadInt32(); - else - W = null; - - if ((Flags & 64) != 0) - H = br.ReadInt32(); - else - H = null; - - if ((Flags & 128) != 0) - Duration = br.ReadInt32(); - else - Duration = null; + Content = null; SendMessage = (TLAbsBotInlineMessage)ObjectUtils.DeserializeObject(br); @@ -105,7 +71,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); StringUtil.Serialize(Id, bw); StringUtil.Serialize(Type, bw); @@ -116,17 +81,9 @@ namespace TeleSharp.TL if ((Flags & 8) != 0) StringUtil.Serialize(Url, bw); if ((Flags & 16) != 0) - StringUtil.Serialize(ThumbUrl, bw); + ObjectUtils.SerializeObject(Thumb, bw); if ((Flags & 32) != 0) - StringUtil.Serialize(ContentUrl, bw); - if ((Flags & 32) != 0) - StringUtil.Serialize(ContentType, bw); - if ((Flags & 64) != 0) - bw.Write(W.Value); - if ((Flags & 64) != 0) - bw.Write(H.Value); - if ((Flags & 128) != 0) - bw.Write(Duration.Value); + ObjectUtils.SerializeObject(Content, bw); ObjectUtils.SerializeObject(SendMessage, bw); } diff --git a/src/TeleSharp.TL/TL/TLChannel.cs b/src/TeleSharp.TL/TL/TLChannel.cs index b38719c..4bd7d43 100644 --- a/src/TeleSharp.TL/TL/TLChannel.cs +++ b/src/TeleSharp.TL/TL/TLChannel.cs @@ -7,30 +7,30 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1588737454)] + [TLObject(-753232354)] public class TLChannel : TLAbsChat { public override int Constructor { get { - return -1588737454; + return -753232354; } } public int Flags { get; set; } public bool Creator { get; set; } - public bool Kicked { get; set; } public bool Left { get; set; } - public bool Editor { get; set; } - public bool Moderator { get; set; } public bool Broadcast { get; set; } public bool Verified { get; set; } public bool Megagroup { get; set; } public bool Restricted { get; set; } - public bool Democracy { get; set; } public bool Signatures { get; set; } public bool Min { get; set; } + public bool Scam { get; set; } + public bool HasLink { get; set; } + public bool HasGeo { get; set; } + public bool SlowmodeEnabled { get; set; } public int Id { get; set; } public long? AccessHash { get; set; } public string Title { get; set; } @@ -38,27 +38,15 @@ namespace TeleSharp.TL public TLAbsChatPhoto Photo { get; set; } public int Date { get; set; } public int Version { get; set; } - public string RestrictionReason { get; set; } + public TLVector RestrictionReason { get; set; } + public TLChatAdminRights AdminRights { get; set; } + public TLChatBannedRights BannedRights { get; set; } + public TLChatBannedRights DefaultBannedRights { get; set; } + public int? ParticipantsCount { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Creator ? (Flags | 1) : (Flags & ~1); - Flags = Kicked ? (Flags | 2) : (Flags & ~2); - Flags = Left ? (Flags | 4) : (Flags & ~4); - Flags = Editor ? (Flags | 8) : (Flags & ~8); - Flags = Moderator ? (Flags | 16) : (Flags & ~16); - Flags = Broadcast ? (Flags | 32) : (Flags & ~32); - Flags = Verified ? (Flags | 128) : (Flags & ~128); - Flags = Megagroup ? (Flags | 256) : (Flags & ~256); - Flags = Restricted ? (Flags | 512) : (Flags & ~512); - Flags = Democracy ? (Flags | 1024) : (Flags & ~1024); - Flags = Signatures ? (Flags | 2048) : (Flags & ~2048); - Flags = Min ? (Flags | 4096) : (Flags & ~4096); - Flags = AccessHash != null ? (Flags | 8192) : (Flags & ~8192); - Flags = Username != null ? (Flags | 64) : (Flags & ~64); - Flags = RestrictionReason != null ? (Flags | 512) : (Flags & ~512); } @@ -66,17 +54,17 @@ namespace TeleSharp.TL { Flags = br.ReadInt32(); Creator = (Flags & 1) != 0; - Kicked = (Flags & 2) != 0; Left = (Flags & 4) != 0; - Editor = (Flags & 8) != 0; - Moderator = (Flags & 16) != 0; Broadcast = (Flags & 32) != 0; Verified = (Flags & 128) != 0; Megagroup = (Flags & 256) != 0; Restricted = (Flags & 512) != 0; - Democracy = (Flags & 1024) != 0; Signatures = (Flags & 2048) != 0; Min = (Flags & 4096) != 0; + Scam = (Flags & 524288) != 0; + HasLink = (Flags & 1048576) != 0; + HasGeo = (Flags & 2097152) != 0; + SlowmodeEnabled = (Flags & 4194304) != 0; Id = br.ReadInt32(); if ((Flags & 8192) != 0) AccessHash = br.ReadInt64(); @@ -93,17 +81,36 @@ namespace TeleSharp.TL Date = br.ReadInt32(); Version = br.ReadInt32(); if ((Flags & 512) != 0) - RestrictionReason = StringUtil.Deserialize(br); + RestrictionReason = (TLVector)ObjectUtils.DeserializeVector(br); else RestrictionReason = null; + if ((Flags & 16384) != 0) + AdminRights = (TLChatAdminRights)ObjectUtils.DeserializeObject(br); + else + AdminRights = null; + + if ((Flags & 32768) != 0) + BannedRights = (TLChatBannedRights)ObjectUtils.DeserializeObject(br); + else + BannedRights = null; + + if ((Flags & 262144) != 0) + DefaultBannedRights = (TLChatBannedRights)ObjectUtils.DeserializeObject(br); + else + DefaultBannedRights = null; + + if ((Flags & 131072) != 0) + ParticipantsCount = br.ReadInt32(); + else + ParticipantsCount = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); @@ -127,7 +134,15 @@ namespace TeleSharp.TL bw.Write(Date); bw.Write(Version); if ((Flags & 512) != 0) - StringUtil.Serialize(RestrictionReason, bw); + ObjectUtils.SerializeObject(RestrictionReason, bw); + if ((Flags & 16384) != 0) + ObjectUtils.SerializeObject(AdminRights, bw); + if ((Flags & 32768) != 0) + ObjectUtils.SerializeObject(BannedRights, bw); + if ((Flags & 262144) != 0) + ObjectUtils.SerializeObject(DefaultBannedRights, bw); + if ((Flags & 131072) != 0) + bw.Write(ParticipantsCount.Value); } } diff --git a/src/TeleSharp.TL/TL/TLChannelParticipantEditor.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEvent.cs similarity index 64% rename from src/TeleSharp.TL/TL/TLChannelParticipantEditor.cs rename to src/TeleSharp.TL/TL/TLChannelAdminLogEvent.cs index 5c0f9a1..1266310 100644 --- a/src/TeleSharp.TL/TL/TLChannelParticipantEditor.cs +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEvent.cs @@ -7,20 +7,21 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1743180447)] - public class TLChannelParticipantEditor : TLAbsChannelParticipant + [TLObject(995769920)] + public class TLChannelAdminLogEvent : TLObject { public override int Constructor { get { - return -1743180447; + return 995769920; } } - public int UserId { get; set; } - public int InviterId { get; set; } + public long Id { get; set; } public int Date { get; set; } + public int UserId { get; set; } + public TLAbsChannelAdminLogEventAction Action { get; set; } public void ComputeFlags() @@ -30,18 +31,20 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { - UserId = br.ReadInt32(); - InviterId = br.ReadInt32(); + Id = br.ReadInt64(); Date = br.ReadInt32(); + UserId = br.ReadInt32(); + Action = (TLAbsChannelAdminLogEventAction)ObjectUtils.DeserializeObject(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - bw.Write(UserId); - bw.Write(InviterId); + bw.Write(Id); bw.Write(Date); + bw.Write(UserId); + ObjectUtils.SerializeObject(Action, bw); } } diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeAbout.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeAbout.cs new file mode 100644 index 0000000..0d2c7b8 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeAbout.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1427671598)] + public class TLChannelAdminLogEventActionChangeAbout : TLAbsChannelAdminLogEventAction + { + public override int Constructor + { + get + { + return 1427671598; + } + } + + public string PrevValue { get; set; } + public string NewValue { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + PrevValue = StringUtil.Deserialize(br); + NewValue = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(PrevValue, bw); + StringUtil.Serialize(NewValue, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeLinkedChat.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeLinkedChat.cs new file mode 100644 index 0000000..5af03ba --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeLinkedChat.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1569748965)] + public class TLChannelAdminLogEventActionChangeLinkedChat : TLAbsChannelAdminLogEventAction + { + public override int Constructor + { + get + { + return -1569748965; + } + } + + public int PrevValue { get; set; } + public int NewValue { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + PrevValue = br.ReadInt32(); + NewValue = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(PrevValue); + bw.Write(NewValue); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeLocation.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeLocation.cs new file mode 100644 index 0000000..8feb595 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeLocation.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(241923758)] + public class TLChannelAdminLogEventActionChangeLocation : TLAbsChannelAdminLogEventAction + { + public override int Constructor + { + get + { + return 241923758; + } + } + + public TLAbsChannelLocation PrevValue { get; set; } + public TLAbsChannelLocation NewValue { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + PrevValue = (TLAbsChannelLocation)ObjectUtils.DeserializeObject(br); + NewValue = (TLAbsChannelLocation)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(PrevValue, bw); + ObjectUtils.SerializeObject(NewValue, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangePhoto.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangePhoto.cs new file mode 100644 index 0000000..0655d57 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangePhoto.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1129042607)] + public class TLChannelAdminLogEventActionChangePhoto : TLAbsChannelAdminLogEventAction + { + public override int Constructor + { + get + { + return 1129042607; + } + } + + public TLAbsPhoto PrevPhoto { get; set; } + public TLAbsPhoto NewPhoto { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + PrevPhoto = (TLAbsPhoto)ObjectUtils.DeserializeObject(br); + NewPhoto = (TLAbsPhoto)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(PrevPhoto, bw); + ObjectUtils.SerializeObject(NewPhoto, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeStickerSet.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeStickerSet.cs new file mode 100644 index 0000000..ed283f0 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeStickerSet.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1312568665)] + public class TLChannelAdminLogEventActionChangeStickerSet : TLAbsChannelAdminLogEventAction + { + public override int Constructor + { + get + { + return -1312568665; + } + } + + public TLAbsInputStickerSet PrevStickerset { get; set; } + public TLAbsInputStickerSet NewStickerset { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + PrevStickerset = (TLAbsInputStickerSet)ObjectUtils.DeserializeObject(br); + NewStickerset = (TLAbsInputStickerSet)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(PrevStickerset, bw); + ObjectUtils.SerializeObject(NewStickerset, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeTitle.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeTitle.cs new file mode 100644 index 0000000..9ac2fe1 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeTitle.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-421545947)] + public class TLChannelAdminLogEventActionChangeTitle : TLAbsChannelAdminLogEventAction + { + public override int Constructor + { + get + { + return -421545947; + } + } + + public string PrevValue { get; set; } + public string NewValue { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + PrevValue = StringUtil.Deserialize(br); + NewValue = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(PrevValue, bw); + StringUtil.Serialize(NewValue, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeUsername.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeUsername.cs new file mode 100644 index 0000000..4106315 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionChangeUsername.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1783299128)] + public class TLChannelAdminLogEventActionChangeUsername : TLAbsChannelAdminLogEventAction + { + public override int Constructor + { + get + { + return 1783299128; + } + } + + public string PrevValue { get; set; } + public string NewValue { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + PrevValue = StringUtil.Deserialize(br); + NewValue = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(PrevValue, bw); + StringUtil.Serialize(NewValue, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionDefaultBannedRights.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionDefaultBannedRights.cs new file mode 100644 index 0000000..f004f30 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionDefaultBannedRights.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(771095562)] + public class TLChannelAdminLogEventActionDefaultBannedRights : TLAbsChannelAdminLogEventAction + { + public override int Constructor + { + get + { + return 771095562; + } + } + + public TLChatBannedRights PrevBannedRights { get; set; } + public TLChatBannedRights NewBannedRights { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + PrevBannedRights = (TLChatBannedRights)ObjectUtils.DeserializeObject(br); + NewBannedRights = (TLChatBannedRights)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(PrevBannedRights, bw); + ObjectUtils.SerializeObject(NewBannedRights, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionDeleteMessage.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionDeleteMessage.cs new file mode 100644 index 0000000..87fa585 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionDeleteMessage.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1121994683)] + public class TLChannelAdminLogEventActionDeleteMessage : TLAbsChannelAdminLogEventAction + { + public override int Constructor + { + get + { + return 1121994683; + } + } + + public TLAbsMessage Message { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Message = (TLAbsMessage)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Message, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionEditMessage.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionEditMessage.cs new file mode 100644 index 0000000..d13dbd3 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionEditMessage.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1889215493)] + public class TLChannelAdminLogEventActionEditMessage : TLAbsChannelAdminLogEventAction + { + public override int Constructor + { + get + { + return 1889215493; + } + } + + public TLAbsMessage PrevMessage { get; set; } + public TLAbsMessage NewMessage { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + PrevMessage = (TLAbsMessage)ObjectUtils.DeserializeObject(br); + NewMessage = (TLAbsMessage)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(PrevMessage, bw); + ObjectUtils.SerializeObject(NewMessage, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionParticipantInvite.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionParticipantInvite.cs new file mode 100644 index 0000000..417235c --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionParticipantInvite.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-484690728)] + public class TLChannelAdminLogEventActionParticipantInvite : TLAbsChannelAdminLogEventAction + { + public override int Constructor + { + get + { + return -484690728; + } + } + + public TLAbsChannelParticipant Participant { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Participant = (TLAbsChannelParticipant)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Participant, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionParticipantJoin.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionParticipantJoin.cs new file mode 100644 index 0000000..9250c0f --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionParticipantJoin.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(405815507)] + public class TLChannelAdminLogEventActionParticipantJoin : TLAbsChannelAdminLogEventAction + { + public override int Constructor + { + get + { + return 405815507; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionParticipantLeave.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionParticipantLeave.cs new file mode 100644 index 0000000..a68e7f0 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionParticipantLeave.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-124291086)] + public class TLChannelAdminLogEventActionParticipantLeave : TLAbsChannelAdminLogEventAction + { + public override int Constructor + { + get + { + return -124291086; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionParticipantToggleAdmin.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionParticipantToggleAdmin.cs new file mode 100644 index 0000000..8dd4f29 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionParticipantToggleAdmin.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-714643696)] + public class TLChannelAdminLogEventActionParticipantToggleAdmin : TLAbsChannelAdminLogEventAction + { + public override int Constructor + { + get + { + return -714643696; + } + } + + public TLAbsChannelParticipant PrevParticipant { get; set; } + public TLAbsChannelParticipant NewParticipant { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + PrevParticipant = (TLAbsChannelParticipant)ObjectUtils.DeserializeObject(br); + NewParticipant = (TLAbsChannelParticipant)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(PrevParticipant, bw); + ObjectUtils.SerializeObject(NewParticipant, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionParticipantToggleBan.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionParticipantToggleBan.cs new file mode 100644 index 0000000..892f3df --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionParticipantToggleBan.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-422036098)] + public class TLChannelAdminLogEventActionParticipantToggleBan : TLAbsChannelAdminLogEventAction + { + public override int Constructor + { + get + { + return -422036098; + } + } + + public TLAbsChannelParticipant PrevParticipant { get; set; } + public TLAbsChannelParticipant NewParticipant { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + PrevParticipant = (TLAbsChannelParticipant)ObjectUtils.DeserializeObject(br); + NewParticipant = (TLAbsChannelParticipant)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(PrevParticipant, bw); + ObjectUtils.SerializeObject(NewParticipant, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionStopPoll.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionStopPoll.cs new file mode 100644 index 0000000..856784b --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionStopPoll.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1895328189)] + public class TLChannelAdminLogEventActionStopPoll : TLAbsChannelAdminLogEventAction + { + public override int Constructor + { + get + { + return -1895328189; + } + } + + public TLAbsMessage Message { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Message = (TLAbsMessage)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Message, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionToggleInvites.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionToggleInvites.cs new file mode 100644 index 0000000..3d7b075 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionToggleInvites.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(460916654)] + public class TLChannelAdminLogEventActionToggleInvites : TLAbsChannelAdminLogEventAction + { + public override int Constructor + { + get + { + return 460916654; + } + } + + public bool NewValue { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + NewValue = BoolUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + BoolUtil.Serialize(NewValue, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionTogglePreHistoryHidden.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionTogglePreHistoryHidden.cs new file mode 100644 index 0000000..05a7ce6 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionTogglePreHistoryHidden.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1599903217)] + public class TLChannelAdminLogEventActionTogglePreHistoryHidden : TLAbsChannelAdminLogEventAction + { + public override int Constructor + { + get + { + return 1599903217; + } + } + + public bool NewValue { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + NewValue = BoolUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + BoolUtil.Serialize(NewValue, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionToggleSignatures.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionToggleSignatures.cs new file mode 100644 index 0000000..dec1579 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionToggleSignatures.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(648939889)] + public class TLChannelAdminLogEventActionToggleSignatures : TLAbsChannelAdminLogEventAction + { + public override int Constructor + { + get + { + return 648939889; + } + } + + public bool NewValue { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + NewValue = BoolUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + BoolUtil.Serialize(NewValue, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionToggleSlowMode.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionToggleSlowMode.cs new file mode 100644 index 0000000..6ff7e8f --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionToggleSlowMode.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1401984889)] + public class TLChannelAdminLogEventActionToggleSlowMode : TLAbsChannelAdminLogEventAction + { + public override int Constructor + { + get + { + return 1401984889; + } + } + + public int PrevValue { get; set; } + public int NewValue { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + PrevValue = br.ReadInt32(); + NewValue = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(PrevValue); + bw.Write(NewValue); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionUpdatePinned.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionUpdatePinned.cs new file mode 100644 index 0000000..44a5840 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventActionUpdatePinned.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-370660328)] + public class TLChannelAdminLogEventActionUpdatePinned : TLAbsChannelAdminLogEventAction + { + public override int Constructor + { + get + { + return -370660328; + } + } + + public TLAbsMessage Message { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Message = (TLAbsMessage)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Message, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelAdminLogEventsFilter.cs b/src/TeleSharp.TL/TL/TLChannelAdminLogEventsFilter.cs new file mode 100644 index 0000000..db6b0b5 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelAdminLogEventsFilter.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-368018716)] + public class TLChannelAdminLogEventsFilter : TLObject + { + public override int Constructor + { + get + { + return -368018716; + } + } + + public int Flags { get; set; } + public bool Join { get; set; } + public bool Leave { get; set; } + public bool Invite { get; set; } + public bool Ban { get; set; } + public bool Unban { get; set; } + public bool Kick { get; set; } + public bool Unkick { get; set; } + public bool Promote { get; set; } + public bool Demote { get; set; } + public bool Info { get; set; } + public bool Settings { get; set; } + public bool Pinned { get; set; } + public bool Edit { get; set; } + public bool Delete { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Join = (Flags & 1) != 0; + Leave = (Flags & 2) != 0; + Invite = (Flags & 4) != 0; + Ban = (Flags & 8) != 0; + Unban = (Flags & 16) != 0; + Kick = (Flags & 32) != 0; + Unkick = (Flags & 64) != 0; + Promote = (Flags & 128) != 0; + Demote = (Flags & 256) != 0; + Info = (Flags & 512) != 0; + Settings = (Flags & 1024) != 0; + Pinned = (Flags & 2048) != 0; + Edit = (Flags & 4096) != 0; + Delete = (Flags & 8192) != 0; + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + + + + + + + + + + + + + + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelForbidden.cs b/src/TeleSharp.TL/TL/TLChannelForbidden.cs index 743b4dc..3576fa2 100644 --- a/src/TeleSharp.TL/TL/TLChannelForbidden.cs +++ b/src/TeleSharp.TL/TL/TLChannelForbidden.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-2059962289)] + [TLObject(681420594)] public class TLChannelForbidden : TLAbsChat { public override int Constructor { get { - return -2059962289; + return 681420594; } } @@ -24,13 +24,11 @@ namespace TeleSharp.TL public int Id { get; set; } public long AccessHash { get; set; } public string Title { get; set; } + public int? UntilDate { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Broadcast ? (Flags | 32) : (Flags & ~32); - Flags = Megagroup ? (Flags | 256) : (Flags & ~256); } @@ -42,19 +40,25 @@ namespace TeleSharp.TL Id = br.ReadInt32(); AccessHash = br.ReadInt64(); Title = StringUtil.Deserialize(br); + if ((Flags & 65536) != 0) + UntilDate = br.ReadInt32(); + else + UntilDate = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(Id); bw.Write(AccessHash); StringUtil.Serialize(Title, bw); + if ((Flags & 65536) != 0) + bw.Write(UntilDate.Value); } } diff --git a/src/TeleSharp.TL/TL/TLChannelFull.cs b/src/TeleSharp.TL/TL/TLChannelFull.cs index 319eed0..f4133f6 100644 --- a/src/TeleSharp.TL/TL/TLChannelFull.cs +++ b/src/TeleSharp.TL/TL/TLChannelFull.cs @@ -7,48 +7,54 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1009430225)] + [TLObject(763976820)] public class TLChannelFull : TLAbsChatFull { public override int Constructor { get { - return -1009430225; + return 763976820; } } public int Flags { get; set; } public bool CanViewParticipants { get; set; } public bool CanSetUsername { get; set; } + public bool CanSetStickers { get; set; } + public bool HiddenPrehistory { get; set; } + public bool CanViewStats { get; set; } + public bool CanSetLocation { get; set; } + public bool HasScheduled { get; set; } public int Id { get; set; } public string About { get; set; } public int? ParticipantsCount { get; set; } public int? AdminsCount { get; set; } public int? KickedCount { get; set; } + public int? BannedCount { get; set; } + public int? OnlineCount { get; set; } public int ReadInboxMaxId { get; set; } public int ReadOutboxMaxId { get; set; } public int UnreadCount { get; set; } public TLAbsPhoto ChatPhoto { get; set; } - public TLAbsPeerNotifySettings NotifySettings { get; set; } + public TLPeerNotifySettings NotifySettings { get; set; } public TLAbsExportedChatInvite ExportedInvite { get; set; } public TLVector BotInfo { get; set; } public int? MigratedFromChatId { get; set; } public int? MigratedFromMaxId { get; set; } public int? PinnedMsgId { get; set; } + public TLStickerSet Stickerset { get; set; } + public int? AvailableMinId { get; set; } + public int? FolderId { get; set; } + public int? LinkedChatId { get; set; } + public TLAbsChannelLocation Location { get; set; } + public int? SlowmodeSeconds { get; set; } + public int? SlowmodeNextSendDate { get; set; } + public int Pts { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = CanViewParticipants ? (Flags | 8) : (Flags & ~8); - Flags = CanSetUsername ? (Flags | 64) : (Flags & ~64); - Flags = ParticipantsCount != null ? (Flags | 1) : (Flags & ~1); - Flags = AdminsCount != null ? (Flags | 2) : (Flags & ~2); - Flags = KickedCount != null ? (Flags | 4) : (Flags & ~4); - Flags = MigratedFromChatId != null ? (Flags | 16) : (Flags & ~16); - Flags = MigratedFromMaxId != null ? (Flags | 16) : (Flags & ~16); - Flags = PinnedMsgId != null ? (Flags | 32) : (Flags & ~32); } @@ -57,6 +63,11 @@ namespace TeleSharp.TL Flags = br.ReadInt32(); CanViewParticipants = (Flags & 8) != 0; CanSetUsername = (Flags & 64) != 0; + CanSetStickers = (Flags & 128) != 0; + HiddenPrehistory = (Flags & 1024) != 0; + CanViewStats = (Flags & 4096) != 0; + CanSetLocation = (Flags & 65536) != 0; + HasScheduled = (Flags & 524288) != 0; Id = br.ReadInt32(); About = StringUtil.Deserialize(br); if ((Flags & 1) != 0) @@ -74,11 +85,21 @@ namespace TeleSharp.TL else KickedCount = null; + if ((Flags & 4) != 0) + BannedCount = br.ReadInt32(); + else + BannedCount = null; + + if ((Flags & 8192) != 0) + OnlineCount = br.ReadInt32(); + else + OnlineCount = null; + ReadInboxMaxId = br.ReadInt32(); ReadOutboxMaxId = br.ReadInt32(); UnreadCount = br.ReadInt32(); ChatPhoto = (TLAbsPhoto)ObjectUtils.DeserializeObject(br); - NotifySettings = (TLAbsPeerNotifySettings)ObjectUtils.DeserializeObject(br); + NotifySettings = (TLPeerNotifySettings)ObjectUtils.DeserializeObject(br); ExportedInvite = (TLAbsExportedChatInvite)ObjectUtils.DeserializeObject(br); BotInfo = (TLVector)ObjectUtils.DeserializeVector(br); if ((Flags & 16) != 0) @@ -96,16 +117,56 @@ namespace TeleSharp.TL else PinnedMsgId = null; + if ((Flags & 256) != 0) + Stickerset = (TLStickerSet)ObjectUtils.DeserializeObject(br); + else + Stickerset = null; + + if ((Flags & 512) != 0) + AvailableMinId = br.ReadInt32(); + else + AvailableMinId = null; + + if ((Flags & 2048) != 0) + FolderId = br.ReadInt32(); + else + FolderId = null; + + if ((Flags & 16384) != 0) + LinkedChatId = br.ReadInt32(); + else + LinkedChatId = null; + + if ((Flags & 32768) != 0) + Location = (TLAbsChannelLocation)ObjectUtils.DeserializeObject(br); + else + Location = null; + + if ((Flags & 131072) != 0) + SlowmodeSeconds = br.ReadInt32(); + else + SlowmodeSeconds = null; + + if ((Flags & 262144) != 0) + SlowmodeNextSendDate = br.ReadInt32(); + else + SlowmodeNextSendDate = null; + + Pts = br.ReadInt32(); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + + + + + bw.Write(Id); StringUtil.Serialize(About, bw); if ((Flags & 1) != 0) @@ -114,6 +175,10 @@ namespace TeleSharp.TL bw.Write(AdminsCount.Value); if ((Flags & 4) != 0) bw.Write(KickedCount.Value); + if ((Flags & 4) != 0) + bw.Write(BannedCount.Value); + if ((Flags & 8192) != 0) + bw.Write(OnlineCount.Value); bw.Write(ReadInboxMaxId); bw.Write(ReadOutboxMaxId); bw.Write(UnreadCount); @@ -127,6 +192,21 @@ namespace TeleSharp.TL bw.Write(MigratedFromMaxId.Value); if ((Flags & 32) != 0) bw.Write(PinnedMsgId.Value); + if ((Flags & 256) != 0) + ObjectUtils.SerializeObject(Stickerset, bw); + if ((Flags & 512) != 0) + bw.Write(AvailableMinId.Value); + if ((Flags & 2048) != 0) + bw.Write(FolderId.Value); + if ((Flags & 16384) != 0) + bw.Write(LinkedChatId.Value); + if ((Flags & 32768) != 0) + ObjectUtils.SerializeObject(Location, bw); + if ((Flags & 131072) != 0) + bw.Write(SlowmodeSeconds.Value); + if ((Flags & 262144) != 0) + bw.Write(SlowmodeNextSendDate.Value); + bw.Write(Pts); } } diff --git a/src/TeleSharp.TL/TL/TLChannelLocation.cs b/src/TeleSharp.TL/TL/TLChannelLocation.cs new file mode 100644 index 0000000..0fafbbe --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelLocation.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(547062491)] + public class TLChannelLocation : TLAbsChannelLocation + { + public override int Constructor + { + get + { + return 547062491; + } + } + + public TLAbsGeoPoint GeoPoint { get; set; } + public string Address { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + GeoPoint = (TLAbsGeoPoint)ObjectUtils.DeserializeObject(br); + Address = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(GeoPoint, bw); + StringUtil.Serialize(Address, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelLocationEmpty.cs b/src/TeleSharp.TL/TL/TLChannelLocationEmpty.cs new file mode 100644 index 0000000..8db372f --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelLocationEmpty.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1078612597)] + public class TLChannelLocationEmpty : TLAbsChannelLocation + { + public override int Constructor + { + get + { + return -1078612597; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelMessagesFilter.cs b/src/TeleSharp.TL/TL/TLChannelMessagesFilter.cs index c07bc3a..dce851d 100644 --- a/src/TeleSharp.TL/TL/TLChannelMessagesFilter.cs +++ b/src/TeleSharp.TL/TL/TLChannelMessagesFilter.cs @@ -25,8 +25,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = ExcludeNewMessages ? (Flags | 2) : (Flags & ~2); } @@ -41,7 +39,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); ObjectUtils.SerializeObject(Ranges, bw); diff --git a/src/TeleSharp.TL/TL/TLChannelParticipantAdmin.cs b/src/TeleSharp.TL/TL/TLChannelParticipantAdmin.cs new file mode 100644 index 0000000..6e5432e --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelParticipantAdmin.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-859915345)] + public class TLChannelParticipantAdmin : TLAbsChannelParticipant + { + public override int Constructor + { + get + { + return -859915345; + } + } + + public int Flags { get; set; } + public bool CanEdit { get; set; } + public bool Self { get; set; } + public int UserId { get; set; } + public int? InviterId { get; set; } + public int PromotedBy { get; set; } + public int Date { get; set; } + public TLChatAdminRights AdminRights { get; set; } + public string Rank { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + CanEdit = (Flags & 1) != 0; + Self = (Flags & 2) != 0; + UserId = br.ReadInt32(); + if ((Flags & 2) != 0) + InviterId = br.ReadInt32(); + else + InviterId = null; + + PromotedBy = br.ReadInt32(); + Date = br.ReadInt32(); + AdminRights = (TLChatAdminRights)ObjectUtils.DeserializeObject(br); + if ((Flags & 4) != 0) + Rank = StringUtil.Deserialize(br); + else + Rank = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + + bw.Write(UserId); + if ((Flags & 2) != 0) + bw.Write(InviterId.Value); + bw.Write(PromotedBy); + bw.Write(Date); + ObjectUtils.SerializeObject(AdminRights, bw); + if ((Flags & 4) != 0) + StringUtil.Serialize(Rank, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelParticipantBanned.cs b/src/TeleSharp.TL/TL/TLChannelParticipantBanned.cs new file mode 100644 index 0000000..1e92016 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelParticipantBanned.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(470789295)] + public class TLChannelParticipantBanned : TLAbsChannelParticipant + { + public override int Constructor + { + get + { + return 470789295; + } + } + + public int Flags { get; set; } + public bool Left { get; set; } + public int UserId { get; set; } + public int KickedBy { get; set; } + public int Date { get; set; } + public TLChatBannedRights BannedRights { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Left = (Flags & 1) != 0; + UserId = br.ReadInt32(); + KickedBy = br.ReadInt32(); + Date = br.ReadInt32(); + BannedRights = (TLChatBannedRights)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + bw.Write(UserId); + bw.Write(KickedBy); + bw.Write(Date); + ObjectUtils.SerializeObject(BannedRights, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelParticipantCreator.cs b/src/TeleSharp.TL/TL/TLChannelParticipantCreator.cs index a96c852..8708ded 100644 --- a/src/TeleSharp.TL/TL/TLChannelParticipantCreator.cs +++ b/src/TeleSharp.TL/TL/TLChannelParticipantCreator.cs @@ -7,18 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-471670279)] + [TLObject(-2138237532)] public class TLChannelParticipantCreator : TLAbsChannelParticipant { public override int Constructor { get { - return -471670279; + return -2138237532; } } + public int Flags { get; set; } public int UserId { get; set; } + public string Rank { get; set; } public void ComputeFlags() @@ -28,14 +30,23 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); UserId = br.ReadInt32(); + if ((Flags & 1) != 0) + Rank = StringUtil.Deserialize(br); + else + Rank = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); bw.Write(UserId); + if ((Flags & 1) != 0) + StringUtil.Serialize(Rank, bw); } } diff --git a/src/TeleSharp.TL/TL/TLChannelParticipantsBanned.cs b/src/TeleSharp.TL/TL/TLChannelParticipantsBanned.cs new file mode 100644 index 0000000..7a98a9e --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelParticipantsBanned.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(338142689)] + public class TLChannelParticipantsBanned : TLAbsChannelParticipantsFilter + { + public override int Constructor + { + get + { + return 338142689; + } + } + + public string Q { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Q = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Q, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelParticipantsContacts.cs b/src/TeleSharp.TL/TL/TLChannelParticipantsContacts.cs new file mode 100644 index 0000000..d968059 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelParticipantsContacts.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1150621555)] + public class TLChannelParticipantsContacts : TLAbsChannelParticipantsFilter + { + public override int Constructor + { + get + { + return -1150621555; + } + } + + public string Q { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Q = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Q, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelParticipantsKicked.cs b/src/TeleSharp.TL/TL/TLChannelParticipantsKicked.cs index 5aa217d..b381aec 100644 --- a/src/TeleSharp.TL/TL/TLChannelParticipantsKicked.cs +++ b/src/TeleSharp.TL/TL/TLChannelParticipantsKicked.cs @@ -7,17 +7,18 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(1010285434)] + [TLObject(-1548400251)] public class TLChannelParticipantsKicked : TLAbsChannelParticipantsFilter { public override int Constructor { get { - return 1010285434; + return -1548400251; } } + public string Q { get; set; } public void ComputeFlags() @@ -27,12 +28,14 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { + Q = StringUtil.Deserialize(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + StringUtil.Serialize(Q, bw); } } diff --git a/src/TeleSharp.TL/TL/TLChannelParticipantsSearch.cs b/src/TeleSharp.TL/TL/TLChannelParticipantsSearch.cs new file mode 100644 index 0000000..4184c47 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChannelParticipantsSearch.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(106343499)] + public class TLChannelParticipantsSearch : TLAbsChannelParticipantsFilter + { + public override int Constructor + { + get + { + return 106343499; + } + } + + public string Q { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Q = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Q, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChat.cs b/src/TeleSharp.TL/TL/TLChat.cs index 1280a83..ca6ddfa 100644 --- a/src/TeleSharp.TL/TL/TLChat.cs +++ b/src/TeleSharp.TL/TL/TLChat.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-652419756)] + [TLObject(1004149726)] public class TLChat : TLAbsChat { public override int Constructor { get { - return -652419756; + return 1004149726; } } @@ -22,8 +22,6 @@ namespace TeleSharp.TL public bool Creator { get; set; } public bool Kicked { get; set; } public bool Left { get; set; } - public bool AdminsEnabled { get; set; } - public bool Admin { get; set; } public bool Deactivated { get; set; } public int Id { get; set; } public string Title { get; set; } @@ -32,18 +30,12 @@ namespace TeleSharp.TL public int Date { get; set; } public int Version { get; set; } public TLAbsInputChannel MigratedTo { get; set; } + public TLChatAdminRights AdminRights { get; set; } + public TLChatBannedRights DefaultBannedRights { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Creator ? (Flags | 1) : (Flags & ~1); - Flags = Kicked ? (Flags | 2) : (Flags & ~2); - Flags = Left ? (Flags | 4) : (Flags & ~4); - Flags = AdminsEnabled ? (Flags | 8) : (Flags & ~8); - Flags = Admin ? (Flags | 16) : (Flags & ~16); - Flags = Deactivated ? (Flags | 32) : (Flags & ~32); - Flags = MigratedTo != null ? (Flags | 64) : (Flags & ~64); } @@ -53,8 +45,6 @@ namespace TeleSharp.TL Creator = (Flags & 1) != 0; Kicked = (Flags & 2) != 0; Left = (Flags & 4) != 0; - AdminsEnabled = (Flags & 8) != 0; - Admin = (Flags & 16) != 0; Deactivated = (Flags & 32) != 0; Id = br.ReadInt32(); Title = StringUtil.Deserialize(br); @@ -67,20 +57,27 @@ namespace TeleSharp.TL else MigratedTo = null; + if ((Flags & 16384) != 0) + AdminRights = (TLChatAdminRights)ObjectUtils.DeserializeObject(br); + else + AdminRights = null; + + if ((Flags & 262144) != 0) + DefaultBannedRights = (TLChatBannedRights)ObjectUtils.DeserializeObject(br); + else + DefaultBannedRights = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); - - bw.Write(Id); StringUtil.Serialize(Title, bw); ObjectUtils.SerializeObject(Photo, bw); @@ -89,6 +86,10 @@ namespace TeleSharp.TL bw.Write(Version); if ((Flags & 64) != 0) ObjectUtils.SerializeObject(MigratedTo, bw); + if ((Flags & 16384) != 0) + ObjectUtils.SerializeObject(AdminRights, bw); + if ((Flags & 262144) != 0) + ObjectUtils.SerializeObject(DefaultBannedRights, bw); } } diff --git a/src/TeleSharp.TL/TL/TLChatAdminRights.cs b/src/TeleSharp.TL/TL/TLChatAdminRights.cs new file mode 100644 index 0000000..0e9cd2f --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChatAdminRights.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1605510357)] + public class TLChatAdminRights : TLObject + { + public override int Constructor + { + get + { + return 1605510357; + } + } + + public int Flags { get; set; } + public bool ChangeInfo { get; set; } + public bool PostMessages { get; set; } + public bool EditMessages { get; set; } + public bool DeleteMessages { get; set; } + public bool BanUsers { get; set; } + public bool InviteUsers { get; set; } + public bool PinMessages { get; set; } + public bool AddAdmins { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + ChangeInfo = (Flags & 1) != 0; + PostMessages = (Flags & 2) != 0; + EditMessages = (Flags & 4) != 0; + DeleteMessages = (Flags & 8) != 0; + BanUsers = (Flags & 16) != 0; + InviteUsers = (Flags & 32) != 0; + PinMessages = (Flags & 128) != 0; + AddAdmins = (Flags & 512) != 0; + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + + + + + + + + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChatBannedRights.cs b/src/TeleSharp.TL/TL/TLChatBannedRights.cs new file mode 100644 index 0000000..44d3d15 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChatBannedRights.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1626209256)] + public class TLChatBannedRights : TLObject + { + public override int Constructor + { + get + { + return -1626209256; + } + } + + public int Flags { get; set; } + public bool ViewMessages { get; set; } + public bool SendMessages { get; set; } + public bool SendMedia { get; set; } + public bool SendStickers { get; set; } + public bool SendGifs { get; set; } + public bool SendGames { get; set; } + public bool SendInline { get; set; } + public bool EmbedLinks { get; set; } + public bool SendPolls { get; set; } + public bool ChangeInfo { get; set; } + public bool InviteUsers { get; set; } + public bool PinMessages { get; set; } + public int UntilDate { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + ViewMessages = (Flags & 1) != 0; + SendMessages = (Flags & 2) != 0; + SendMedia = (Flags & 4) != 0; + SendStickers = (Flags & 8) != 0; + SendGifs = (Flags & 16) != 0; + SendGames = (Flags & 32) != 0; + SendInline = (Flags & 64) != 0; + EmbedLinks = (Flags & 128) != 0; + SendPolls = (Flags & 256) != 0; + ChangeInfo = (Flags & 1024) != 0; + InviteUsers = (Flags & 32768) != 0; + PinMessages = (Flags & 131072) != 0; + UntilDate = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + + + + + + + + + + + + bw.Write(UntilDate); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChatFull.cs b/src/TeleSharp.TL/TL/TLChatFull.cs index c948f70..06da4c6 100644 --- a/src/TeleSharp.TL/TL/TLChatFull.cs +++ b/src/TeleSharp.TL/TL/TLChatFull.cs @@ -7,23 +7,29 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(771925524)] + [TLObject(461151667)] public class TLChatFull : TLAbsChatFull { public override int Constructor { get { - return 771925524; + return 461151667; } } + public int Flags { get; set; } + public bool CanSetUsername { get; set; } + public bool HasScheduled { get; set; } public int Id { get; set; } + public string About { get; set; } public TLAbsChatParticipants Participants { get; set; } public TLAbsPhoto ChatPhoto { get; set; } - public TLAbsPeerNotifySettings NotifySettings { get; set; } + public TLPeerNotifySettings NotifySettings { get; set; } public TLAbsExportedChatInvite ExportedInvite { get; set; } public TLVector BotInfo { get; set; } + public int? PinnedMsgId { get; set; } + public int? FolderId { get; set; } public void ComputeFlags() @@ -33,24 +39,56 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); + CanSetUsername = (Flags & 128) != 0; + HasScheduled = (Flags & 256) != 0; Id = br.ReadInt32(); + About = StringUtil.Deserialize(br); Participants = (TLAbsChatParticipants)ObjectUtils.DeserializeObject(br); - ChatPhoto = (TLAbsPhoto)ObjectUtils.DeserializeObject(br); - NotifySettings = (TLAbsPeerNotifySettings)ObjectUtils.DeserializeObject(br); + if ((Flags & 4) != 0) + ChatPhoto = (TLAbsPhoto)ObjectUtils.DeserializeObject(br); + else + ChatPhoto = null; + + NotifySettings = (TLPeerNotifySettings)ObjectUtils.DeserializeObject(br); ExportedInvite = (TLAbsExportedChatInvite)ObjectUtils.DeserializeObject(br); - BotInfo = (TLVector)ObjectUtils.DeserializeVector(br); + if ((Flags & 8) != 0) + BotInfo = (TLVector)ObjectUtils.DeserializeVector(br); + else + BotInfo = null; + + if ((Flags & 64) != 0) + PinnedMsgId = br.ReadInt32(); + else + PinnedMsgId = null; + + if ((Flags & 2048) != 0) + FolderId = br.ReadInt32(); + else + FolderId = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); + + bw.Write(Id); + StringUtil.Serialize(About, bw); ObjectUtils.SerializeObject(Participants, bw); - ObjectUtils.SerializeObject(ChatPhoto, bw); + if ((Flags & 4) != 0) + ObjectUtils.SerializeObject(ChatPhoto, bw); ObjectUtils.SerializeObject(NotifySettings, bw); ObjectUtils.SerializeObject(ExportedInvite, bw); - ObjectUtils.SerializeObject(BotInfo, bw); + if ((Flags & 8) != 0) + ObjectUtils.SerializeObject(BotInfo, bw); + if ((Flags & 64) != 0) + bw.Write(PinnedMsgId.Value); + if ((Flags & 2048) != 0) + bw.Write(FolderId.Value); } } diff --git a/src/TeleSharp.TL/TL/TLChatInvite.cs b/src/TeleSharp.TL/TL/TLChatInvite.cs index b36a4ce..e473bf8 100644 --- a/src/TeleSharp.TL/TL/TLChatInvite.cs +++ b/src/TeleSharp.TL/TL/TLChatInvite.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-613092008)] + [TLObject(-540871282)] public class TLChatInvite : TLAbsChatInvite { public override int Constructor { get { - return -613092008; + return -540871282; } } @@ -24,19 +24,13 @@ namespace TeleSharp.TL public bool Public { get; set; } public bool Megagroup { get; set; } public string Title { get; set; } - public TLAbsChatPhoto Photo { get; set; } + public TLAbsPhoto Photo { get; set; } public int ParticipantsCount { get; set; } public TLVector Participants { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Channel ? (Flags | 1) : (Flags & ~1); - Flags = Broadcast ? (Flags | 2) : (Flags & ~2); - Flags = Public ? (Flags | 4) : (Flags & ~4); - Flags = Megagroup ? (Flags | 8) : (Flags & ~8); - Flags = Participants != null ? (Flags | 16) : (Flags & ~16); } @@ -48,7 +42,7 @@ namespace TeleSharp.TL Public = (Flags & 4) != 0; Megagroup = (Flags & 8) != 0; Title = StringUtil.Deserialize(br); - Photo = (TLAbsChatPhoto)ObjectUtils.DeserializeObject(br); + Photo = (TLAbsPhoto)ObjectUtils.DeserializeObject(br); ParticipantsCount = br.ReadInt32(); if ((Flags & 16) != 0) Participants = (TLVector)ObjectUtils.DeserializeVector(br); @@ -61,7 +55,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); diff --git a/src/TeleSharp.TL/TL/TLChatOnlines.cs b/src/TeleSharp.TL/TL/TLChatOnlines.cs new file mode 100644 index 0000000..2235782 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLChatOnlines.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-264117680)] + public class TLChatOnlines : TLObject + { + public override int Constructor + { + get + { + return -264117680; + } + } + + public int Onlines { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Onlines = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Onlines); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChatParticipantsForbidden.cs b/src/TeleSharp.TL/TL/TLChatParticipantsForbidden.cs index 3bf68ec..97a5f1f 100644 --- a/src/TeleSharp.TL/TL/TLChatParticipantsForbidden.cs +++ b/src/TeleSharp.TL/TL/TLChatParticipantsForbidden.cs @@ -25,8 +25,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = SelfParticipant != null ? (Flags | 1) : (Flags & ~1); } @@ -45,7 +43,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(ChatId); if ((Flags & 1) != 0) diff --git a/src/TeleSharp.TL/TL/TLChatPhoto.cs b/src/TeleSharp.TL/TL/TLChatPhoto.cs index 03e4c29..ad96f65 100644 --- a/src/TeleSharp.TL/TL/TLChatPhoto.cs +++ b/src/TeleSharp.TL/TL/TLChatPhoto.cs @@ -7,19 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(1632839530)] + [TLObject(1197267925)] public class TLChatPhoto : TLAbsChatPhoto { public override int Constructor { get { - return 1632839530; + return 1197267925; } } - public TLAbsFileLocation PhotoSmall { get; set; } - public TLAbsFileLocation PhotoBig { get; set; } + public TLFileLocationToBeDeprecated PhotoSmall { get; set; } + public TLFileLocationToBeDeprecated PhotoBig { get; set; } + public int DcId { get; set; } public void ComputeFlags() @@ -29,8 +30,9 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { - PhotoSmall = (TLAbsFileLocation)ObjectUtils.DeserializeObject(br); - PhotoBig = (TLAbsFileLocation)ObjectUtils.DeserializeObject(br); + PhotoSmall = (TLFileLocationToBeDeprecated)ObjectUtils.DeserializeObject(br); + PhotoBig = (TLFileLocationToBeDeprecated)ObjectUtils.DeserializeObject(br); + DcId = br.ReadInt32(); } @@ -39,6 +41,7 @@ namespace TeleSharp.TL bw.Write(Constructor); ObjectUtils.SerializeObject(PhotoSmall, bw); ObjectUtils.SerializeObject(PhotoBig, bw); + bw.Write(DcId); } } diff --git a/src/TeleSharp.TL/TL/TLCodeSettings.cs b/src/TeleSharp.TL/TL/TLCodeSettings.cs new file mode 100644 index 0000000..0ee22ad --- /dev/null +++ b/src/TeleSharp.TL/TL/TLCodeSettings.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-557924733)] + public class TLCodeSettings : TLObject + { + public override int Constructor + { + get + { + return -557924733; + } + } + + public int Flags { get; set; } + public bool AllowFlashcall { get; set; } + public bool CurrentNumber { get; set; } + public bool AllowAppHash { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + AllowFlashcall = (Flags & 1) != 0; + CurrentNumber = (Flags & 2) != 0; + AllowAppHash = (Flags & 16) != 0; + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + + + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLConfig.cs b/src/TeleSharp.TL/TL/TLConfig.cs index 3be05d0..afcda7d 100644 --- a/src/TeleSharp.TL/TL/TLConfig.cs +++ b/src/TeleSharp.TL/TL/TLConfig.cs @@ -7,24 +7,31 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-882895228)] + [TLObject(856375399)] public class TLConfig : TLObject { public override int Constructor { get { - return -882895228; + return 856375399; } } public int Flags { get; set; } public bool PhonecallsEnabled { get; set; } + public bool DefaultP2pContacts { get; set; } + public bool PreloadFeaturedStickers { get; set; } + public bool IgnorePhoneEntities { get; set; } + public bool RevokePmInbox { get; set; } + public bool BlockedMode { get; set; } + public bool PfsEnabled { get; set; } public int Date { get; set; } public int Expires { get; set; } public bool TestMode { get; set; } public int ThisDc { get; set; } public TLVector DcOptions { get; set; } + public string DcTxtDomainName { get; set; } public int ChatSizeMax { get; set; } public int MegagroupSizeMax { get; set; } public int ForwardedCountMax { get; set; } @@ -34,28 +41,39 @@ namespace TeleSharp.TL public int OnlineCloudTimeoutMs { get; set; } public int NotifyCloudDelayMs { get; set; } public int NotifyDefaultDelayMs { get; set; } - public int ChatBigSize { get; set; } public int PushChatPeriodMs { get; set; } public int PushChatLimit { get; set; } public int SavedGifsLimit { get; set; } public int EditTimeLimit { get; set; } + public int RevokeTimeLimit { get; set; } + public int RevokePmTimeLimit { get; set; } public int RatingEDecay { get; set; } public int StickersRecentLimit { get; set; } + public int StickersFavedLimit { get; set; } + public int ChannelsReadMediaPeriod { get; set; } public int? TmpSessions { get; set; } public int PinnedDialogsCountMax { get; set; } + public int PinnedInfolderCountMax { get; set; } public int CallReceiveTimeoutMs { get; set; } public int CallRingTimeoutMs { get; set; } public int CallConnectTimeoutMs { get; set; } public int CallPacketTimeoutMs { get; set; } public string MeUrlPrefix { get; set; } - public TLVector DisabledFeatures { get; set; } + public string AutoupdateUrlPrefix { get; set; } + public string GifSearchUsername { get; set; } + public string VenueSearchUsername { get; set; } + public string ImgSearchUsername { get; set; } + public string StaticMapsProvider { get; set; } + public int CaptionLengthMax { get; set; } + public int MessageLengthMax { get; set; } + public int WebfileDcId { get; set; } + public string SuggestedLangCode { get; set; } + public int? LangPackVersion { get; set; } + public int? BaseLangPackVersion { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = PhonecallsEnabled ? (Flags | 2) : (Flags & ~2); - Flags = TmpSessions != null ? (Flags | 1) : (Flags & ~1); } @@ -63,11 +81,18 @@ namespace TeleSharp.TL { Flags = br.ReadInt32(); PhonecallsEnabled = (Flags & 2) != 0; + DefaultP2pContacts = (Flags & 8) != 0; + PreloadFeaturedStickers = (Flags & 16) != 0; + IgnorePhoneEntities = (Flags & 32) != 0; + RevokePmInbox = (Flags & 64) != 0; + BlockedMode = (Flags & 256) != 0; + PfsEnabled = (Flags & 8192) != 0; Date = br.ReadInt32(); Expires = br.ReadInt32(); TestMode = BoolUtil.Deserialize(br); ThisDc = br.ReadInt32(); DcOptions = (TLVector)ObjectUtils.DeserializeVector(br); + DcTxtDomainName = StringUtil.Deserialize(br); ChatSizeMax = br.ReadInt32(); MegagroupSizeMax = br.ReadInt32(); ForwardedCountMax = br.ReadInt32(); @@ -77,39 +102,91 @@ namespace TeleSharp.TL OnlineCloudTimeoutMs = br.ReadInt32(); NotifyCloudDelayMs = br.ReadInt32(); NotifyDefaultDelayMs = br.ReadInt32(); - ChatBigSize = br.ReadInt32(); PushChatPeriodMs = br.ReadInt32(); PushChatLimit = br.ReadInt32(); SavedGifsLimit = br.ReadInt32(); EditTimeLimit = br.ReadInt32(); + RevokeTimeLimit = br.ReadInt32(); + RevokePmTimeLimit = br.ReadInt32(); RatingEDecay = br.ReadInt32(); StickersRecentLimit = br.ReadInt32(); + StickersFavedLimit = br.ReadInt32(); + ChannelsReadMediaPeriod = br.ReadInt32(); if ((Flags & 1) != 0) TmpSessions = br.ReadInt32(); else TmpSessions = null; PinnedDialogsCountMax = br.ReadInt32(); + PinnedInfolderCountMax = br.ReadInt32(); CallReceiveTimeoutMs = br.ReadInt32(); CallRingTimeoutMs = br.ReadInt32(); CallConnectTimeoutMs = br.ReadInt32(); CallPacketTimeoutMs = br.ReadInt32(); MeUrlPrefix = StringUtil.Deserialize(br); - DisabledFeatures = (TLVector)ObjectUtils.DeserializeVector(br); + if ((Flags & 128) != 0) + AutoupdateUrlPrefix = StringUtil.Deserialize(br); + else + AutoupdateUrlPrefix = null; + + if ((Flags & 512) != 0) + GifSearchUsername = StringUtil.Deserialize(br); + else + GifSearchUsername = null; + + if ((Flags & 1024) != 0) + VenueSearchUsername = StringUtil.Deserialize(br); + else + VenueSearchUsername = null; + + if ((Flags & 2048) != 0) + ImgSearchUsername = StringUtil.Deserialize(br); + else + ImgSearchUsername = null; + + if ((Flags & 4096) != 0) + StaticMapsProvider = StringUtil.Deserialize(br); + else + StaticMapsProvider = null; + + CaptionLengthMax = br.ReadInt32(); + MessageLengthMax = br.ReadInt32(); + WebfileDcId = br.ReadInt32(); + if ((Flags & 4) != 0) + SuggestedLangCode = StringUtil.Deserialize(br); + else + SuggestedLangCode = null; + + if ((Flags & 4) != 0) + LangPackVersion = br.ReadInt32(); + else + LangPackVersion = null; + + if ((Flags & 4) != 0) + BaseLangPackVersion = br.ReadInt32(); + else + BaseLangPackVersion = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + + + + + + bw.Write(Date); bw.Write(Expires); BoolUtil.Serialize(TestMode, bw); bw.Write(ThisDc); ObjectUtils.SerializeObject(DcOptions, bw); + StringUtil.Serialize(DcTxtDomainName, bw); bw.Write(ChatSizeMax); bw.Write(MegagroupSizeMax); bw.Write(ForwardedCountMax); @@ -119,22 +196,44 @@ namespace TeleSharp.TL bw.Write(OnlineCloudTimeoutMs); bw.Write(NotifyCloudDelayMs); bw.Write(NotifyDefaultDelayMs); - bw.Write(ChatBigSize); bw.Write(PushChatPeriodMs); bw.Write(PushChatLimit); bw.Write(SavedGifsLimit); bw.Write(EditTimeLimit); + bw.Write(RevokeTimeLimit); + bw.Write(RevokePmTimeLimit); bw.Write(RatingEDecay); bw.Write(StickersRecentLimit); + bw.Write(StickersFavedLimit); + bw.Write(ChannelsReadMediaPeriod); if ((Flags & 1) != 0) bw.Write(TmpSessions.Value); bw.Write(PinnedDialogsCountMax); + bw.Write(PinnedInfolderCountMax); bw.Write(CallReceiveTimeoutMs); bw.Write(CallRingTimeoutMs); bw.Write(CallConnectTimeoutMs); bw.Write(CallPacketTimeoutMs); StringUtil.Serialize(MeUrlPrefix, bw); - ObjectUtils.SerializeObject(DisabledFeatures, bw); + if ((Flags & 128) != 0) + StringUtil.Serialize(AutoupdateUrlPrefix, bw); + if ((Flags & 512) != 0) + StringUtil.Serialize(GifSearchUsername, bw); + if ((Flags & 1024) != 0) + StringUtil.Serialize(VenueSearchUsername, bw); + if ((Flags & 2048) != 0) + StringUtil.Serialize(ImgSearchUsername, bw); + if ((Flags & 4096) != 0) + StringUtil.Serialize(StaticMapsProvider, bw); + bw.Write(CaptionLengthMax); + bw.Write(MessageLengthMax); + bw.Write(WebfileDcId); + if ((Flags & 4) != 0) + StringUtil.Serialize(SuggestedLangCode, bw); + if ((Flags & 4) != 0) + bw.Write(LangPackVersion.Value); + if ((Flags & 4) != 0) + bw.Write(BaseLangPackVersion.Value); } } diff --git a/src/TeleSharp.TL/TL/TLDcOption.cs b/src/TeleSharp.TL/TL/TLDcOption.cs index ebaee23..1440863 100644 --- a/src/TeleSharp.TL/TL/TLDcOption.cs +++ b/src/TeleSharp.TL/TL/TLDcOption.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(98092748)] + [TLObject(414687501)] public class TLDcOption : TLObject { public override int Constructor { get { - return 98092748; + return 414687501; } } @@ -23,18 +23,15 @@ namespace TeleSharp.TL public bool MediaOnly { get; set; } public bool TcpoOnly { get; set; } public bool Cdn { get; set; } + public bool Static { get; set; } public int Id { get; set; } public string IpAddress { get; set; } public int Port { get; set; } + public byte[] Secret { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Ipv6 ? (Flags | 1) : (Flags & ~1); - Flags = MediaOnly ? (Flags | 2) : (Flags & ~2); - Flags = TcpoOnly ? (Flags | 4) : (Flags & ~4); - Flags = Cdn ? (Flags | 8) : (Flags & ~8); } @@ -45,24 +42,32 @@ namespace TeleSharp.TL MediaOnly = (Flags & 2) != 0; TcpoOnly = (Flags & 4) != 0; Cdn = (Flags & 8) != 0; + Static = (Flags & 16) != 0; Id = br.ReadInt32(); IpAddress = StringUtil.Deserialize(br); Port = br.ReadInt32(); + if ((Flags & 1024) != 0) + Secret = BytesUtil.Deserialize(br); + else + Secret = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + bw.Write(Id); StringUtil.Serialize(IpAddress, bw); bw.Write(Port); + if ((Flags & 1024) != 0) + BytesUtil.Serialize(Secret, bw); } } diff --git a/src/TeleSharp.TL/TL/TLDialog.cs b/src/TeleSharp.TL/TL/TLDialog.cs index 2d8e65c..7addae7 100644 --- a/src/TeleSharp.TL/TL/TLDialog.cs +++ b/src/TeleSharp.TL/TL/TLDialog.cs @@ -7,35 +7,34 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(1728035348)] - public class TLDialog : TLObject + [TLObject(739712882)] + public class TLDialog : TLAbsDialog { public override int Constructor { get { - return 1728035348; + return 739712882; } } public int Flags { get; set; } public bool Pinned { get; set; } + public bool UnreadMark { get; set; } public TLAbsPeer Peer { get; set; } public int TopMessage { get; set; } public int ReadInboxMaxId { get; set; } public int ReadOutboxMaxId { get; set; } public int UnreadCount { get; set; } - public TLAbsPeerNotifySettings NotifySettings { get; set; } + public int UnreadMentionsCount { get; set; } + public TLPeerNotifySettings NotifySettings { get; set; } public int? Pts { get; set; } public TLAbsDraftMessage Draft { get; set; } + public int? FolderId { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Pinned ? (Flags | 4) : (Flags & ~4); - Flags = Pts != null ? (Flags | 1) : (Flags & ~1); - Flags = Draft != null ? (Flags | 2) : (Flags & ~2); } @@ -43,12 +42,14 @@ namespace TeleSharp.TL { Flags = br.ReadInt32(); Pinned = (Flags & 4) != 0; + UnreadMark = (Flags & 8) != 0; Peer = (TLAbsPeer)ObjectUtils.DeserializeObject(br); TopMessage = br.ReadInt32(); ReadInboxMaxId = br.ReadInt32(); ReadOutboxMaxId = br.ReadInt32(); UnreadCount = br.ReadInt32(); - NotifySettings = (TLAbsPeerNotifySettings)ObjectUtils.DeserializeObject(br); + UnreadMentionsCount = br.ReadInt32(); + NotifySettings = (TLPeerNotifySettings)ObjectUtils.DeserializeObject(br); if ((Flags & 1) != 0) Pts = br.ReadInt32(); else @@ -59,25 +60,33 @@ namespace TeleSharp.TL else Draft = null; + if ((Flags & 16) != 0) + FolderId = br.ReadInt32(); + else + FolderId = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + ObjectUtils.SerializeObject(Peer, bw); bw.Write(TopMessage); bw.Write(ReadInboxMaxId); bw.Write(ReadOutboxMaxId); bw.Write(UnreadCount); + bw.Write(UnreadMentionsCount); ObjectUtils.SerializeObject(NotifySettings, bw); if ((Flags & 1) != 0) bw.Write(Pts.Value); if ((Flags & 2) != 0) ObjectUtils.SerializeObject(Draft, bw); + if ((Flags & 16) != 0) + bw.Write(FolderId.Value); } } diff --git a/src/TeleSharp.TL/TL/TLDialogFolder.cs b/src/TeleSharp.TL/TL/TLDialogFolder.cs new file mode 100644 index 0000000..093a60f --- /dev/null +++ b/src/TeleSharp.TL/TL/TLDialogFolder.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1908216652)] + public class TLDialogFolder : TLAbsDialog + { + public override int Constructor + { + get + { + return 1908216652; + } + } + + public int Flags { get; set; } + public bool Pinned { get; set; } + public TLFolder Folder { get; set; } + public TLAbsPeer Peer { get; set; } + public int TopMessage { get; set; } + public int UnreadMutedPeersCount { get; set; } + public int UnreadUnmutedPeersCount { get; set; } + public int UnreadMutedMessagesCount { get; set; } + public int UnreadUnmutedMessagesCount { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Pinned = (Flags & 4) != 0; + Folder = (TLFolder)ObjectUtils.DeserializeObject(br); + Peer = (TLAbsPeer)ObjectUtils.DeserializeObject(br); + TopMessage = br.ReadInt32(); + UnreadMutedPeersCount = br.ReadInt32(); + UnreadUnmutedPeersCount = br.ReadInt32(); + UnreadMutedMessagesCount = br.ReadInt32(); + UnreadUnmutedMessagesCount = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + ObjectUtils.SerializeObject(Folder, bw); + ObjectUtils.SerializeObject(Peer, bw); + bw.Write(TopMessage); + bw.Write(UnreadMutedPeersCount); + bw.Write(UnreadUnmutedPeersCount); + bw.Write(UnreadMutedMessagesCount); + bw.Write(UnreadUnmutedMessagesCount); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLDialogPeer.cs b/src/TeleSharp.TL/TL/TLDialogPeer.cs new file mode 100644 index 0000000..84d5ad8 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLDialogPeer.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-445792507)] + public class TLDialogPeer : TLAbsDialogPeer + { + public override int Constructor + { + get + { + return -445792507; + } + } + + public TLAbsPeer Peer { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsPeer)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLDialogPeerFolder.cs b/src/TeleSharp.TL/TL/TLDialogPeerFolder.cs new file mode 100644 index 0000000..02d1299 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLDialogPeerFolder.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1363483106)] + public class TLDialogPeerFolder : TLAbsDialogPeer + { + public override int Constructor + { + get + { + return 1363483106; + } + } + + public int FolderId { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + FolderId = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(FolderId); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLDisabledFeature.cs b/src/TeleSharp.TL/TL/TLDisabledFeature.cs deleted file mode 100644 index ce1d8de..0000000 --- a/src/TeleSharp.TL/TL/TLDisabledFeature.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using TeleSharp.TL; -namespace TeleSharp.TL -{ - [TLObject(-1369215196)] - public class TLDisabledFeature : TLObject - { - public override int Constructor - { - get - { - return -1369215196; - } - } - - public string Feature { get; set; } - public string Description { get; set; } - - - public void ComputeFlags() - { - - } - - public override void DeserializeBody(BinaryReader br) - { - Feature = StringUtil.Deserialize(br); - Description = StringUtil.Deserialize(br); - - } - - public override void SerializeBody(BinaryWriter bw) - { - bw.Write(Constructor); - StringUtil.Serialize(Feature, bw); - StringUtil.Serialize(Description, bw); - - } - } -} diff --git a/src/TeleSharp.TL/TL/TLDocument.cs b/src/TeleSharp.TL/TL/TLDocument.cs index 20414eb..8454c2b 100644 --- a/src/TeleSharp.TL/TL/TLDocument.cs +++ b/src/TeleSharp.TL/TL/TLDocument.cs @@ -7,25 +7,26 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-2027738169)] + [TLObject(-1683841855)] public class TLDocument : TLAbsDocument { public override int Constructor { get { - return -2027738169; + return -1683841855; } } + public int Flags { get; set; } public long Id { get; set; } public long AccessHash { get; set; } + public byte[] FileReference { get; set; } public int Date { get; set; } public string MimeType { get; set; } public int Size { get; set; } - public TLAbsPhotoSize Thumb { get; set; } + public TLVector Thumbs { get; set; } public int DcId { get; set; } - public int Version { get; set; } public TLVector Attributes { get; set; } @@ -36,14 +37,19 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); Id = br.ReadInt64(); AccessHash = br.ReadInt64(); + FileReference = BytesUtil.Deserialize(br); Date = br.ReadInt32(); MimeType = StringUtil.Deserialize(br); Size = br.ReadInt32(); - Thumb = (TLAbsPhotoSize)ObjectUtils.DeserializeObject(br); + if ((Flags & 1) != 0) + Thumbs = (TLVector)ObjectUtils.DeserializeVector(br); + else + Thumbs = null; + DcId = br.ReadInt32(); - Version = br.ReadInt32(); Attributes = (TLVector)ObjectUtils.DeserializeVector(br); } @@ -51,14 +57,16 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); bw.Write(Id); bw.Write(AccessHash); + BytesUtil.Serialize(FileReference, bw); bw.Write(Date); StringUtil.Serialize(MimeType, bw); bw.Write(Size); - ObjectUtils.SerializeObject(Thumb, bw); + if ((Flags & 1) != 0) + ObjectUtils.SerializeObject(Thumbs, bw); bw.Write(DcId); - bw.Write(Version); ObjectUtils.SerializeObject(Attributes, bw); } diff --git a/src/TeleSharp.TL/TL/TLDocumentAttributeAudio.cs b/src/TeleSharp.TL/TL/TLDocumentAttributeAudio.cs index 2241eb2..a2d130d 100644 --- a/src/TeleSharp.TL/TL/TLDocumentAttributeAudio.cs +++ b/src/TeleSharp.TL/TL/TLDocumentAttributeAudio.cs @@ -28,11 +28,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Voice ? (Flags | 1024) : (Flags & ~1024); - Flags = Title != null ? (Flags | 1) : (Flags & ~1); - Flags = Performer != null ? (Flags | 2) : (Flags & ~2); - Flags = Waveform != null ? (Flags | 4) : (Flags & ~4); } @@ -62,7 +57,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(Duration); diff --git a/src/TeleSharp.TL/TL/TLDocumentAttributeSticker.cs b/src/TeleSharp.TL/TL/TLDocumentAttributeSticker.cs index e0bb9b4..c6a997b 100644 --- a/src/TeleSharp.TL/TL/TLDocumentAttributeSticker.cs +++ b/src/TeleSharp.TL/TL/TLDocumentAttributeSticker.cs @@ -27,9 +27,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Mask ? (Flags | 2) : (Flags & ~2); - Flags = MaskCoords != null ? (Flags | 1) : (Flags & ~1); } @@ -50,7 +47,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); StringUtil.Serialize(Alt, bw); diff --git a/src/TeleSharp.TL/TL/TLDocumentAttributeVideo.cs b/src/TeleSharp.TL/TL/TLDocumentAttributeVideo.cs index d9333d8..2ccf4f6 100644 --- a/src/TeleSharp.TL/TL/TLDocumentAttributeVideo.cs +++ b/src/TeleSharp.TL/TL/TLDocumentAttributeVideo.cs @@ -20,6 +20,7 @@ namespace TeleSharp.TL public int Flags { get; set; } public bool RoundMessage { get; set; } + public bool SupportsStreaming { get; set; } public int Duration { get; set; } public int W { get; set; } public int H { get; set; } @@ -27,8 +28,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = RoundMessage ? (Flags | 1) : (Flags & ~1); } @@ -36,6 +35,7 @@ namespace TeleSharp.TL { Flags = br.ReadInt32(); RoundMessage = (Flags & 1) != 0; + SupportsStreaming = (Flags & 2) != 0; Duration = br.ReadInt32(); W = br.ReadInt32(); H = br.ReadInt32(); @@ -45,9 +45,9 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + bw.Write(Duration); bw.Write(W); bw.Write(H); diff --git a/src/TeleSharp.TL/TL/TLDraftMessage.cs b/src/TeleSharp.TL/TL/TLDraftMessage.cs index 6331f98..2ba3115 100644 --- a/src/TeleSharp.TL/TL/TLDraftMessage.cs +++ b/src/TeleSharp.TL/TL/TLDraftMessage.cs @@ -28,10 +28,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = NoWebpage ? (Flags | 2) : (Flags & ~2); - Flags = ReplyToMsgId != null ? (Flags | 1) : (Flags & ~1); - Flags = Entities != null ? (Flags | 8) : (Flags & ~8); } @@ -57,7 +53,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); if ((Flags & 1) != 0) diff --git a/src/TeleSharp.TL/TL/TLDraftMessageEmpty.cs b/src/TeleSharp.TL/TL/TLDraftMessageEmpty.cs index a5d31cf..c36b476 100644 --- a/src/TeleSharp.TL/TL/TLDraftMessageEmpty.cs +++ b/src/TeleSharp.TL/TL/TLDraftMessageEmpty.cs @@ -7,17 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1169445179)] + [TLObject(453805082)] public class TLDraftMessageEmpty : TLAbsDraftMessage { public override int Constructor { get { - return -1169445179; + return 453805082; } } + public int Flags { get; set; } + public int? Date { get; set; } public void ComputeFlags() @@ -27,12 +29,21 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); + if ((Flags & 1) != 0) + Date = br.ReadInt32(); + else + Date = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); + if ((Flags & 1) != 0) + bw.Write(Date.Value); } } diff --git a/src/TeleSharp.TL/TL/TLEmojiKeyword.cs b/src/TeleSharp.TL/TL/TLEmojiKeyword.cs new file mode 100644 index 0000000..0e540e2 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLEmojiKeyword.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-709641735)] + public class TLEmojiKeyword : TLAbsEmojiKeyword + { + public override int Constructor + { + get + { + return -709641735; + } + } + + public string Keyword { get; set; } + public TLVector Emoticons { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Keyword = StringUtil.Deserialize(br); + Emoticons = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Keyword, bw); + ObjectUtils.SerializeObject(Emoticons, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLEmojiKeywordDeleted.cs b/src/TeleSharp.TL/TL/TLEmojiKeywordDeleted.cs new file mode 100644 index 0000000..b38b27a --- /dev/null +++ b/src/TeleSharp.TL/TL/TLEmojiKeywordDeleted.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(594408994)] + public class TLEmojiKeywordDeleted : TLAbsEmojiKeyword + { + public override int Constructor + { + get + { + return 594408994; + } + } + + public string Keyword { get; set; } + public TLVector Emoticons { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Keyword = StringUtil.Deserialize(br); + Emoticons = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Keyword, bw); + ObjectUtils.SerializeObject(Emoticons, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLEmojiKeywordsDifference.cs b/src/TeleSharp.TL/TL/TLEmojiKeywordsDifference.cs new file mode 100644 index 0000000..2b11e13 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLEmojiKeywordsDifference.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1556570557)] + public class TLEmojiKeywordsDifference : TLObject + { + public override int Constructor + { + get + { + return 1556570557; + } + } + + public string LangCode { get; set; } + public int FromVersion { get; set; } + public int Version { get; set; } + public TLVector Keywords { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + LangCode = StringUtil.Deserialize(br); + FromVersion = br.ReadInt32(); + Version = br.ReadInt32(); + Keywords = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(LangCode, bw); + bw.Write(FromVersion); + bw.Write(Version); + ObjectUtils.SerializeObject(Keywords, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLEmojiLanguage.cs b/src/TeleSharp.TL/TL/TLEmojiLanguage.cs new file mode 100644 index 0000000..4c18941 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLEmojiLanguage.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1275374751)] + public class TLEmojiLanguage : TLObject + { + public override int Constructor + { + get + { + return -1275374751; + } + } + + public string LangCode { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + LangCode = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(LangCode, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLEmojiURL.cs b/src/TeleSharp.TL/TL/TLEmojiURL.cs new file mode 100644 index 0000000..bd4eb0c --- /dev/null +++ b/src/TeleSharp.TL/TL/TLEmojiURL.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1519029347)] + public class TLEmojiURL : TLObject + { + public override int Constructor + { + get + { + return -1519029347; + } + } + + public string Url { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Url = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Url, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLExportedMessageLink.cs b/src/TeleSharp.TL/TL/TLExportedMessageLink.cs index 9640469..c3b18f8 100644 --- a/src/TeleSharp.TL/TL/TLExportedMessageLink.cs +++ b/src/TeleSharp.TL/TL/TLExportedMessageLink.cs @@ -7,18 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(524838915)] + [TLObject(1571494644)] public class TLExportedMessageLink : TLObject { public override int Constructor { get { - return 524838915; + return 1571494644; } } public string Link { get; set; } + public string Html { get; set; } public void ComputeFlags() @@ -29,6 +30,7 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { Link = StringUtil.Deserialize(br); + Html = StringUtil.Deserialize(br); } @@ -36,6 +38,7 @@ namespace TeleSharp.TL { bw.Write(Constructor); StringUtil.Serialize(Link, bw); + StringUtil.Serialize(Html, bw); } } diff --git a/src/TeleSharp.TL/TL/TLFileHash.cs b/src/TeleSharp.TL/TL/TLFileHash.cs new file mode 100644 index 0000000..493a76d --- /dev/null +++ b/src/TeleSharp.TL/TL/TLFileHash.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1648543603)] + public class TLFileHash : TLObject + { + public override int Constructor + { + get + { + return 1648543603; + } + } + + public int Offset { get; set; } + public int Limit { get; set; } + public byte[] Hash { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Offset = br.ReadInt32(); + Limit = br.ReadInt32(); + Hash = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Offset); + bw.Write(Limit); + BytesUtil.Serialize(Hash, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLFileLocationUnavailable.cs b/src/TeleSharp.TL/TL/TLFileLocationToBeDeprecated.cs similarity index 76% rename from src/TeleSharp.TL/TL/TLFileLocationUnavailable.cs rename to src/TeleSharp.TL/TL/TLFileLocationToBeDeprecated.cs index f46b9d6..875bcfc 100644 --- a/src/TeleSharp.TL/TL/TLFileLocationUnavailable.cs +++ b/src/TeleSharp.TL/TL/TLFileLocationToBeDeprecated.cs @@ -7,20 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(2086234950)] - public class TLFileLocationUnavailable : TLAbsFileLocation + [TLObject(-1132476723)] + public class TLFileLocationToBeDeprecated : TLObject { public override int Constructor { get { - return 2086234950; + return -1132476723; } } public long VolumeId { get; set; } public int LocalId { get; set; } - public long Secret { get; set; } public void ComputeFlags() @@ -32,7 +31,6 @@ namespace TeleSharp.TL { VolumeId = br.ReadInt64(); LocalId = br.ReadInt32(); - Secret = br.ReadInt64(); } @@ -41,7 +39,6 @@ namespace TeleSharp.TL bw.Write(Constructor); bw.Write(VolumeId); bw.Write(LocalId); - bw.Write(Secret); } } diff --git a/src/TeleSharp.TL/TL/TLFolder.cs b/src/TeleSharp.TL/TL/TLFolder.cs new file mode 100644 index 0000000..64ece14 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLFolder.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-11252123)] + public class TLFolder : TLObject + { + public override int Constructor + { + get + { + return -11252123; + } + } + + public int Flags { get; set; } + public bool AutofillNewBroadcasts { get; set; } + public bool AutofillPublicGroups { get; set; } + public bool AutofillNewCorrespondents { get; set; } + public int Id { get; set; } + public string Title { get; set; } + public TLAbsChatPhoto Photo { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + AutofillNewBroadcasts = (Flags & 1) != 0; + AutofillPublicGroups = (Flags & 2) != 0; + AutofillNewCorrespondents = (Flags & 4) != 0; + Id = br.ReadInt32(); + Title = StringUtil.Deserialize(br); + if ((Flags & 8) != 0) + Photo = (TLAbsChatPhoto)ObjectUtils.DeserializeObject(br); + else + Photo = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + + + bw.Write(Id); + StringUtil.Serialize(Title, bw); + if ((Flags & 8) != 0) + ObjectUtils.SerializeObject(Photo, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLFolderPeer.cs b/src/TeleSharp.TL/TL/TLFolderPeer.cs new file mode 100644 index 0000000..a734655 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLFolderPeer.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-373643672)] + public class TLFolderPeer : TLObject + { + public override int Constructor + { + get + { + return -373643672; + } + } + + public TLAbsPeer Peer { get; set; } + public int FolderId { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsPeer)ObjectUtils.DeserializeObject(br); + FolderId = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + bw.Write(FolderId); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLGame.cs b/src/TeleSharp.TL/TL/TLGame.cs index 190e3d5..7244206 100644 --- a/src/TeleSharp.TL/TL/TLGame.cs +++ b/src/TeleSharp.TL/TL/TLGame.cs @@ -30,8 +30,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Document != null ? (Flags | 1) : (Flags & ~1); } @@ -55,7 +53,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(Id); bw.Write(AccessHash); diff --git a/src/TeleSharp.TL/TL/TLGeoPoint.cs b/src/TeleSharp.TL/TL/TLGeoPoint.cs index a8063cc..23a050b 100644 --- a/src/TeleSharp.TL/TL/TLGeoPoint.cs +++ b/src/TeleSharp.TL/TL/TLGeoPoint.cs @@ -7,19 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(541710092)] + [TLObject(43446532)] public class TLGeoPoint : TLAbsGeoPoint { public override int Constructor { get { - return 541710092; + return 43446532; } } public double Long { get; set; } public double Lat { get; set; } + public long AccessHash { get; set; } public void ComputeFlags() @@ -31,6 +32,7 @@ namespace TeleSharp.TL { Long = br.ReadDouble(); Lat = br.ReadDouble(); + AccessHash = br.ReadInt64(); } @@ -39,6 +41,7 @@ namespace TeleSharp.TL bw.Write(Constructor); bw.Write(Long); bw.Write(Lat); + bw.Write(AccessHash); } } diff --git a/src/TeleSharp.TL/TL/TLInputAppEvent.cs b/src/TeleSharp.TL/TL/TLInputAppEvent.cs index a934669..bea6b64 100644 --- a/src/TeleSharp.TL/TL/TLInputAppEvent.cs +++ b/src/TeleSharp.TL/TL/TLInputAppEvent.cs @@ -7,21 +7,21 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(1996904104)] + [TLObject(488313413)] public class TLInputAppEvent : TLObject { public override int Constructor { get { - return 1996904104; + return 488313413; } } public double Time { get; set; } public string Type { get; set; } public long Peer { get; set; } - public string Data { get; set; } + public TLAbsJSONValue Data { get; set; } public void ComputeFlags() @@ -34,7 +34,7 @@ namespace TeleSharp.TL Time = br.ReadDouble(); Type = StringUtil.Deserialize(br); Peer = br.ReadInt64(); - Data = StringUtil.Deserialize(br); + Data = (TLAbsJSONValue)ObjectUtils.DeserializeObject(br); } @@ -44,7 +44,7 @@ namespace TeleSharp.TL bw.Write(Time); StringUtil.Serialize(Type, bw); bw.Write(Peer); - StringUtil.Serialize(Data, bw); + ObjectUtils.SerializeObject(Data, bw); } } diff --git a/src/TeleSharp.TL/TL/TLInputBotInlineMessageGame.cs b/src/TeleSharp.TL/TL/TLInputBotInlineMessageGame.cs index b606855..aa677c3 100644 --- a/src/TeleSharp.TL/TL/TLInputBotInlineMessageGame.cs +++ b/src/TeleSharp.TL/TL/TLInputBotInlineMessageGame.cs @@ -24,8 +24,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = ReplyMarkup != null ? (Flags | 4) : (Flags & ~4); } @@ -43,7 +41,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); if ((Flags & 4) != 0) ObjectUtils.SerializeObject(ReplyMarkup, bw); diff --git a/src/TeleSharp.TL/TL/TLInputBotInlineMessageMediaAuto.cs b/src/TeleSharp.TL/TL/TLInputBotInlineMessageMediaAuto.cs index 023b964..93e6024 100644 --- a/src/TeleSharp.TL/TL/TLInputBotInlineMessageMediaAuto.cs +++ b/src/TeleSharp.TL/TL/TLInputBotInlineMessageMediaAuto.cs @@ -7,33 +7,37 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(691006739)] + [TLObject(864077702)] public class TLInputBotInlineMessageMediaAuto : TLAbsInputBotInlineMessage { public override int Constructor { get { - return 691006739; + return 864077702; } } public int Flags { get; set; } - public string Caption { get; set; } + public string Message { get; set; } + public TLVector Entities { get; set; } public TLAbsReplyMarkup ReplyMarkup { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = ReplyMarkup != null ? (Flags | 4) : (Flags & ~4); } public override void DeserializeBody(BinaryReader br) { Flags = br.ReadInt32(); - Caption = StringUtil.Deserialize(br); + Message = StringUtil.Deserialize(br); + if ((Flags & 2) != 0) + Entities = (TLVector)ObjectUtils.DeserializeVector(br); + else + Entities = null; + if ((Flags & 4) != 0) ReplyMarkup = (TLAbsReplyMarkup)ObjectUtils.DeserializeObject(br); else @@ -45,9 +49,10 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); - StringUtil.Serialize(Caption, bw); + StringUtil.Serialize(Message, bw); + if ((Flags & 2) != 0) + ObjectUtils.SerializeObject(Entities, bw); if ((Flags & 4) != 0) ObjectUtils.SerializeObject(ReplyMarkup, bw); diff --git a/src/TeleSharp.TL/TL/TLInputBotInlineMessageMediaContact.cs b/src/TeleSharp.TL/TL/TLInputBotInlineMessageMediaContact.cs index 2ee2fa7..a608155 100644 --- a/src/TeleSharp.TL/TL/TLInputBotInlineMessageMediaContact.cs +++ b/src/TeleSharp.TL/TL/TLInputBotInlineMessageMediaContact.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(766443943)] + [TLObject(-1494368259)] public class TLInputBotInlineMessageMediaContact : TLAbsInputBotInlineMessage { public override int Constructor { get { - return 766443943; + return -1494368259; } } @@ -22,13 +22,12 @@ namespace TeleSharp.TL public string PhoneNumber { get; set; } public string FirstName { get; set; } public string LastName { get; set; } + public string Vcard { get; set; } public TLAbsReplyMarkup ReplyMarkup { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = ReplyMarkup != null ? (Flags | 4) : (Flags & ~4); } @@ -38,6 +37,7 @@ namespace TeleSharp.TL PhoneNumber = StringUtil.Deserialize(br); FirstName = StringUtil.Deserialize(br); LastName = StringUtil.Deserialize(br); + Vcard = StringUtil.Deserialize(br); if ((Flags & 4) != 0) ReplyMarkup = (TLAbsReplyMarkup)ObjectUtils.DeserializeObject(br); else @@ -49,11 +49,11 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); StringUtil.Serialize(PhoneNumber, bw); StringUtil.Serialize(FirstName, bw); StringUtil.Serialize(LastName, bw); + StringUtil.Serialize(Vcard, bw); if ((Flags & 4) != 0) ObjectUtils.SerializeObject(ReplyMarkup, bw); diff --git a/src/TeleSharp.TL/TL/TLInputBotInlineMessageMediaGeo.cs b/src/TeleSharp.TL/TL/TLInputBotInlineMessageMediaGeo.cs index 4f578f6..8a099e1 100644 --- a/src/TeleSharp.TL/TL/TLInputBotInlineMessageMediaGeo.cs +++ b/src/TeleSharp.TL/TL/TLInputBotInlineMessageMediaGeo.cs @@ -7,26 +7,25 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-190472735)] + [TLObject(-1045340827)] public class TLInputBotInlineMessageMediaGeo : TLAbsInputBotInlineMessage { public override int Constructor { get { - return -190472735; + return -1045340827; } } public int Flags { get; set; } public TLAbsInputGeoPoint GeoPoint { get; set; } + public int Period { get; set; } public TLAbsReplyMarkup ReplyMarkup { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = ReplyMarkup != null ? (Flags | 4) : (Flags & ~4); } @@ -34,6 +33,7 @@ namespace TeleSharp.TL { Flags = br.ReadInt32(); GeoPoint = (TLAbsInputGeoPoint)ObjectUtils.DeserializeObject(br); + Period = br.ReadInt32(); if ((Flags & 4) != 0) ReplyMarkup = (TLAbsReplyMarkup)ObjectUtils.DeserializeObject(br); else @@ -45,9 +45,9 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); ObjectUtils.SerializeObject(GeoPoint, bw); + bw.Write(Period); if ((Flags & 4) != 0) ObjectUtils.SerializeObject(ReplyMarkup, bw); diff --git a/src/TeleSharp.TL/TL/TLInputBotInlineMessageMediaVenue.cs b/src/TeleSharp.TL/TL/TLInputBotInlineMessageMediaVenue.cs index 59bd462..dd87484 100644 --- a/src/TeleSharp.TL/TL/TLInputBotInlineMessageMediaVenue.cs +++ b/src/TeleSharp.TL/TL/TLInputBotInlineMessageMediaVenue.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1431327288)] + [TLObject(1098628881)] public class TLInputBotInlineMessageMediaVenue : TLAbsInputBotInlineMessage { public override int Constructor { get { - return -1431327288; + return 1098628881; } } @@ -24,13 +24,12 @@ namespace TeleSharp.TL public string Address { get; set; } public string Provider { get; set; } public string VenueId { get; set; } + public string VenueType { get; set; } public TLAbsReplyMarkup ReplyMarkup { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = ReplyMarkup != null ? (Flags | 4) : (Flags & ~4); } @@ -42,6 +41,7 @@ namespace TeleSharp.TL Address = StringUtil.Deserialize(br); Provider = StringUtil.Deserialize(br); VenueId = StringUtil.Deserialize(br); + VenueType = StringUtil.Deserialize(br); if ((Flags & 4) != 0) ReplyMarkup = (TLAbsReplyMarkup)ObjectUtils.DeserializeObject(br); else @@ -53,13 +53,13 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); ObjectUtils.SerializeObject(GeoPoint, bw); StringUtil.Serialize(Title, bw); StringUtil.Serialize(Address, bw); StringUtil.Serialize(Provider, bw); StringUtil.Serialize(VenueId, bw); + StringUtil.Serialize(VenueType, bw); if ((Flags & 4) != 0) ObjectUtils.SerializeObject(ReplyMarkup, bw); diff --git a/src/TeleSharp.TL/TL/TLInputBotInlineMessageText.cs b/src/TeleSharp.TL/TL/TLInputBotInlineMessageText.cs index 186196c..4c8f09f 100644 --- a/src/TeleSharp.TL/TL/TLInputBotInlineMessageText.cs +++ b/src/TeleSharp.TL/TL/TLInputBotInlineMessageText.cs @@ -27,10 +27,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = NoWebpage ? (Flags | 1) : (Flags & ~1); - Flags = Entities != null ? (Flags | 2) : (Flags & ~2); - Flags = ReplyMarkup != null ? (Flags | 4) : (Flags & ~4); } @@ -55,7 +51,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); StringUtil.Serialize(Message, bw); diff --git a/src/TeleSharp.TL/TL/TLInputBotInlineResult.cs b/src/TeleSharp.TL/TL/TLInputBotInlineResult.cs index 09dea40..3ff58d6 100644 --- a/src/TeleSharp.TL/TL/TLInputBotInlineResult.cs +++ b/src/TeleSharp.TL/TL/TLInputBotInlineResult.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(750510426)] + [TLObject(-2000710887)] public class TLInputBotInlineResult : TLAbsInputBotInlineResult { public override int Constructor { get { - return 750510426; + return -2000710887; } } @@ -24,27 +24,13 @@ namespace TeleSharp.TL public string Title { get; set; } public string Description { get; set; } public string Url { get; set; } - public string ThumbUrl { get; set; } - public string ContentUrl { get; set; } - public string ContentType { get; set; } - public int? W { get; set; } - public int? H { get; set; } - public int? Duration { get; set; } + public TLInputWebDocument Thumb { get; set; } + public TLInputWebDocument Content { get; set; } public TLAbsInputBotInlineMessage SendMessage { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Title != null ? (Flags | 2) : (Flags & ~2); - Flags = Description != null ? (Flags | 4) : (Flags & ~4); - Flags = Url != null ? (Flags | 8) : (Flags & ~8); - Flags = ThumbUrl != null ? (Flags | 16) : (Flags & ~16); - Flags = ContentUrl != null ? (Flags | 32) : (Flags & ~32); - Flags = ContentType != null ? (Flags | 32) : (Flags & ~32); - Flags = W != null ? (Flags | 64) : (Flags & ~64); - Flags = H != null ? (Flags | 64) : (Flags & ~64); - Flags = Duration != null ? (Flags | 128) : (Flags & ~128); } @@ -69,34 +55,14 @@ namespace TeleSharp.TL Url = null; if ((Flags & 16) != 0) - ThumbUrl = StringUtil.Deserialize(br); + Thumb = (TLInputWebDocument)ObjectUtils.DeserializeObject(br); else - ThumbUrl = null; + Thumb = null; if ((Flags & 32) != 0) - ContentUrl = StringUtil.Deserialize(br); + Content = (TLInputWebDocument)ObjectUtils.DeserializeObject(br); else - ContentUrl = null; - - if ((Flags & 32) != 0) - ContentType = StringUtil.Deserialize(br); - else - ContentType = null; - - if ((Flags & 64) != 0) - W = br.ReadInt32(); - else - W = null; - - if ((Flags & 64) != 0) - H = br.ReadInt32(); - else - H = null; - - if ((Flags & 128) != 0) - Duration = br.ReadInt32(); - else - Duration = null; + Content = null; SendMessage = (TLAbsInputBotInlineMessage)ObjectUtils.DeserializeObject(br); @@ -105,7 +71,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); StringUtil.Serialize(Id, bw); StringUtil.Serialize(Type, bw); @@ -116,17 +81,9 @@ namespace TeleSharp.TL if ((Flags & 8) != 0) StringUtil.Serialize(Url, bw); if ((Flags & 16) != 0) - StringUtil.Serialize(ThumbUrl, bw); + ObjectUtils.SerializeObject(Thumb, bw); if ((Flags & 32) != 0) - StringUtil.Serialize(ContentUrl, bw); - if ((Flags & 32) != 0) - StringUtil.Serialize(ContentType, bw); - if ((Flags & 64) != 0) - bw.Write(W.Value); - if ((Flags & 64) != 0) - bw.Write(H.Value); - if ((Flags & 128) != 0) - bw.Write(Duration.Value); + ObjectUtils.SerializeObject(Content, bw); ObjectUtils.SerializeObject(SendMessage, bw); } diff --git a/src/TeleSharp.TL/TL/TLInputBotInlineResultDocument.cs b/src/TeleSharp.TL/TL/TLInputBotInlineResultDocument.cs index a673c2a..d34c525 100644 --- a/src/TeleSharp.TL/TL/TLInputBotInlineResultDocument.cs +++ b/src/TeleSharp.TL/TL/TLInputBotInlineResultDocument.cs @@ -29,9 +29,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Title != null ? (Flags | 2) : (Flags & ~2); - Flags = Description != null ? (Flags | 4) : (Flags & ~4); } @@ -58,7 +55,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); StringUtil.Serialize(Id, bw); StringUtil.Serialize(Type, bw); diff --git a/src/TeleSharp.TL/TL/TLInputChannelFromMessage.cs b/src/TeleSharp.TL/TL/TLInputChannelFromMessage.cs new file mode 100644 index 0000000..e928310 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputChannelFromMessage.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(707290417)] + public class TLInputChannelFromMessage : TLAbsInputChannel + { + public override int Constructor + { + get + { + return 707290417; + } + } + + public TLAbsInputPeer Peer { get; set; } + public int MsgId { get; set; } + public int ChannelId { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + MsgId = br.ReadInt32(); + ChannelId = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + bw.Write(MsgId); + bw.Write(ChannelId); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputCheckPasswordEmpty.cs b/src/TeleSharp.TL/TL/TLInputCheckPasswordEmpty.cs new file mode 100644 index 0000000..deda146 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputCheckPasswordEmpty.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1736378792)] + public class TLInputCheckPasswordEmpty : TLAbsInputCheckPasswordSRP + { + public override int Constructor + { + get + { + return -1736378792; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputCheckPasswordSRP.cs b/src/TeleSharp.TL/TL/TLInputCheckPasswordSRP.cs new file mode 100644 index 0000000..044185d --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputCheckPasswordSRP.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-763367294)] + public class TLInputCheckPasswordSRP : TLAbsInputCheckPasswordSRP + { + public override int Constructor + { + get + { + return -763367294; + } + } + + public long SrpId { get; set; } + public byte[] A { get; set; } + public byte[] M1 { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + SrpId = br.ReadInt64(); + A = BytesUtil.Deserialize(br); + M1 = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(SrpId); + BytesUtil.Serialize(A, bw); + BytesUtil.Serialize(M1, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputClientProxy.cs b/src/TeleSharp.TL/TL/TLInputClientProxy.cs new file mode 100644 index 0000000..76999eb --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputClientProxy.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1968737087)] + public class TLInputClientProxy : TLObject + { + public override int Constructor + { + get + { + return 1968737087; + } + } + + public string Address { get; set; } + public int Port { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Address = StringUtil.Deserialize(br); + Port = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Address, bw); + bw.Write(Port); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputDialogPeer.cs b/src/TeleSharp.TL/TL/TLInputDialogPeer.cs new file mode 100644 index 0000000..a53634e --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputDialogPeer.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-55902537)] + public class TLInputDialogPeer : TLAbsInputDialogPeer + { + public override int Constructor + { + get + { + return -55902537; + } + } + + public TLAbsInputPeer Peer { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputDialogPeerFolder.cs b/src/TeleSharp.TL/TL/TLInputDialogPeerFolder.cs new file mode 100644 index 0000000..700cc39 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputDialogPeerFolder.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1684014375)] + public class TLInputDialogPeerFolder : TLAbsInputDialogPeer + { + public override int Constructor + { + get + { + return 1684014375; + } + } + + public int FolderId { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + FolderId = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(FolderId); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputDocument.cs b/src/TeleSharp.TL/TL/TLInputDocument.cs index 822c03f..cfc51eb 100644 --- a/src/TeleSharp.TL/TL/TLInputDocument.cs +++ b/src/TeleSharp.TL/TL/TLInputDocument.cs @@ -7,19 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(410618194)] + [TLObject(448771445)] public class TLInputDocument : TLAbsInputDocument { public override int Constructor { get { - return 410618194; + return 448771445; } } public long Id { get; set; } public long AccessHash { get; set; } + public byte[] FileReference { get; set; } public void ComputeFlags() @@ -31,6 +32,7 @@ namespace TeleSharp.TL { Id = br.ReadInt64(); AccessHash = br.ReadInt64(); + FileReference = BytesUtil.Deserialize(br); } @@ -39,6 +41,7 @@ namespace TeleSharp.TL bw.Write(Constructor); bw.Write(Id); bw.Write(AccessHash); + BytesUtil.Serialize(FileReference, bw); } } diff --git a/src/TeleSharp.TL/TL/TLInputDocumentFileLocation.cs b/src/TeleSharp.TL/TL/TLInputDocumentFileLocation.cs index 70833b0..8f3d822 100644 --- a/src/TeleSharp.TL/TL/TLInputDocumentFileLocation.cs +++ b/src/TeleSharp.TL/TL/TLInputDocumentFileLocation.cs @@ -7,20 +7,21 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(1125058340)] + [TLObject(-1160743548)] public class TLInputDocumentFileLocation : TLAbsInputFileLocation { public override int Constructor { get { - return 1125058340; + return -1160743548; } } public long Id { get; set; } public long AccessHash { get; set; } - public int Version { get; set; } + public byte[] FileReference { get; set; } + public string ThumbSize { get; set; } public void ComputeFlags() @@ -32,7 +33,8 @@ namespace TeleSharp.TL { Id = br.ReadInt64(); AccessHash = br.ReadInt64(); - Version = br.ReadInt32(); + FileReference = BytesUtil.Deserialize(br); + ThumbSize = StringUtil.Deserialize(br); } @@ -41,7 +43,8 @@ namespace TeleSharp.TL bw.Write(Constructor); bw.Write(Id); bw.Write(AccessHash); - bw.Write(Version); + BytesUtil.Serialize(FileReference, bw); + StringUtil.Serialize(ThumbSize, bw); } } diff --git a/src/TeleSharp.TL/TL/TLInputFileLocation.cs b/src/TeleSharp.TL/TL/TLInputFileLocation.cs index 1585fc7..f70c46c 100644 --- a/src/TeleSharp.TL/TL/TLInputFileLocation.cs +++ b/src/TeleSharp.TL/TL/TLInputFileLocation.cs @@ -7,20 +7,21 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(342061462)] + [TLObject(-539317279)] public class TLInputFileLocation : TLAbsInputFileLocation { public override int Constructor { get { - return 342061462; + return -539317279; } } public long VolumeId { get; set; } public int LocalId { get; set; } public long Secret { get; set; } + public byte[] FileReference { get; set; } public void ComputeFlags() @@ -33,6 +34,7 @@ namespace TeleSharp.TL VolumeId = br.ReadInt64(); LocalId = br.ReadInt32(); Secret = br.ReadInt64(); + FileReference = BytesUtil.Deserialize(br); } @@ -42,6 +44,7 @@ namespace TeleSharp.TL bw.Write(VolumeId); bw.Write(LocalId); bw.Write(Secret); + BytesUtil.Serialize(FileReference, bw); } } diff --git a/src/TeleSharp.TL/TL/TLInputFolderPeer.cs b/src/TeleSharp.TL/TL/TLInputFolderPeer.cs new file mode 100644 index 0000000..0a4d414 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputFolderPeer.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-70073706)] + public class TLInputFolderPeer : TLObject + { + public override int Constructor + { + get + { + return -70073706; + } + } + + public TLAbsInputPeer Peer { get; set; } + public int FolderId { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + FolderId = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + bw.Write(FolderId); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputKeyboardButtonUrlAuth.cs b/src/TeleSharp.TL/TL/TLInputKeyboardButtonUrlAuth.cs new file mode 100644 index 0000000..206d73d --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputKeyboardButtonUrlAuth.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-802258988)] + public class TLInputKeyboardButtonUrlAuth : TLAbsKeyboardButton + { + public override int Constructor + { + get + { + return -802258988; + } + } + + public int Flags { get; set; } + public bool RequestWriteAccess { get; set; } + public string Text { get; set; } + public string FwdText { get; set; } + public string Url { get; set; } + public TLAbsInputUser Bot { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + RequestWriteAccess = (Flags & 1) != 0; + Text = StringUtil.Deserialize(br); + if ((Flags & 2) != 0) + FwdText = StringUtil.Deserialize(br); + else + FwdText = null; + + Url = StringUtil.Deserialize(br); + Bot = (TLAbsInputUser)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + StringUtil.Serialize(Text, bw); + if ((Flags & 2) != 0) + StringUtil.Serialize(FwdText, bw); + StringUtil.Serialize(Url, bw); + ObjectUtils.SerializeObject(Bot, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputMediaContact.cs b/src/TeleSharp.TL/TL/TLInputMediaContact.cs index 2796740..feb1be3 100644 --- a/src/TeleSharp.TL/TL/TLInputMediaContact.cs +++ b/src/TeleSharp.TL/TL/TLInputMediaContact.cs @@ -7,20 +7,21 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1494984313)] + [TLObject(-122978821)] public class TLInputMediaContact : TLAbsInputMedia { public override int Constructor { get { - return -1494984313; + return -122978821; } } public string PhoneNumber { get; set; } public string FirstName { get; set; } public string LastName { get; set; } + public string Vcard { get; set; } public void ComputeFlags() @@ -33,6 +34,7 @@ namespace TeleSharp.TL PhoneNumber = StringUtil.Deserialize(br); FirstName = StringUtil.Deserialize(br); LastName = StringUtil.Deserialize(br); + Vcard = StringUtil.Deserialize(br); } @@ -42,6 +44,7 @@ namespace TeleSharp.TL StringUtil.Serialize(PhoneNumber, bw); StringUtil.Serialize(FirstName, bw); StringUtil.Serialize(LastName, bw); + StringUtil.Serialize(Vcard, bw); } } diff --git a/src/TeleSharp.TL/TL/TLInputMediaDocument.cs b/src/TeleSharp.TL/TL/TLInputMediaDocument.cs index 98e3807..3d765c5 100644 --- a/src/TeleSharp.TL/TL/TLInputMediaDocument.cs +++ b/src/TeleSharp.TL/TL/TLInputMediaDocument.cs @@ -7,19 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(444068508)] + [TLObject(598418386)] public class TLInputMediaDocument : TLAbsInputMedia { public override int Constructor { get { - return 444068508; + return 598418386; } } + public int Flags { get; set; } public TLAbsInputDocument Id { get; set; } - public string Caption { get; set; } + public int? TtlSeconds { get; set; } public void ComputeFlags() @@ -29,16 +30,23 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); Id = (TLAbsInputDocument)ObjectUtils.DeserializeObject(br); - Caption = StringUtil.Deserialize(br); + if ((Flags & 1) != 0) + TtlSeconds = br.ReadInt32(); + else + TtlSeconds = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); ObjectUtils.SerializeObject(Id, bw); - StringUtil.Serialize(Caption, bw); + if ((Flags & 1) != 0) + bw.Write(TtlSeconds.Value); } } diff --git a/src/TeleSharp.TL/TL/TLInputMediaDocumentExternal.cs b/src/TeleSharp.TL/TL/TLInputMediaDocumentExternal.cs index 4fdb71c..2b237e8 100644 --- a/src/TeleSharp.TL/TL/TLInputMediaDocumentExternal.cs +++ b/src/TeleSharp.TL/TL/TLInputMediaDocumentExternal.cs @@ -7,19 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-437690244)] + [TLObject(-78455655)] public class TLInputMediaDocumentExternal : TLAbsInputMedia { public override int Constructor { get { - return -437690244; + return -78455655; } } + public int Flags { get; set; } public string Url { get; set; } - public string Caption { get; set; } + public int? TtlSeconds { get; set; } public void ComputeFlags() @@ -29,16 +30,23 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); Url = StringUtil.Deserialize(br); - Caption = StringUtil.Deserialize(br); + if ((Flags & 1) != 0) + TtlSeconds = br.ReadInt32(); + else + TtlSeconds = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); StringUtil.Serialize(Url, bw); - StringUtil.Serialize(Caption, bw); + if ((Flags & 1) != 0) + bw.Write(TtlSeconds.Value); } } diff --git a/src/TeleSharp.TL/TL/TLInputMediaGeoLive.cs b/src/TeleSharp.TL/TL/TLInputMediaGeoLive.cs new file mode 100644 index 0000000..5bbe1eb --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputMediaGeoLive.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-833715459)] + public class TLInputMediaGeoLive : TLAbsInputMedia + { + public override int Constructor + { + get + { + return -833715459; + } + } + + public int Flags { get; set; } + public bool Stopped { get; set; } + public TLAbsInputGeoPoint GeoPoint { get; set; } + public int? Period { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Stopped = (Flags & 1) != 0; + GeoPoint = (TLAbsInputGeoPoint)ObjectUtils.DeserializeObject(br); + if ((Flags & 2) != 0) + Period = br.ReadInt32(); + else + Period = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + ObjectUtils.SerializeObject(GeoPoint, bw); + if ((Flags & 2) != 0) + bw.Write(Period.Value); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputMediaInvoice.cs b/src/TeleSharp.TL/TL/TLInputMediaInvoice.cs index 1e63dec..73df2a7 100644 --- a/src/TeleSharp.TL/TL/TLInputMediaInvoice.cs +++ b/src/TeleSharp.TL/TL/TLInputMediaInvoice.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1844103547)] + [TLObject(-186607933)] public class TLInputMediaInvoice : TLAbsInputMedia { public override int Constructor { get { - return -1844103547; + return -186607933; } } @@ -25,13 +25,12 @@ namespace TeleSharp.TL public TLInvoice Invoice { get; set; } public byte[] Payload { get; set; } public string Provider { get; set; } + public TLDataJSON ProviderData { get; set; } public string StartParam { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Photo != null ? (Flags | 1) : (Flags & ~1); } @@ -48,6 +47,7 @@ namespace TeleSharp.TL Invoice = (TLInvoice)ObjectUtils.DeserializeObject(br); Payload = BytesUtil.Deserialize(br); Provider = StringUtil.Deserialize(br); + ProviderData = (TLDataJSON)ObjectUtils.DeserializeObject(br); StartParam = StringUtil.Deserialize(br); } @@ -55,7 +55,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); StringUtil.Serialize(Title, bw); StringUtil.Serialize(Description, bw); @@ -64,6 +63,7 @@ namespace TeleSharp.TL ObjectUtils.SerializeObject(Invoice, bw); BytesUtil.Serialize(Payload, bw); StringUtil.Serialize(Provider, bw); + ObjectUtils.SerializeObject(ProviderData, bw); StringUtil.Serialize(StartParam, bw); } diff --git a/src/TeleSharp.TL/TL/TLInputMediaPhoto.cs b/src/TeleSharp.TL/TL/TLInputMediaPhoto.cs index 4c81fd3..1a93c30 100644 --- a/src/TeleSharp.TL/TL/TLInputMediaPhoto.cs +++ b/src/TeleSharp.TL/TL/TLInputMediaPhoto.cs @@ -7,19 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-373312269)] + [TLObject(-1279654347)] public class TLInputMediaPhoto : TLAbsInputMedia { public override int Constructor { get { - return -373312269; + return -1279654347; } } + public int Flags { get; set; } public TLAbsInputPhoto Id { get; set; } - public string Caption { get; set; } + public int? TtlSeconds { get; set; } public void ComputeFlags() @@ -29,16 +30,23 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); Id = (TLAbsInputPhoto)ObjectUtils.DeserializeObject(br); - Caption = StringUtil.Deserialize(br); + if ((Flags & 1) != 0) + TtlSeconds = br.ReadInt32(); + else + TtlSeconds = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); ObjectUtils.SerializeObject(Id, bw); - StringUtil.Serialize(Caption, bw); + if ((Flags & 1) != 0) + bw.Write(TtlSeconds.Value); } } diff --git a/src/TeleSharp.TL/TL/TLInputMediaPhotoExternal.cs b/src/TeleSharp.TL/TL/TLInputMediaPhotoExternal.cs index 14e0e26..d221f1d 100644 --- a/src/TeleSharp.TL/TL/TLInputMediaPhotoExternal.cs +++ b/src/TeleSharp.TL/TL/TLInputMediaPhotoExternal.cs @@ -7,19 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1252045032)] + [TLObject(-440664550)] public class TLInputMediaPhotoExternal : TLAbsInputMedia { public override int Constructor { get { - return -1252045032; + return -440664550; } } + public int Flags { get; set; } public string Url { get; set; } - public string Caption { get; set; } + public int? TtlSeconds { get; set; } public void ComputeFlags() @@ -29,16 +30,23 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); Url = StringUtil.Deserialize(br); - Caption = StringUtil.Deserialize(br); + if ((Flags & 1) != 0) + TtlSeconds = br.ReadInt32(); + else + TtlSeconds = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); StringUtil.Serialize(Url, bw); - StringUtil.Serialize(Caption, bw); + if ((Flags & 1) != 0) + bw.Write(TtlSeconds.Value); } } diff --git a/src/TeleSharp.TL/TL/TLInputMediaPoll.cs b/src/TeleSharp.TL/TL/TLInputMediaPoll.cs new file mode 100644 index 0000000..65271de --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputMediaPoll.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(112424539)] + public class TLInputMediaPoll : TLAbsInputMedia + { + public override int Constructor + { + get + { + return 112424539; + } + } + + public TLPoll Poll { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Poll = (TLPoll)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Poll, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputMediaUploadedDocument.cs b/src/TeleSharp.TL/TL/TLInputMediaUploadedDocument.cs index a20ac15..c8e1947 100644 --- a/src/TeleSharp.TL/TL/TLInputMediaUploadedDocument.cs +++ b/src/TeleSharp.TL/TL/TLInputMediaUploadedDocument.cs @@ -7,58 +7,71 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-797904407)] + [TLObject(1530447553)] public class TLInputMediaUploadedDocument : TLAbsInputMedia { public override int Constructor { get { - return -797904407; + return 1530447553; } } public int Flags { get; set; } + public bool NosoundVideo { get; set; } public TLAbsInputFile File { get; set; } + public TLAbsInputFile Thumb { get; set; } public string MimeType { get; set; } public TLVector Attributes { get; set; } - public string Caption { get; set; } public TLVector Stickers { get; set; } + public int? TtlSeconds { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Stickers != null ? (Flags | 1) : (Flags & ~1); } public override void DeserializeBody(BinaryReader br) { Flags = br.ReadInt32(); + NosoundVideo = (Flags & 8) != 0; File = (TLAbsInputFile)ObjectUtils.DeserializeObject(br); + if ((Flags & 4) != 0) + Thumb = (TLAbsInputFile)ObjectUtils.DeserializeObject(br); + else + Thumb = null; + MimeType = StringUtil.Deserialize(br); Attributes = (TLVector)ObjectUtils.DeserializeVector(br); - Caption = StringUtil.Deserialize(br); if ((Flags & 1) != 0) Stickers = (TLVector)ObjectUtils.DeserializeVector(br); else Stickers = null; + if ((Flags & 2) != 0) + TtlSeconds = br.ReadInt32(); + else + TtlSeconds = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + ObjectUtils.SerializeObject(File, bw); + if ((Flags & 4) != 0) + ObjectUtils.SerializeObject(Thumb, bw); StringUtil.Serialize(MimeType, bw); ObjectUtils.SerializeObject(Attributes, bw); - StringUtil.Serialize(Caption, bw); if ((Flags & 1) != 0) ObjectUtils.SerializeObject(Stickers, bw); + if ((Flags & 2) != 0) + bw.Write(TtlSeconds.Value); } } diff --git a/src/TeleSharp.TL/TL/TLInputMediaUploadedPhoto.cs b/src/TeleSharp.TL/TL/TLInputMediaUploadedPhoto.cs index 0854243..53b5bbe 100644 --- a/src/TeleSharp.TL/TL/TLInputMediaUploadedPhoto.cs +++ b/src/TeleSharp.TL/TL/TLInputMediaUploadedPhoto.cs @@ -7,27 +7,25 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(1661770481)] + [TLObject(505969924)] public class TLInputMediaUploadedPhoto : TLAbsInputMedia { public override int Constructor { get { - return 1661770481; + return 505969924; } } public int Flags { get; set; } public TLAbsInputFile File { get; set; } - public string Caption { get; set; } public TLVector Stickers { get; set; } + public int? TtlSeconds { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Stickers != null ? (Flags | 1) : (Flags & ~1); } @@ -35,24 +33,28 @@ namespace TeleSharp.TL { Flags = br.ReadInt32(); File = (TLAbsInputFile)ObjectUtils.DeserializeObject(br); - Caption = StringUtil.Deserialize(br); if ((Flags & 1) != 0) Stickers = (TLVector)ObjectUtils.DeserializeVector(br); else Stickers = null; + if ((Flags & 2) != 0) + TtlSeconds = br.ReadInt32(); + else + TtlSeconds = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); ObjectUtils.SerializeObject(File, bw); - StringUtil.Serialize(Caption, bw); if ((Flags & 1) != 0) ObjectUtils.SerializeObject(Stickers, bw); + if ((Flags & 2) != 0) + bw.Write(TtlSeconds.Value); } } diff --git a/src/TeleSharp.TL/TL/TLInputMediaVenue.cs b/src/TeleSharp.TL/TL/TLInputMediaVenue.cs index c2e024a..0416acc 100644 --- a/src/TeleSharp.TL/TL/TLInputMediaVenue.cs +++ b/src/TeleSharp.TL/TL/TLInputMediaVenue.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(673687578)] + [TLObject(-1052959727)] public class TLInputMediaVenue : TLAbsInputMedia { public override int Constructor { get { - return 673687578; + return -1052959727; } } @@ -23,6 +23,7 @@ namespace TeleSharp.TL public string Address { get; set; } public string Provider { get; set; } public string VenueId { get; set; } + public string VenueType { get; set; } public void ComputeFlags() @@ -37,6 +38,7 @@ namespace TeleSharp.TL Address = StringUtil.Deserialize(br); Provider = StringUtil.Deserialize(br); VenueId = StringUtil.Deserialize(br); + VenueType = StringUtil.Deserialize(br); } @@ -48,6 +50,7 @@ namespace TeleSharp.TL StringUtil.Serialize(Address, bw); StringUtil.Serialize(Provider, bw); StringUtil.Serialize(VenueId, bw); + StringUtil.Serialize(VenueType, bw); } } diff --git a/src/TeleSharp.TL/TL/TLInputMessageID.cs b/src/TeleSharp.TL/TL/TLInputMessageID.cs new file mode 100644 index 0000000..139c4b5 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputMessageID.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1502174430)] + public class TLInputMessageID : TLAbsInputMessage + { + public override int Constructor + { + get + { + return -1502174430; + } + } + + public int Id { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Id = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Id); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputMessagePinned.cs b/src/TeleSharp.TL/TL/TLInputMessagePinned.cs new file mode 100644 index 0000000..e2a186e --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputMessagePinned.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-2037963464)] + public class TLInputMessagePinned : TLAbsInputMessage + { + public override int Constructor + { + get + { + return -2037963464; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputMessageReplyTo.cs b/src/TeleSharp.TL/TL/TLInputMessageReplyTo.cs new file mode 100644 index 0000000..e430da0 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputMessageReplyTo.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1160215659)] + public class TLInputMessageReplyTo : TLAbsInputMessage + { + public override int Constructor + { + get + { + return -1160215659; + } + } + + public int Id { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Id = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Id); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelRoleEditor.cs b/src/TeleSharp.TL/TL/TLInputMessagesFilterContacts.cs similarity index 80% rename from src/TeleSharp.TL/TL/TLChannelRoleEditor.cs rename to src/TeleSharp.TL/TL/TLInputMessagesFilterContacts.cs index 34c9db0..1227480 100644 --- a/src/TeleSharp.TL/TL/TLChannelRoleEditor.cs +++ b/src/TeleSharp.TL/TL/TLInputMessagesFilterContacts.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-2113143156)] - public class TLChannelRoleEditor : TLAbsChannelParticipantRole + [TLObject(-530392189)] + public class TLInputMessagesFilterContacts : TLAbsMessagesFilter { public override int Constructor { get { - return -2113143156; + return -530392189; } } diff --git a/src/TeleSharp.TL/TL/TLInputMessagesFilterGeo.cs b/src/TeleSharp.TL/TL/TLInputMessagesFilterGeo.cs new file mode 100644 index 0000000..e3da94a --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputMessagesFilterGeo.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-419271411)] + public class TLInputMessagesFilterGeo : TLAbsMessagesFilter + { + public override int Constructor + { + get + { + return -419271411; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputMessagesFilterMyMentions.cs b/src/TeleSharp.TL/TL/TLInputMessagesFilterMyMentions.cs new file mode 100644 index 0000000..cf665c1 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputMessagesFilterMyMentions.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1040652646)] + public class TLInputMessagesFilterMyMentions : TLAbsMessagesFilter + { + public override int Constructor + { + get + { + return -1040652646; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputMessagesFilterPhoneCalls.cs b/src/TeleSharp.TL/TL/TLInputMessagesFilterPhoneCalls.cs index 891851b..a2d965c 100644 --- a/src/TeleSharp.TL/TL/TLInputMessagesFilterPhoneCalls.cs +++ b/src/TeleSharp.TL/TL/TLInputMessagesFilterPhoneCalls.cs @@ -24,8 +24,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Missed ? (Flags | 1) : (Flags & ~1); } @@ -39,7 +37,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); diff --git a/src/TeleSharp.TL/TL/TLInputMessagesFilterPhotoVideoDocuments.cs b/src/TeleSharp.TL/TL/TLInputMessagesFilterPhotoVideoDocuments.cs deleted file mode 100644 index 5b1c262..0000000 --- a/src/TeleSharp.TL/TL/TLInputMessagesFilterPhotoVideoDocuments.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using TeleSharp.TL; -namespace TeleSharp.TL -{ - [TLObject(-648121413)] - public class TLInputMessagesFilterPhotoVideoDocuments : TLAbsMessagesFilter - { - public override int Constructor - { - get - { - return -648121413; - } - } - - - - public void ComputeFlags() - { - - } - - public override void DeserializeBody(BinaryReader br) - { - - } - - public override void SerializeBody(BinaryWriter bw) - { - bw.Write(Constructor); - - } - } -} diff --git a/src/TeleSharp.TL/TL/TLInputNotifyAll.cs b/src/TeleSharp.TL/TL/TLInputNotifyAll.cs deleted file mode 100644 index d8651fa..0000000 --- a/src/TeleSharp.TL/TL/TLInputNotifyAll.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using TeleSharp.TL; -namespace TeleSharp.TL -{ - [TLObject(-1540769658)] - public class TLInputNotifyAll : TLAbsInputNotifyPeer - { - public override int Constructor - { - get - { - return -1540769658; - } - } - - - - public void ComputeFlags() - { - - } - - public override void DeserializeBody(BinaryReader br) - { - - } - - public override void SerializeBody(BinaryWriter bw) - { - bw.Write(Constructor); - - } - } -} diff --git a/src/TeleSharp.TL/TL/TLInputNotifyBroadcasts.cs b/src/TeleSharp.TL/TL/TLInputNotifyBroadcasts.cs new file mode 100644 index 0000000..06c5f95 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputNotifyBroadcasts.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1311015810)] + public class TLInputNotifyBroadcasts : TLAbsInputNotifyPeer + { + public override int Constructor + { + get + { + return -1311015810; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputPaymentCredentials.cs b/src/TeleSharp.TL/TL/TLInputPaymentCredentials.cs index 18e4cf8..48c4ce4 100644 --- a/src/TeleSharp.TL/TL/TLInputPaymentCredentials.cs +++ b/src/TeleSharp.TL/TL/TLInputPaymentCredentials.cs @@ -25,8 +25,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Save ? (Flags | 1) : (Flags & ~1); } @@ -41,7 +39,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); ObjectUtils.SerializeObject(Data, bw); diff --git a/src/TeleSharp.TL/TL/TLInputPaymentCredentialsAndroidPay.cs b/src/TeleSharp.TL/TL/TLInputPaymentCredentialsAndroidPay.cs new file mode 100644 index 0000000..4c35288 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputPaymentCredentialsAndroidPay.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-905587442)] + public class TLInputPaymentCredentialsAndroidPay : TLAbsInputPaymentCredentials + { + public override int Constructor + { + get + { + return -905587442; + } + } + + public TLDataJSON PaymentToken { get; set; } + public string GoogleTransactionId { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + PaymentToken = (TLDataJSON)ObjectUtils.DeserializeObject(br); + GoogleTransactionId = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(PaymentToken, bw); + StringUtil.Serialize(GoogleTransactionId, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputPaymentCredentialsApplePay.cs b/src/TeleSharp.TL/TL/TLInputPaymentCredentialsApplePay.cs new file mode 100644 index 0000000..f3372b9 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputPaymentCredentialsApplePay.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(178373535)] + public class TLInputPaymentCredentialsApplePay : TLAbsInputPaymentCredentials + { + public override int Constructor + { + get + { + return 178373535; + } + } + + public TLDataJSON PaymentData { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + PaymentData = (TLDataJSON)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(PaymentData, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputPeerChannelFromMessage.cs b/src/TeleSharp.TL/TL/TLInputPeerChannelFromMessage.cs new file mode 100644 index 0000000..2ac2367 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputPeerChannelFromMessage.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1667893317)] + public class TLInputPeerChannelFromMessage : TLAbsInputPeer + { + public override int Constructor + { + get + { + return -1667893317; + } + } + + public TLAbsInputPeer Peer { get; set; } + public int MsgId { get; set; } + public int ChannelId { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + MsgId = br.ReadInt32(); + ChannelId = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + bw.Write(MsgId); + bw.Write(ChannelId); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputPeerNotifyEventsAll.cs b/src/TeleSharp.TL/TL/TLInputPeerNotifyEventsAll.cs deleted file mode 100644 index 35df4ed..0000000 --- a/src/TeleSharp.TL/TL/TLInputPeerNotifyEventsAll.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using TeleSharp.TL; -namespace TeleSharp.TL -{ - [TLObject(-395694988)] - public class TLInputPeerNotifyEventsAll : TLAbsInputPeerNotifyEvents - { - public override int Constructor - { - get - { - return -395694988; - } - } - - - - public void ComputeFlags() - { - - } - - public override void DeserializeBody(BinaryReader br) - { - - } - - public override void SerializeBody(BinaryWriter bw) - { - bw.Write(Constructor); - - } - } -} diff --git a/src/TeleSharp.TL/TL/TLInputPeerNotifyEventsEmpty.cs b/src/TeleSharp.TL/TL/TLInputPeerNotifyEventsEmpty.cs deleted file mode 100644 index f913a8a..0000000 --- a/src/TeleSharp.TL/TL/TLInputPeerNotifyEventsEmpty.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using TeleSharp.TL; -namespace TeleSharp.TL -{ - [TLObject(-265263912)] - public class TLInputPeerNotifyEventsEmpty : TLAbsInputPeerNotifyEvents - { - public override int Constructor - { - get - { - return -265263912; - } - } - - - - public void ComputeFlags() - { - - } - - public override void DeserializeBody(BinaryReader br) - { - - } - - public override void SerializeBody(BinaryWriter bw) - { - bw.Write(Constructor); - - } - } -} diff --git a/src/TeleSharp.TL/TL/TLInputPeerNotifySettings.cs b/src/TeleSharp.TL/TL/TLInputPeerNotifySettings.cs index 4e580b7..87c34fb 100644 --- a/src/TeleSharp.TL/TL/TLInputPeerNotifySettings.cs +++ b/src/TeleSharp.TL/TL/TLInputPeerNotifySettings.cs @@ -7,51 +7,67 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(949182130)] + [TLObject(-1673717362)] public class TLInputPeerNotifySettings : TLObject { public override int Constructor { get { - return 949182130; + return -1673717362; } } public int Flags { get; set; } - public bool ShowPreviews { get; set; } - public bool Silent { get; set; } - public int MuteUntil { get; set; } + public bool? ShowPreviews { get; set; } + public bool? Silent { get; set; } + public int? MuteUntil { get; set; } public string Sound { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = ShowPreviews ? (Flags | 1) : (Flags & ~1); - Flags = Silent ? (Flags | 2) : (Flags & ~2); } public override void DeserializeBody(BinaryReader br) { Flags = br.ReadInt32(); - ShowPreviews = (Flags & 1) != 0; - Silent = (Flags & 2) != 0; - MuteUntil = br.ReadInt32(); - Sound = StringUtil.Deserialize(br); + if ((Flags & 1) != 0) + ShowPreviews = BoolUtil.Deserialize(br); + else + ShowPreviews = null; + + if ((Flags & 2) != 0) + Silent = BoolUtil.Deserialize(br); + else + Silent = null; + + if ((Flags & 4) != 0) + MuteUntil = br.ReadInt32(); + else + MuteUntil = null; + + if ((Flags & 8) != 0) + Sound = StringUtil.Deserialize(br); + else + Sound = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); - - - bw.Write(MuteUntil); - StringUtil.Serialize(Sound, bw); + if ((Flags & 1) != 0) + BoolUtil.Serialize(ShowPreviews.Value, bw); + if ((Flags & 2) != 0) + BoolUtil.Serialize(Silent.Value, bw); + if ((Flags & 4) != 0) + bw.Write(MuteUntil.Value); + if ((Flags & 8) != 0) + StringUtil.Serialize(Sound, bw); } } diff --git a/src/TeleSharp.TL/TL/TLInputPeerPhotoFileLocation.cs b/src/TeleSharp.TL/TL/TLInputPeerPhotoFileLocation.cs new file mode 100644 index 0000000..0be623a --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputPeerPhotoFileLocation.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(668375447)] + public class TLInputPeerPhotoFileLocation : TLAbsInputFileLocation + { + public override int Constructor + { + get + { + return 668375447; + } + } + + public int Flags { get; set; } + public bool Big { get; set; } + public TLAbsInputPeer Peer { get; set; } + public long VolumeId { get; set; } + public int LocalId { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Big = (Flags & 1) != 0; + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + VolumeId = br.ReadInt64(); + LocalId = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + ObjectUtils.SerializeObject(Peer, bw); + bw.Write(VolumeId); + bw.Write(LocalId); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputPeerUserFromMessage.cs b/src/TeleSharp.TL/TL/TLInputPeerUserFromMessage.cs new file mode 100644 index 0000000..963ef0e --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputPeerUserFromMessage.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(398123750)] + public class TLInputPeerUserFromMessage : TLAbsInputPeer + { + public override int Constructor + { + get + { + return 398123750; + } + } + + public TLAbsInputPeer Peer { get; set; } + public int MsgId { get; set; } + public int UserId { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + MsgId = br.ReadInt32(); + UserId = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + bw.Write(MsgId); + bw.Write(UserId); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputPhoto.cs b/src/TeleSharp.TL/TL/TLInputPhoto.cs index 906a6b9..883ae68 100644 --- a/src/TeleSharp.TL/TL/TLInputPhoto.cs +++ b/src/TeleSharp.TL/TL/TLInputPhoto.cs @@ -7,19 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-74070332)] + [TLObject(1001634122)] public class TLInputPhoto : TLAbsInputPhoto { public override int Constructor { get { - return -74070332; + return 1001634122; } } public long Id { get; set; } public long AccessHash { get; set; } + public byte[] FileReference { get; set; } public void ComputeFlags() @@ -31,6 +32,7 @@ namespace TeleSharp.TL { Id = br.ReadInt64(); AccessHash = br.ReadInt64(); + FileReference = BytesUtil.Deserialize(br); } @@ -39,6 +41,7 @@ namespace TeleSharp.TL bw.Write(Constructor); bw.Write(Id); bw.Write(AccessHash); + BytesUtil.Serialize(FileReference, bw); } } diff --git a/src/TeleSharp.TL/TL/TLInputPhotoFileLocation.cs b/src/TeleSharp.TL/TL/TLInputPhotoFileLocation.cs new file mode 100644 index 0000000..d5070e0 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputPhotoFileLocation.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1075322878)] + public class TLInputPhotoFileLocation : TLAbsInputFileLocation + { + public override int Constructor + { + get + { + return 1075322878; + } + } + + public long Id { get; set; } + public long AccessHash { get; set; } + public byte[] FileReference { get; set; } + public string ThumbSize { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Id = br.ReadInt64(); + AccessHash = br.ReadInt64(); + FileReference = BytesUtil.Deserialize(br); + ThumbSize = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Id); + bw.Write(AccessHash); + BytesUtil.Serialize(FileReference, bw); + StringUtil.Serialize(ThumbSize, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputPhotoLegacyFileLocation.cs b/src/TeleSharp.TL/TL/TLInputPhotoLegacyFileLocation.cs new file mode 100644 index 0000000..3f5bfd6 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputPhotoLegacyFileLocation.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-667654413)] + public class TLInputPhotoLegacyFileLocation : TLAbsInputFileLocation + { + public override int Constructor + { + get + { + return -667654413; + } + } + + public long Id { get; set; } + public long AccessHash { get; set; } + public byte[] FileReference { get; set; } + public long VolumeId { get; set; } + public int LocalId { get; set; } + public long Secret { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Id = br.ReadInt64(); + AccessHash = br.ReadInt64(); + FileReference = BytesUtil.Deserialize(br); + VolumeId = br.ReadInt64(); + LocalId = br.ReadInt32(); + Secret = br.ReadInt64(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Id); + bw.Write(AccessHash); + BytesUtil.Serialize(FileReference, bw); + bw.Write(VolumeId); + bw.Write(LocalId); + bw.Write(Secret); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputPrivacyKeyAddedByPhone.cs b/src/TeleSharp.TL/TL/TLInputPrivacyKeyAddedByPhone.cs new file mode 100644 index 0000000..c6bda09 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputPrivacyKeyAddedByPhone.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-786326563)] + public class TLInputPrivacyKeyAddedByPhone : TLAbsInputPrivacyKey + { + public override int Constructor + { + get + { + return -786326563; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputPrivacyKeyForwards.cs b/src/TeleSharp.TL/TL/TLInputPrivacyKeyForwards.cs new file mode 100644 index 0000000..467b14e --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputPrivacyKeyForwards.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1529000952)] + public class TLInputPrivacyKeyForwards : TLAbsInputPrivacyKey + { + public override int Constructor + { + get + { + return -1529000952; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputPrivacyKeyPhoneNumber.cs b/src/TeleSharp.TL/TL/TLInputPrivacyKeyPhoneNumber.cs new file mode 100644 index 0000000..8dbae0d --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputPrivacyKeyPhoneNumber.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(55761658)] + public class TLInputPrivacyKeyPhoneNumber : TLAbsInputPrivacyKey + { + public override int Constructor + { + get + { + return 55761658; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputPrivacyKeyPhoneP2P.cs b/src/TeleSharp.TL/TL/TLInputPrivacyKeyPhoneP2P.cs new file mode 100644 index 0000000..f26e5d8 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputPrivacyKeyPhoneP2P.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-610373422)] + public class TLInputPrivacyKeyPhoneP2P : TLAbsInputPrivacyKey + { + public override int Constructor + { + get + { + return -610373422; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputPrivacyKeyProfilePhoto.cs b/src/TeleSharp.TL/TL/TLInputPrivacyKeyProfilePhoto.cs new file mode 100644 index 0000000..1a9b103 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputPrivacyKeyProfilePhoto.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1461304012)] + public class TLInputPrivacyKeyProfilePhoto : TLAbsInputPrivacyKey + { + public override int Constructor + { + get + { + return 1461304012; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputPrivacyValueAllowChatParticipants.cs b/src/TeleSharp.TL/TL/TLInputPrivacyValueAllowChatParticipants.cs new file mode 100644 index 0000000..ac20cdc --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputPrivacyValueAllowChatParticipants.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1283572154)] + public class TLInputPrivacyValueAllowChatParticipants : TLAbsInputPrivacyRule + { + public override int Constructor + { + get + { + return 1283572154; + } + } + + public TLVector Chats { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Chats = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Chats, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputPrivacyValueDisallowChatParticipants.cs b/src/TeleSharp.TL/TL/TLInputPrivacyValueDisallowChatParticipants.cs new file mode 100644 index 0000000..20f2a36 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputPrivacyValueDisallowChatParticipants.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-668769361)] + public class TLInputPrivacyValueDisallowChatParticipants : TLAbsInputPrivacyRule + { + public override int Constructor + { + get + { + return -668769361; + } + } + + public TLVector Chats { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Chats = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Chats, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputReportReasonChildAbuse.cs b/src/TeleSharp.TL/TL/TLInputReportReasonChildAbuse.cs new file mode 100644 index 0000000..c1ede1f --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputReportReasonChildAbuse.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1376497949)] + public class TLInputReportReasonChildAbuse : TLAbsReportReason + { + public override int Constructor + { + get + { + return -1376497949; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputReportReasonCopyright.cs b/src/TeleSharp.TL/TL/TLInputReportReasonCopyright.cs new file mode 100644 index 0000000..cbd269d --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputReportReasonCopyright.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1685456582)] + public class TLInputReportReasonCopyright : TLAbsReportReason + { + public override int Constructor + { + get + { + return -1685456582; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputReportReasonGeoIrrelevant.cs b/src/TeleSharp.TL/TL/TLInputReportReasonGeoIrrelevant.cs new file mode 100644 index 0000000..a00c0d4 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputReportReasonGeoIrrelevant.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-606798099)] + public class TLInputReportReasonGeoIrrelevant : TLAbsReportReason + { + public override int Constructor + { + get + { + return -606798099; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputSecureFile.cs b/src/TeleSharp.TL/TL/TLInputSecureFile.cs new file mode 100644 index 0000000..6aaa49d --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputSecureFile.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1399317950)] + public class TLInputSecureFile : TLAbsInputSecureFile + { + public override int Constructor + { + get + { + return 1399317950; + } + } + + public long Id { get; set; } + public long AccessHash { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Id = br.ReadInt64(); + AccessHash = br.ReadInt64(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Id); + bw.Write(AccessHash); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputSecureFileLocation.cs b/src/TeleSharp.TL/TL/TLInputSecureFileLocation.cs new file mode 100644 index 0000000..21ff70a --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputSecureFileLocation.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-876089816)] + public class TLInputSecureFileLocation : TLAbsInputFileLocation + { + public override int Constructor + { + get + { + return -876089816; + } + } + + public long Id { get; set; } + public long AccessHash { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Id = br.ReadInt64(); + AccessHash = br.ReadInt64(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Id); + bw.Write(AccessHash); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputSecureFileUploaded.cs b/src/TeleSharp.TL/TL/TLInputSecureFileUploaded.cs new file mode 100644 index 0000000..27b5b20 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputSecureFileUploaded.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(859091184)] + public class TLInputSecureFileUploaded : TLAbsInputSecureFile + { + public override int Constructor + { + get + { + return 859091184; + } + } + + public long Id { get; set; } + public int Parts { get; set; } + public string Md5Checksum { get; set; } + public byte[] FileHash { get; set; } + public byte[] Secret { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Id = br.ReadInt64(); + Parts = br.ReadInt32(); + Md5Checksum = StringUtil.Deserialize(br); + FileHash = BytesUtil.Deserialize(br); + Secret = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Id); + bw.Write(Parts); + StringUtil.Serialize(Md5Checksum, bw); + BytesUtil.Serialize(FileHash, bw); + BytesUtil.Serialize(Secret, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputSecureValue.cs b/src/TeleSharp.TL/TL/TLInputSecureValue.cs new file mode 100644 index 0000000..376be96 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputSecureValue.cs @@ -0,0 +1,101 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-618540889)] + public class TLInputSecureValue : TLObject + { + public override int Constructor + { + get + { + return -618540889; + } + } + + public int Flags { get; set; } + public TLAbsSecureValueType Type { get; set; } + public TLSecureData Data { get; set; } + public TLAbsInputSecureFile FrontSide { get; set; } + public TLAbsInputSecureFile ReverseSide { get; set; } + public TLAbsInputSecureFile Selfie { get; set; } + public TLVector Translation { get; set; } + public TLVector Files { get; set; } + public TLAbsSecurePlainData PlainData { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Type = (TLAbsSecureValueType)ObjectUtils.DeserializeObject(br); + if ((Flags & 1) != 0) + Data = (TLSecureData)ObjectUtils.DeserializeObject(br); + else + Data = null; + + if ((Flags & 2) != 0) + FrontSide = (TLAbsInputSecureFile)ObjectUtils.DeserializeObject(br); + else + FrontSide = null; + + if ((Flags & 4) != 0) + ReverseSide = (TLAbsInputSecureFile)ObjectUtils.DeserializeObject(br); + else + ReverseSide = null; + + if ((Flags & 8) != 0) + Selfie = (TLAbsInputSecureFile)ObjectUtils.DeserializeObject(br); + else + Selfie = null; + + if ((Flags & 64) != 0) + Translation = (TLVector)ObjectUtils.DeserializeVector(br); + else + Translation = null; + + if ((Flags & 16) != 0) + Files = (TLVector)ObjectUtils.DeserializeVector(br); + else + Files = null; + + if ((Flags & 32) != 0) + PlainData = (TLAbsSecurePlainData)ObjectUtils.DeserializeObject(br); + else + PlainData = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + ObjectUtils.SerializeObject(Type, bw); + if ((Flags & 1) != 0) + ObjectUtils.SerializeObject(Data, bw); + if ((Flags & 2) != 0) + ObjectUtils.SerializeObject(FrontSide, bw); + if ((Flags & 4) != 0) + ObjectUtils.SerializeObject(ReverseSide, bw); + if ((Flags & 8) != 0) + ObjectUtils.SerializeObject(Selfie, bw); + if ((Flags & 64) != 0) + ObjectUtils.SerializeObject(Translation, bw); + if ((Flags & 16) != 0) + ObjectUtils.SerializeObject(Files, bw); + if ((Flags & 32) != 0) + ObjectUtils.SerializeObject(PlainData, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputSingleMedia.cs b/src/TeleSharp.TL/TL/TLInputSingleMedia.cs new file mode 100644 index 0000000..b5c3a96 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputSingleMedia.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(482797855)] + public class TLInputSingleMedia : TLObject + { + public override int Constructor + { + get + { + return 482797855; + } + } + + public int Flags { get; set; } + public TLAbsInputMedia Media { get; set; } + public long RandomId { get; set; } + public string Message { get; set; } + public TLVector Entities { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Media = (TLAbsInputMedia)ObjectUtils.DeserializeObject(br); + RandomId = br.ReadInt64(); + Message = StringUtil.Deserialize(br); + if ((Flags & 1) != 0) + Entities = (TLVector)ObjectUtils.DeserializeVector(br); + else + Entities = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + ObjectUtils.SerializeObject(Media, bw); + bw.Write(RandomId); + StringUtil.Serialize(Message, bw); + if ((Flags & 1) != 0) + ObjectUtils.SerializeObject(Entities, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputStickerSetAnimatedEmoji.cs b/src/TeleSharp.TL/TL/TLInputStickerSetAnimatedEmoji.cs new file mode 100644 index 0000000..1c94b01 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputStickerSetAnimatedEmoji.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(42402760)] + public class TLInputStickerSetAnimatedEmoji : TLAbsInputStickerSet + { + public override int Constructor + { + get + { + return 42402760; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputStickerSetItem.cs b/src/TeleSharp.TL/TL/TLInputStickerSetItem.cs index 80d212f..0e34edd 100644 --- a/src/TeleSharp.TL/TL/TLInputStickerSetItem.cs +++ b/src/TeleSharp.TL/TL/TLInputStickerSetItem.cs @@ -26,8 +26,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = MaskCoords != null ? (Flags | 1) : (Flags & ~1); } @@ -47,7 +45,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); ObjectUtils.SerializeObject(Document, bw); StringUtil.Serialize(Emoji, bw); diff --git a/src/TeleSharp.TL/TL/TLFileLocation.cs b/src/TeleSharp.TL/TL/TLInputStickerSetThumb.cs similarity index 70% rename from src/TeleSharp.TL/TL/TLFileLocation.cs rename to src/TeleSharp.TL/TL/TLInputStickerSetThumb.cs index bea3dbd..6ec2529 100644 --- a/src/TeleSharp.TL/TL/TLFileLocation.cs +++ b/src/TeleSharp.TL/TL/TLInputStickerSetThumb.cs @@ -7,21 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(1406570614)] - public class TLFileLocation : TLAbsFileLocation + [TLObject(230353641)] + public class TLInputStickerSetThumb : TLAbsInputFileLocation { public override int Constructor { get { - return 1406570614; + return 230353641; } } - public int DcId { get; set; } + public TLAbsInputStickerSet Stickerset { get; set; } public long VolumeId { get; set; } public int LocalId { get; set; } - public long Secret { get; set; } public void ComputeFlags() @@ -31,20 +30,18 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { - DcId = br.ReadInt32(); + Stickerset = (TLAbsInputStickerSet)ObjectUtils.DeserializeObject(br); VolumeId = br.ReadInt64(); LocalId = br.ReadInt32(); - Secret = br.ReadInt64(); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - bw.Write(DcId); + ObjectUtils.SerializeObject(Stickerset, bw); bw.Write(VolumeId); bw.Write(LocalId); - bw.Write(Secret); } } diff --git a/src/TeleSharp.TL/TL/TLInputTakeoutFileLocation.cs b/src/TeleSharp.TL/TL/TLInputTakeoutFileLocation.cs new file mode 100644 index 0000000..9fad457 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputTakeoutFileLocation.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(700340377)] + public class TLInputTakeoutFileLocation : TLAbsInputFileLocation + { + public override int Constructor + { + get + { + return 700340377; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputTheme.cs b/src/TeleSharp.TL/TL/TLInputTheme.cs new file mode 100644 index 0000000..2c0908b --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputTheme.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1012306921)] + public class TLInputTheme : TLAbsInputTheme + { + public override int Constructor + { + get + { + return 1012306921; + } + } + + public long Id { get; set; } + public long AccessHash { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Id = br.ReadInt64(); + AccessHash = br.ReadInt64(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Id); + bw.Write(AccessHash); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputThemeSettings.cs b/src/TeleSharp.TL/TL/TLInputThemeSettings.cs new file mode 100644 index 0000000..5264ba9 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputThemeSettings.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1118798639)] + public class TLInputThemeSettings : TLObject + { + public override int Constructor + { + get + { + return -1118798639; + } + } + + public int Flags { get; set; } + public TLAbsBaseTheme BaseTheme { get; set; } + public int AccentColor { get; set; } + public int? MessageTopColor { get; set; } + public int? MessageBottomColor { get; set; } + public TLAbsInputWallPaper Wallpaper { get; set; } + public TLWallPaperSettings WallpaperSettings { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + BaseTheme = (TLAbsBaseTheme)ObjectUtils.DeserializeObject(br); + AccentColor = br.ReadInt32(); + if ((Flags & 1) != 0) + MessageTopColor = br.ReadInt32(); + else + MessageTopColor = null; + + if ((Flags & 1) != 0) + MessageBottomColor = br.ReadInt32(); + else + MessageBottomColor = null; + + if ((Flags & 2) != 0) + Wallpaper = (TLAbsInputWallPaper)ObjectUtils.DeserializeObject(br); + else + Wallpaper = null; + + if ((Flags & 2) != 0) + WallpaperSettings = (TLWallPaperSettings)ObjectUtils.DeserializeObject(br); + else + WallpaperSettings = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + ObjectUtils.SerializeObject(BaseTheme, bw); + bw.Write(AccentColor); + if ((Flags & 1) != 0) + bw.Write(MessageTopColor.Value); + if ((Flags & 1) != 0) + bw.Write(MessageBottomColor.Value); + if ((Flags & 2) != 0) + ObjectUtils.SerializeObject(Wallpaper, bw); + if ((Flags & 2) != 0) + ObjectUtils.SerializeObject(WallpaperSettings, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputThemeSlug.cs b/src/TeleSharp.TL/TL/TLInputThemeSlug.cs new file mode 100644 index 0000000..ba247aa --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputThemeSlug.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-175567375)] + public class TLInputThemeSlug : TLAbsInputTheme + { + public override int Constructor + { + get + { + return -175567375; + } + } + + public string Slug { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Slug = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Slug, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelParticipantModerator.cs b/src/TeleSharp.TL/TL/TLInputUserFromMessage.cs similarity index 62% rename from src/TeleSharp.TL/TL/TLChannelParticipantModerator.cs rename to src/TeleSharp.TL/TL/TLInputUserFromMessage.cs index 61b4dfc..bea0346 100644 --- a/src/TeleSharp.TL/TL/TLChannelParticipantModerator.cs +++ b/src/TeleSharp.TL/TL/TLInputUserFromMessage.cs @@ -7,20 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1861910545)] - public class TLChannelParticipantModerator : TLAbsChannelParticipant + [TLObject(756118935)] + public class TLInputUserFromMessage : TLAbsInputUser { public override int Constructor { get { - return -1861910545; + return 756118935; } } + public TLAbsInputPeer Peer { get; set; } + public int MsgId { get; set; } public int UserId { get; set; } - public int InviterId { get; set; } - public int Date { get; set; } public void ComputeFlags() @@ -30,18 +30,18 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { + Peer = (TLAbsInputPeer)ObjectUtils.DeserializeObject(br); + MsgId = br.ReadInt32(); UserId = br.ReadInt32(); - InviterId = br.ReadInt32(); - Date = br.ReadInt32(); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + bw.Write(MsgId); bw.Write(UserId); - bw.Write(InviterId); - bw.Write(Date); } } diff --git a/src/TeleSharp.TL/TL/TLInputWallPaper.cs b/src/TeleSharp.TL/TL/TLInputWallPaper.cs new file mode 100644 index 0000000..9d4b202 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputWallPaper.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-433014407)] + public class TLInputWallPaper : TLAbsInputWallPaper + { + public override int Constructor + { + get + { + return -433014407; + } + } + + public long Id { get; set; } + public long AccessHash { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Id = br.ReadInt64(); + AccessHash = br.ReadInt64(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Id); + bw.Write(AccessHash); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputWallPaperNoFile.cs b/src/TeleSharp.TL/TL/TLInputWallPaperNoFile.cs new file mode 100644 index 0000000..b622751 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputWallPaperNoFile.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-2077770836)] + public class TLInputWallPaperNoFile : TLAbsInputWallPaper + { + public override int Constructor + { + get + { + return -2077770836; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputWallPaperSlug.cs b/src/TeleSharp.TL/TL/TLInputWallPaperSlug.cs new file mode 100644 index 0000000..5de7023 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputWallPaperSlug.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1913199744)] + public class TLInputWallPaperSlug : TLAbsInputWallPaper + { + public override int Constructor + { + get + { + return 1913199744; + } + } + + public string Slug { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Slug = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Slug, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputWebFileGeoPointLocation.cs b/src/TeleSharp.TL/TL/TLInputWebFileGeoPointLocation.cs new file mode 100644 index 0000000..3f0bd79 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLInputWebFileGeoPointLocation.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1625153079)] + public class TLInputWebFileGeoPointLocation : TLAbsInputWebFileLocation + { + public override int Constructor + { + get + { + return -1625153079; + } + } + + public TLAbsInputGeoPoint GeoPoint { get; set; } + public long AccessHash { get; set; } + public int W { get; set; } + public int H { get; set; } + public int Zoom { get; set; } + public int Scale { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + GeoPoint = (TLAbsInputGeoPoint)ObjectUtils.DeserializeObject(br); + AccessHash = br.ReadInt64(); + W = br.ReadInt32(); + H = br.ReadInt32(); + Zoom = br.ReadInt32(); + Scale = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(GeoPoint, bw); + bw.Write(AccessHash); + bw.Write(W); + bw.Write(H); + bw.Write(Zoom); + bw.Write(Scale); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLInputWebFileLocation.cs b/src/TeleSharp.TL/TL/TLInputWebFileLocation.cs index bc70cde..4a9075c 100644 --- a/src/TeleSharp.TL/TL/TLInputWebFileLocation.cs +++ b/src/TeleSharp.TL/TL/TLInputWebFileLocation.cs @@ -8,7 +8,7 @@ using TeleSharp.TL; namespace TeleSharp.TL { [TLObject(-1036396922)] - public class TLInputWebFileLocation : TLObject + public class TLInputWebFileLocation : TLAbsInputWebFileLocation { public override int Constructor { diff --git a/src/TeleSharp.TL/TL/TLInvoice.cs b/src/TeleSharp.TL/TL/TLInvoice.cs index b12a2f5..a21fa43 100644 --- a/src/TeleSharp.TL/TL/TLInvoice.cs +++ b/src/TeleSharp.TL/TL/TLInvoice.cs @@ -25,19 +25,14 @@ namespace TeleSharp.TL public bool EmailRequested { get; set; } public bool ShippingAddressRequested { get; set; } public bool Flexible { get; set; } + public bool PhoneToProvider { get; set; } + public bool EmailToProvider { get; set; } public string Currency { get; set; } public TLVector Prices { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Test ? (Flags | 1) : (Flags & ~1); - Flags = NameRequested ? (Flags | 2) : (Flags & ~2); - Flags = PhoneRequested ? (Flags | 4) : (Flags & ~4); - Flags = EmailRequested ? (Flags | 8) : (Flags & ~8); - Flags = ShippingAddressRequested ? (Flags | 16) : (Flags & ~16); - Flags = Flexible ? (Flags | 32) : (Flags & ~32); } @@ -50,6 +45,8 @@ namespace TeleSharp.TL EmailRequested = (Flags & 8) != 0; ShippingAddressRequested = (Flags & 16) != 0; Flexible = (Flags & 32) != 0; + PhoneToProvider = (Flags & 64) != 0; + EmailToProvider = (Flags & 128) != 0; Currency = StringUtil.Deserialize(br); Prices = (TLVector)ObjectUtils.DeserializeVector(br); @@ -58,7 +55,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); @@ -66,6 +62,8 @@ namespace TeleSharp.TL + + StringUtil.Serialize(Currency, bw); ObjectUtils.SerializeObject(Prices, bw); diff --git a/src/TeleSharp.TL/TL/TLJsonArray.cs b/src/TeleSharp.TL/TL/TLJsonArray.cs new file mode 100644 index 0000000..db325b9 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLJsonArray.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-146520221)] + public class TLJsonArray : TLAbsJSONValue + { + public override int Constructor + { + get + { + return -146520221; + } + } + + public TLVector Value { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Value = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Value, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLJsonBool.cs b/src/TeleSharp.TL/TL/TLJsonBool.cs new file mode 100644 index 0000000..04ed273 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLJsonBool.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-952869270)] + public class TLJsonBool : TLAbsJSONValue + { + public override int Constructor + { + get + { + return -952869270; + } + } + + public bool Value { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Value = BoolUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + BoolUtil.Serialize(Value, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLJsonNull.cs b/src/TeleSharp.TL/TL/TLJsonNull.cs new file mode 100644 index 0000000..846506c --- /dev/null +++ b/src/TeleSharp.TL/TL/TLJsonNull.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1064139624)] + public class TLJsonNull : TLAbsJSONValue + { + public override int Constructor + { + get + { + return 1064139624; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLJsonNumber.cs b/src/TeleSharp.TL/TL/TLJsonNumber.cs new file mode 100644 index 0000000..a26625c --- /dev/null +++ b/src/TeleSharp.TL/TL/TLJsonNumber.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(736157604)] + public class TLJsonNumber : TLAbsJSONValue + { + public override int Constructor + { + get + { + return 736157604; + } + } + + public double Value { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Value = br.ReadDouble(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Value); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLJsonObject.cs b/src/TeleSharp.TL/TL/TLJsonObject.cs new file mode 100644 index 0000000..34e0a39 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLJsonObject.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1715350371)] + public class TLJsonObject : TLAbsJSONValue + { + public override int Constructor + { + get + { + return -1715350371; + } + } + + public TLVector Value { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Value = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Value, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLJsonObjectValue.cs b/src/TeleSharp.TL/TL/TLJsonObjectValue.cs new file mode 100644 index 0000000..0fa0b14 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLJsonObjectValue.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1059185703)] + public class TLJsonObjectValue : TLObject + { + public override int Constructor + { + get + { + return -1059185703; + } + } + + public string Key { get; set; } + public TLAbsJSONValue Value { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Key = StringUtil.Deserialize(br); + Value = (TLAbsJSONValue)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Key, bw); + ObjectUtils.SerializeObject(Value, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLJsonString.cs b/src/TeleSharp.TL/TL/TLJsonString.cs new file mode 100644 index 0000000..1f75ce7 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLJsonString.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1222740358)] + public class TLJsonString : TLAbsJSONValue + { + public override int Constructor + { + get + { + return -1222740358; + } + } + + public string Value { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Value = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Value, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLKeyboardButtonSwitchInline.cs b/src/TeleSharp.TL/TL/TLKeyboardButtonSwitchInline.cs index ba06ddb..62417ee 100644 --- a/src/TeleSharp.TL/TL/TLKeyboardButtonSwitchInline.cs +++ b/src/TeleSharp.TL/TL/TLKeyboardButtonSwitchInline.cs @@ -26,8 +26,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = SamePeer ? (Flags | 1) : (Flags & ~1); } @@ -43,7 +41,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); StringUtil.Serialize(Text, bw); diff --git a/src/TeleSharp.TL/TL/TLKeyboardButtonUrlAuth.cs b/src/TeleSharp.TL/TL/TLKeyboardButtonUrlAuth.cs new file mode 100644 index 0000000..f2f94b4 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLKeyboardButtonUrlAuth.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(280464681)] + public class TLKeyboardButtonUrlAuth : TLAbsKeyboardButton + { + public override int Constructor + { + get + { + return 280464681; + } + } + + public int Flags { get; set; } + public string Text { get; set; } + public string FwdText { get; set; } + public string Url { get; set; } + public int ButtonId { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Text = StringUtil.Deserialize(br); + if ((Flags & 1) != 0) + FwdText = StringUtil.Deserialize(br); + else + FwdText = null; + + Url = StringUtil.Deserialize(br); + ButtonId = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + StringUtil.Serialize(Text, bw); + if ((Flags & 1) != 0) + StringUtil.Serialize(FwdText, bw); + StringUtil.Serialize(Url, bw); + bw.Write(ButtonId); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLLangPackDifference.cs b/src/TeleSharp.TL/TL/TLLangPackDifference.cs new file mode 100644 index 0000000..65355b2 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLLangPackDifference.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-209337866)] + public class TLLangPackDifference : TLObject + { + public override int Constructor + { + get + { + return -209337866; + } + } + + public string LangCode { get; set; } + public int FromVersion { get; set; } + public int Version { get; set; } + public TLVector Strings { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + LangCode = StringUtil.Deserialize(br); + FromVersion = br.ReadInt32(); + Version = br.ReadInt32(); + Strings = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(LangCode, bw); + bw.Write(FromVersion); + bw.Write(Version); + ObjectUtils.SerializeObject(Strings, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLLangPackLanguage.cs b/src/TeleSharp.TL/TL/TLLangPackLanguage.cs new file mode 100644 index 0000000..59536f8 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLLangPackLanguage.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-288727837)] + public class TLLangPackLanguage : TLObject + { + public override int Constructor + { + get + { + return -288727837; + } + } + + public int Flags { get; set; } + public bool Official { get; set; } + public bool Rtl { get; set; } + public bool Beta { get; set; } + public string Name { get; set; } + public string NativeName { get; set; } + public string LangCode { get; set; } + public string BaseLangCode { get; set; } + public string PluralCode { get; set; } + public int StringsCount { get; set; } + public int TranslatedCount { get; set; } + public string TranslationsUrl { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Official = (Flags & 1) != 0; + Rtl = (Flags & 4) != 0; + Beta = (Flags & 8) != 0; + Name = StringUtil.Deserialize(br); + NativeName = StringUtil.Deserialize(br); + LangCode = StringUtil.Deserialize(br); + if ((Flags & 2) != 0) + BaseLangCode = StringUtil.Deserialize(br); + else + BaseLangCode = null; + + PluralCode = StringUtil.Deserialize(br); + StringsCount = br.ReadInt32(); + TranslatedCount = br.ReadInt32(); + TranslationsUrl = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + + + StringUtil.Serialize(Name, bw); + StringUtil.Serialize(NativeName, bw); + StringUtil.Serialize(LangCode, bw); + if ((Flags & 2) != 0) + StringUtil.Serialize(BaseLangCode, bw); + StringUtil.Serialize(PluralCode, bw); + bw.Write(StringsCount); + bw.Write(TranslatedCount); + StringUtil.Serialize(TranslationsUrl, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLLangPackString.cs b/src/TeleSharp.TL/TL/TLLangPackString.cs new file mode 100644 index 0000000..bd01a2a --- /dev/null +++ b/src/TeleSharp.TL/TL/TLLangPackString.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-892239370)] + public class TLLangPackString : TLAbsLangPackString + { + public override int Constructor + { + get + { + return -892239370; + } + } + + public string Key { get; set; } + public string Value { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Key = StringUtil.Deserialize(br); + Value = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Key, bw); + StringUtil.Serialize(Value, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLLangPackStringDeleted.cs b/src/TeleSharp.TL/TL/TLLangPackStringDeleted.cs new file mode 100644 index 0000000..c9db00f --- /dev/null +++ b/src/TeleSharp.TL/TL/TLLangPackStringDeleted.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(695856818)] + public class TLLangPackStringDeleted : TLAbsLangPackString + { + public override int Constructor + { + get + { + return 695856818; + } + } + + public string Key { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Key = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Key, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLLangPackStringPluralized.cs b/src/TeleSharp.TL/TL/TLLangPackStringPluralized.cs new file mode 100644 index 0000000..eefb4c8 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLLangPackStringPluralized.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1816636575)] + public class TLLangPackStringPluralized : TLAbsLangPackString + { + public override int Constructor + { + get + { + return 1816636575; + } + } + + public int Flags { get; set; } + public string Key { get; set; } + public string ZeroValue { get; set; } + public string OneValue { get; set; } + public string TwoValue { get; set; } + public string FewValue { get; set; } + public string ManyValue { get; set; } + public string OtherValue { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Key = StringUtil.Deserialize(br); + if ((Flags & 1) != 0) + ZeroValue = StringUtil.Deserialize(br); + else + ZeroValue = null; + + if ((Flags & 2) != 0) + OneValue = StringUtil.Deserialize(br); + else + OneValue = null; + + if ((Flags & 4) != 0) + TwoValue = StringUtil.Deserialize(br); + else + TwoValue = null; + + if ((Flags & 8) != 0) + FewValue = StringUtil.Deserialize(br); + else + FewValue = null; + + if ((Flags & 16) != 0) + ManyValue = StringUtil.Deserialize(br); + else + ManyValue = null; + + OtherValue = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + StringUtil.Serialize(Key, bw); + if ((Flags & 1) != 0) + StringUtil.Serialize(ZeroValue, bw); + if ((Flags & 2) != 0) + StringUtil.Serialize(OneValue, bw); + if ((Flags & 4) != 0) + StringUtil.Serialize(TwoValue, bw); + if ((Flags & 8) != 0) + StringUtil.Serialize(FewValue, bw); + if ((Flags & 16) != 0) + StringUtil.Serialize(ManyValue, bw); + StringUtil.Serialize(OtherValue, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLMessage.cs b/src/TeleSharp.TL/TL/TLMessage.cs index dd3388e..e92a428 100644 --- a/src/TeleSharp.TL/TL/TLMessage.cs +++ b/src/TeleSharp.TL/TL/TLMessage.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1063525281)] + [TLObject(1160515173)] public class TLMessage : TLAbsMessage { public override int Constructor { get { - return -1063525281; + return 1160515173; } } @@ -24,6 +24,9 @@ namespace TeleSharp.TL public bool MediaUnread { get; set; } public bool Silent { get; set; } public bool Post { get; set; } + public bool FromScheduled { get; set; } + public bool Legacy { get; set; } + public bool EditHide { get; set; } public int Id { get; set; } public int? FromId { get; set; } public TLAbsPeer ToId { get; set; } @@ -37,25 +40,13 @@ namespace TeleSharp.TL public TLVector Entities { get; set; } public int? Views { get; set; } public int? EditDate { get; set; } + public string PostAuthor { get; set; } + public long? GroupedId { get; set; } + public TLVector RestrictionReason { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Out ? (Flags | 2) : (Flags & ~2); - Flags = Mentioned ? (Flags | 16) : (Flags & ~16); - Flags = MediaUnread ? (Flags | 32) : (Flags & ~32); - Flags = Silent ? (Flags | 8192) : (Flags & ~8192); - Flags = Post ? (Flags | 16384) : (Flags & ~16384); - Flags = FromId != null ? (Flags | 256) : (Flags & ~256); - Flags = FwdFrom != null ? (Flags | 4) : (Flags & ~4); - Flags = ViaBotId != null ? (Flags | 2048) : (Flags & ~2048); - Flags = ReplyToMsgId != null ? (Flags | 8) : (Flags & ~8); - Flags = Media != null ? (Flags | 512) : (Flags & ~512); - Flags = ReplyMarkup != null ? (Flags | 64) : (Flags & ~64); - Flags = Entities != null ? (Flags | 128) : (Flags & ~128); - Flags = Views != null ? (Flags | 1024) : (Flags & ~1024); - Flags = EditDate != null ? (Flags | 32768) : (Flags & ~32768); } @@ -67,6 +58,9 @@ namespace TeleSharp.TL MediaUnread = (Flags & 32) != 0; Silent = (Flags & 8192) != 0; Post = (Flags & 16384) != 0; + FromScheduled = (Flags & 262144) != 0; + Legacy = (Flags & 524288) != 0; + EditHide = (Flags & 2097152) != 0; Id = br.ReadInt32(); if ((Flags & 256) != 0) FromId = br.ReadInt32(); @@ -116,19 +110,36 @@ namespace TeleSharp.TL else EditDate = null; + if ((Flags & 65536) != 0) + PostAuthor = StringUtil.Deserialize(br); + else + PostAuthor = null; + + if ((Flags & 131072) != 0) + GroupedId = br.ReadInt64(); + else + GroupedId = null; + + if ((Flags & 4194304) != 0) + RestrictionReason = (TLVector)ObjectUtils.DeserializeVector(br); + else + RestrictionReason = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + + + bw.Write(Id); if ((Flags & 256) != 0) bw.Write(FromId.Value); @@ -151,6 +162,12 @@ namespace TeleSharp.TL bw.Write(Views.Value); if ((Flags & 32768) != 0) bw.Write(EditDate.Value); + if ((Flags & 65536) != 0) + StringUtil.Serialize(PostAuthor, bw); + if ((Flags & 131072) != 0) + bw.Write(GroupedId.Value); + if ((Flags & 4194304) != 0) + ObjectUtils.SerializeObject(RestrictionReason, bw); } } diff --git a/src/TeleSharp.TL/TL/TLMessageActionBotAllowed.cs b/src/TeleSharp.TL/TL/TLMessageActionBotAllowed.cs new file mode 100644 index 0000000..002a086 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLMessageActionBotAllowed.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1410748418)] + public class TLMessageActionBotAllowed : TLAbsMessageAction + { + public override int Constructor + { + get + { + return -1410748418; + } + } + + public string Domain { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Domain = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Domain, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLMessageActionContactSignUp.cs b/src/TeleSharp.TL/TL/TLMessageActionContactSignUp.cs new file mode 100644 index 0000000..5c50ea5 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLMessageActionContactSignUp.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-202219658)] + public class TLMessageActionContactSignUp : TLAbsMessageAction + { + public override int Constructor + { + get + { + return -202219658; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLMessageActionCustomAction.cs b/src/TeleSharp.TL/TL/TLMessageActionCustomAction.cs new file mode 100644 index 0000000..729554b --- /dev/null +++ b/src/TeleSharp.TL/TL/TLMessageActionCustomAction.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-85549226)] + public class TLMessageActionCustomAction : TLAbsMessageAction + { + public override int Constructor + { + get + { + return -85549226; + } + } + + public string Message { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Message = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Message, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLMessageActionPaymentSentMe.cs b/src/TeleSharp.TL/TL/TLMessageActionPaymentSentMe.cs index 229cb13..69410cd 100644 --- a/src/TeleSharp.TL/TL/TLMessageActionPaymentSentMe.cs +++ b/src/TeleSharp.TL/TL/TLMessageActionPaymentSentMe.cs @@ -29,9 +29,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Info != null ? (Flags | 1) : (Flags & ~1); - Flags = ShippingOptionId != null ? (Flags | 2) : (Flags & ~2); } @@ -58,7 +55,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); StringUtil.Serialize(Currency, bw); bw.Write(TotalAmount); diff --git a/src/TeleSharp.TL/TL/TLMessageActionPhoneCall.cs b/src/TeleSharp.TL/TL/TLMessageActionPhoneCall.cs index 5352869..e6d9ce2 100644 --- a/src/TeleSharp.TL/TL/TLMessageActionPhoneCall.cs +++ b/src/TeleSharp.TL/TL/TLMessageActionPhoneCall.cs @@ -19,6 +19,7 @@ namespace TeleSharp.TL } public int Flags { get; set; } + public bool Video { get; set; } public long CallId { get; set; } public TLAbsPhoneCallDiscardReason Reason { get; set; } public int? Duration { get; set; } @@ -26,15 +27,13 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Reason != null ? (Flags | 1) : (Flags & ~1); - Flags = Duration != null ? (Flags | 2) : (Flags & ~2); } public override void DeserializeBody(BinaryReader br) { Flags = br.ReadInt32(); + Video = (Flags & 4) != 0; CallId = br.ReadInt64(); if ((Flags & 1) != 0) Reason = (TLAbsPhoneCallDiscardReason)ObjectUtils.DeserializeObject(br); @@ -52,8 +51,8 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + bw.Write(CallId); if ((Flags & 1) != 0) ObjectUtils.SerializeObject(Reason, bw); diff --git a/src/TeleSharp.TL/TL/TLMessageActionScreenshotTaken.cs b/src/TeleSharp.TL/TL/TLMessageActionScreenshotTaken.cs new file mode 100644 index 0000000..b010aab --- /dev/null +++ b/src/TeleSharp.TL/TL/TLMessageActionScreenshotTaken.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1200788123)] + public class TLMessageActionScreenshotTaken : TLAbsMessageAction + { + public override int Constructor + { + get + { + return 1200788123; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLMessageActionSecureValuesSent.cs b/src/TeleSharp.TL/TL/TLMessageActionSecureValuesSent.cs new file mode 100644 index 0000000..5b818dd --- /dev/null +++ b/src/TeleSharp.TL/TL/TLMessageActionSecureValuesSent.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-648257196)] + public class TLMessageActionSecureValuesSent : TLAbsMessageAction + { + public override int Constructor + { + get + { + return -648257196; + } + } + + public TLVector Types { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Types = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Types, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLMessageActionSecureValuesSentMe.cs b/src/TeleSharp.TL/TL/TLMessageActionSecureValuesSentMe.cs new file mode 100644 index 0000000..50bff15 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLMessageActionSecureValuesSentMe.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(455635795)] + public class TLMessageActionSecureValuesSentMe : TLAbsMessageAction + { + public override int Constructor + { + get + { + return 455635795; + } + } + + public TLVector Values { get; set; } + public TLSecureCredentialsEncrypted Credentials { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Values = (TLVector)ObjectUtils.DeserializeVector(br); + Credentials = (TLSecureCredentialsEncrypted)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Values, bw); + ObjectUtils.SerializeObject(Credentials, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLMessageEntityBlockquote.cs b/src/TeleSharp.TL/TL/TLMessageEntityBlockquote.cs new file mode 100644 index 0000000..0b28c5e --- /dev/null +++ b/src/TeleSharp.TL/TL/TLMessageEntityBlockquote.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(34469328)] + public class TLMessageEntityBlockquote : TLAbsMessageEntity + { + public override int Constructor + { + get + { + return 34469328; + } + } + + public int Offset { get; set; } + public int Length { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Offset = br.ReadInt32(); + Length = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Offset); + bw.Write(Length); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLMessageEntityCashtag.cs b/src/TeleSharp.TL/TL/TLMessageEntityCashtag.cs new file mode 100644 index 0000000..457f202 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLMessageEntityCashtag.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1280209983)] + public class TLMessageEntityCashtag : TLAbsMessageEntity + { + public override int Constructor + { + get + { + return 1280209983; + } + } + + public int Offset { get; set; } + public int Length { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Offset = br.ReadInt32(); + Length = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Offset); + bw.Write(Length); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLMessageEntityPhone.cs b/src/TeleSharp.TL/TL/TLMessageEntityPhone.cs new file mode 100644 index 0000000..ceb33bb --- /dev/null +++ b/src/TeleSharp.TL/TL/TLMessageEntityPhone.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1687559349)] + public class TLMessageEntityPhone : TLAbsMessageEntity + { + public override int Constructor + { + get + { + return -1687559349; + } + } + + public int Offset { get; set; } + public int Length { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Offset = br.ReadInt32(); + Length = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Offset); + bw.Write(Length); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLMessageEntityStrike.cs b/src/TeleSharp.TL/TL/TLMessageEntityStrike.cs new file mode 100644 index 0000000..850d068 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLMessageEntityStrike.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1090087980)] + public class TLMessageEntityStrike : TLAbsMessageEntity + { + public override int Constructor + { + get + { + return -1090087980; + } + } + + public int Offset { get; set; } + public int Length { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Offset = br.ReadInt32(); + Length = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Offset); + bw.Write(Length); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLMessageEntityUnderline.cs b/src/TeleSharp.TL/TL/TLMessageEntityUnderline.cs new file mode 100644 index 0000000..35297b0 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLMessageEntityUnderline.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1672577397)] + public class TLMessageEntityUnderline : TLAbsMessageEntity + { + public override int Constructor + { + get + { + return -1672577397; + } + } + + public int Offset { get; set; } + public int Length { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Offset = br.ReadInt32(); + Length = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Offset); + bw.Write(Length); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLMessageFwdHeader.cs b/src/TeleSharp.TL/TL/TLMessageFwdHeader.cs index 622bd0c..5326f06 100644 --- a/src/TeleSharp.TL/TL/TLMessageFwdHeader.cs +++ b/src/TeleSharp.TL/TL/TLMessageFwdHeader.cs @@ -7,30 +7,30 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-947462709)] + [TLObject(-332168592)] public class TLMessageFwdHeader : TLObject { public override int Constructor { get { - return -947462709; + return -332168592; } } public int Flags { get; set; } public int? FromId { get; set; } + public string FromName { get; set; } public int Date { get; set; } public int? ChannelId { get; set; } public int? ChannelPost { get; set; } + public string PostAuthor { get; set; } + public TLAbsPeer SavedFromPeer { get; set; } + public int? SavedFromMsgId { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = FromId != null ? (Flags | 1) : (Flags & ~1); - Flags = ChannelId != null ? (Flags | 2) : (Flags & ~2); - Flags = ChannelPost != null ? (Flags | 4) : (Flags & ~4); } @@ -42,6 +42,11 @@ namespace TeleSharp.TL else FromId = null; + if ((Flags & 32) != 0) + FromName = StringUtil.Deserialize(br); + else + FromName = null; + Date = br.ReadInt32(); if ((Flags & 2) != 0) ChannelId = br.ReadInt32(); @@ -53,21 +58,43 @@ namespace TeleSharp.TL else ChannelPost = null; + if ((Flags & 8) != 0) + PostAuthor = StringUtil.Deserialize(br); + else + PostAuthor = null; + + if ((Flags & 16) != 0) + SavedFromPeer = (TLAbsPeer)ObjectUtils.DeserializeObject(br); + else + SavedFromPeer = null; + + if ((Flags & 16) != 0) + SavedFromMsgId = br.ReadInt32(); + else + SavedFromMsgId = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); if ((Flags & 1) != 0) bw.Write(FromId.Value); + if ((Flags & 32) != 0) + StringUtil.Serialize(FromName, bw); bw.Write(Date); if ((Flags & 2) != 0) bw.Write(ChannelId.Value); if ((Flags & 4) != 0) bw.Write(ChannelPost.Value); + if ((Flags & 8) != 0) + StringUtil.Serialize(PostAuthor, bw); + if ((Flags & 16) != 0) + ObjectUtils.SerializeObject(SavedFromPeer, bw); + if ((Flags & 16) != 0) + bw.Write(SavedFromMsgId.Value); } } diff --git a/src/TeleSharp.TL/TL/TLMessageMediaContact.cs b/src/TeleSharp.TL/TL/TLMessageMediaContact.cs index 1a5c8aa..04119e4 100644 --- a/src/TeleSharp.TL/TL/TLMessageMediaContact.cs +++ b/src/TeleSharp.TL/TL/TLMessageMediaContact.cs @@ -7,20 +7,21 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(1585262393)] + [TLObject(-873313984)] public class TLMessageMediaContact : TLAbsMessageMedia { public override int Constructor { get { - return 1585262393; + return -873313984; } } public string PhoneNumber { get; set; } public string FirstName { get; set; } public string LastName { get; set; } + public string Vcard { get; set; } public int UserId { get; set; } @@ -34,6 +35,7 @@ namespace TeleSharp.TL PhoneNumber = StringUtil.Deserialize(br); FirstName = StringUtil.Deserialize(br); LastName = StringUtil.Deserialize(br); + Vcard = StringUtil.Deserialize(br); UserId = br.ReadInt32(); } @@ -44,6 +46,7 @@ namespace TeleSharp.TL StringUtil.Serialize(PhoneNumber, bw); StringUtil.Serialize(FirstName, bw); StringUtil.Serialize(LastName, bw); + StringUtil.Serialize(Vcard, bw); bw.Write(UserId); } diff --git a/src/TeleSharp.TL/TL/TLMessageMediaDocument.cs b/src/TeleSharp.TL/TL/TLMessageMediaDocument.cs index 80ba11a..ddc278b 100644 --- a/src/TeleSharp.TL/TL/TLMessageMediaDocument.cs +++ b/src/TeleSharp.TL/TL/TLMessageMediaDocument.cs @@ -7,19 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-203411800)] + [TLObject(-1666158377)] public class TLMessageMediaDocument : TLAbsMessageMedia { public override int Constructor { get { - return -203411800; + return -1666158377; } } + public int Flags { get; set; } public TLAbsDocument Document { get; set; } - public string Caption { get; set; } + public int? TtlSeconds { get; set; } public void ComputeFlags() @@ -29,16 +30,28 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { - Document = (TLAbsDocument)ObjectUtils.DeserializeObject(br); - Caption = StringUtil.Deserialize(br); + Flags = br.ReadInt32(); + if ((Flags & 1) != 0) + Document = (TLAbsDocument)ObjectUtils.DeserializeObject(br); + else + Document = null; + + if ((Flags & 4) != 0) + TtlSeconds = br.ReadInt32(); + else + TtlSeconds = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ObjectUtils.SerializeObject(Document, bw); - StringUtil.Serialize(Caption, bw); + bw.Write(Flags); + if ((Flags & 1) != 0) + ObjectUtils.SerializeObject(Document, bw); + if ((Flags & 4) != 0) + bw.Write(TtlSeconds.Value); } } diff --git a/src/TeleSharp.TL/TL/TLMessageMediaGeoLive.cs b/src/TeleSharp.TL/TL/TLMessageMediaGeoLive.cs new file mode 100644 index 0000000..d332291 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLMessageMediaGeoLive.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(2084316681)] + public class TLMessageMediaGeoLive : TLAbsMessageMedia + { + public override int Constructor + { + get + { + return 2084316681; + } + } + + public TLAbsGeoPoint Geo { get; set; } + public int Period { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Geo = (TLAbsGeoPoint)ObjectUtils.DeserializeObject(br); + Period = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Geo, bw); + bw.Write(Period); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLMessageMediaInvoice.cs b/src/TeleSharp.TL/TL/TLMessageMediaInvoice.cs index 81a65eb..049159a 100644 --- a/src/TeleSharp.TL/TL/TLMessageMediaInvoice.cs +++ b/src/TeleSharp.TL/TL/TLMessageMediaInvoice.cs @@ -23,7 +23,7 @@ namespace TeleSharp.TL public bool Test { get; set; } public string Title { get; set; } public string Description { get; set; } - public TLWebDocument Photo { get; set; } + public TLAbsWebDocument Photo { get; set; } public int? ReceiptMsgId { get; set; } public string Currency { get; set; } public long TotalAmount { get; set; } @@ -32,11 +32,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = ShippingAddressRequested ? (Flags | 2) : (Flags & ~2); - Flags = Test ? (Flags | 8) : (Flags & ~8); - Flags = Photo != null ? (Flags | 1) : (Flags & ~1); - Flags = ReceiptMsgId != null ? (Flags | 4) : (Flags & ~4); } @@ -48,7 +43,7 @@ namespace TeleSharp.TL Title = StringUtil.Deserialize(br); Description = StringUtil.Deserialize(br); if ((Flags & 1) != 0) - Photo = (TLWebDocument)ObjectUtils.DeserializeObject(br); + Photo = (TLAbsWebDocument)ObjectUtils.DeserializeObject(br); else Photo = null; @@ -66,7 +61,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); diff --git a/src/TeleSharp.TL/TL/TLMessageMediaPhoto.cs b/src/TeleSharp.TL/TL/TLMessageMediaPhoto.cs index a62ac89..005f922 100644 --- a/src/TeleSharp.TL/TL/TLMessageMediaPhoto.cs +++ b/src/TeleSharp.TL/TL/TLMessageMediaPhoto.cs @@ -7,19 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(1032643901)] + [TLObject(1766936791)] public class TLMessageMediaPhoto : TLAbsMessageMedia { public override int Constructor { get { - return 1032643901; + return 1766936791; } } + public int Flags { get; set; } public TLAbsPhoto Photo { get; set; } - public string Caption { get; set; } + public int? TtlSeconds { get; set; } public void ComputeFlags() @@ -29,16 +30,28 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { - Photo = (TLAbsPhoto)ObjectUtils.DeserializeObject(br); - Caption = StringUtil.Deserialize(br); + Flags = br.ReadInt32(); + if ((Flags & 1) != 0) + Photo = (TLAbsPhoto)ObjectUtils.DeserializeObject(br); + else + Photo = null; + + if ((Flags & 4) != 0) + TtlSeconds = br.ReadInt32(); + else + TtlSeconds = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ObjectUtils.SerializeObject(Photo, bw); - StringUtil.Serialize(Caption, bw); + bw.Write(Flags); + if ((Flags & 1) != 0) + ObjectUtils.SerializeObject(Photo, bw); + if ((Flags & 4) != 0) + bw.Write(TtlSeconds.Value); } } diff --git a/src/TeleSharp.TL/TL/TLMessageMediaPoll.cs b/src/TeleSharp.TL/TL/TLMessageMediaPoll.cs new file mode 100644 index 0000000..e0a6b7e --- /dev/null +++ b/src/TeleSharp.TL/TL/TLMessageMediaPoll.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1272375192)] + public class TLMessageMediaPoll : TLAbsMessageMedia + { + public override int Constructor + { + get + { + return 1272375192; + } + } + + public TLPoll Poll { get; set; } + public TLPollResults Results { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Poll = (TLPoll)ObjectUtils.DeserializeObject(br); + Results = (TLPollResults)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Poll, bw); + ObjectUtils.SerializeObject(Results, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLMessageMediaVenue.cs b/src/TeleSharp.TL/TL/TLMessageMediaVenue.cs index 6142128..3dbe6ec 100644 --- a/src/TeleSharp.TL/TL/TLMessageMediaVenue.cs +++ b/src/TeleSharp.TL/TL/TLMessageMediaVenue.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(2031269663)] + [TLObject(784356159)] public class TLMessageMediaVenue : TLAbsMessageMedia { public override int Constructor { get { - return 2031269663; + return 784356159; } } @@ -23,6 +23,7 @@ namespace TeleSharp.TL public string Address { get; set; } public string Provider { get; set; } public string VenueId { get; set; } + public string VenueType { get; set; } public void ComputeFlags() @@ -37,6 +38,7 @@ namespace TeleSharp.TL Address = StringUtil.Deserialize(br); Provider = StringUtil.Deserialize(br); VenueId = StringUtil.Deserialize(br); + VenueType = StringUtil.Deserialize(br); } @@ -48,6 +50,7 @@ namespace TeleSharp.TL StringUtil.Serialize(Address, bw); StringUtil.Serialize(Provider, bw); StringUtil.Serialize(VenueId, bw); + StringUtil.Serialize(VenueType, bw); } } diff --git a/src/TeleSharp.TL/TL/TLMessageService.cs b/src/TeleSharp.TL/TL/TLMessageService.cs index ff16be2..79820bb 100644 --- a/src/TeleSharp.TL/TL/TLMessageService.cs +++ b/src/TeleSharp.TL/TL/TLMessageService.cs @@ -24,6 +24,7 @@ namespace TeleSharp.TL public bool MediaUnread { get; set; } public bool Silent { get; set; } public bool Post { get; set; } + public bool Legacy { get; set; } public int Id { get; set; } public int? FromId { get; set; } public TLAbsPeer ToId { get; set; } @@ -34,14 +35,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Out ? (Flags | 2) : (Flags & ~2); - Flags = Mentioned ? (Flags | 16) : (Flags & ~16); - Flags = MediaUnread ? (Flags | 32) : (Flags & ~32); - Flags = Silent ? (Flags | 8192) : (Flags & ~8192); - Flags = Post ? (Flags | 16384) : (Flags & ~16384); - Flags = FromId != null ? (Flags | 256) : (Flags & ~256); - Flags = ReplyToMsgId != null ? (Flags | 8) : (Flags & ~8); } @@ -53,6 +46,7 @@ namespace TeleSharp.TL MediaUnread = (Flags & 32) != 0; Silent = (Flags & 8192) != 0; Post = (Flags & 16384) != 0; + Legacy = (Flags & 524288) != 0; Id = br.ReadInt32(); if ((Flags & 256) != 0) FromId = br.ReadInt32(); @@ -73,13 +67,13 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + bw.Write(Id); if ((Flags & 256) != 0) bw.Write(FromId.Value); diff --git a/src/TeleSharp.TL/TL/TLNotifyBroadcasts.cs b/src/TeleSharp.TL/TL/TLNotifyBroadcasts.cs new file mode 100644 index 0000000..3297c51 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLNotifyBroadcasts.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-703403793)] + public class TLNotifyBroadcasts : TLAbsNotifyPeer + { + public override int Constructor + { + get + { + return -703403793; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPage.cs b/src/TeleSharp.TL/TL/TLPage.cs new file mode 100644 index 0000000..270eb68 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPage.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1366746132)] + public class TLPage : TLObject + { + public override int Constructor + { + get + { + return -1366746132; + } + } + + public int Flags { get; set; } + public bool Part { get; set; } + public bool Rtl { get; set; } + public bool V2 { get; set; } + public string Url { get; set; } + public TLVector Blocks { get; set; } + public TLVector Photos { get; set; } + public TLVector Documents { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Part = (Flags & 1) != 0; + Rtl = (Flags & 2) != 0; + V2 = (Flags & 4) != 0; + Url = StringUtil.Deserialize(br); + Blocks = (TLVector)ObjectUtils.DeserializeVector(br); + Photos = (TLVector)ObjectUtils.DeserializeVector(br); + Documents = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + + + StringUtil.Serialize(Url, bw); + ObjectUtils.SerializeObject(Blocks, bw); + ObjectUtils.SerializeObject(Photos, bw); + ObjectUtils.SerializeObject(Documents, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPageBlockAudio.cs b/src/TeleSharp.TL/TL/TLPageBlockAudio.cs new file mode 100644 index 0000000..0f854bf --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPageBlockAudio.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-2143067670)] + public class TLPageBlockAudio : TLAbsPageBlock + { + public override int Constructor + { + get + { + return -2143067670; + } + } + + public long AudioId { get; set; } + public TLPageCaption Caption { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + AudioId = br.ReadInt64(); + Caption = (TLPageCaption)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(AudioId); + ObjectUtils.SerializeObject(Caption, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPageBlockCollage.cs b/src/TeleSharp.TL/TL/TLPageBlockCollage.cs index e62e772..8af241b 100644 --- a/src/TeleSharp.TL/TL/TLPageBlockCollage.cs +++ b/src/TeleSharp.TL/TL/TLPageBlockCollage.cs @@ -7,19 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(145955919)] + [TLObject(1705048653)] public class TLPageBlockCollage : TLAbsPageBlock { public override int Constructor { get { - return 145955919; + return 1705048653; } } public TLVector Items { get; set; } - public TLAbsRichText Caption { get; set; } + public TLPageCaption Caption { get; set; } public void ComputeFlags() @@ -30,7 +30,7 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { Items = (TLVector)ObjectUtils.DeserializeVector(br); - Caption = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + Caption = (TLPageCaption)ObjectUtils.DeserializeObject(br); } diff --git a/src/TeleSharp.TL/TL/TLPageFull.cs b/src/TeleSharp.TL/TL/TLPageBlockDetails.cs similarity index 60% rename from src/TeleSharp.TL/TL/TLPageFull.cs rename to src/TeleSharp.TL/TL/TLPageBlockDetails.cs index 1f56e8d..6160416 100644 --- a/src/TeleSharp.TL/TL/TLPageFull.cs +++ b/src/TeleSharp.TL/TL/TLPageBlockDetails.cs @@ -7,20 +7,21 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-677274263)] - public class TLPageFull : TLAbsPage + [TLObject(1987480557)] + public class TLPageBlockDetails : TLAbsPageBlock { public override int Constructor { get { - return -677274263; + return 1987480557; } } + public int Flags { get; set; } + public bool Open { get; set; } public TLVector Blocks { get; set; } - public TLVector Photos { get; set; } - public TLVector Videos { get; set; } + public TLAbsRichText Title { get; set; } public void ComputeFlags() @@ -30,18 +31,20 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); + Open = (Flags & 1) != 0; Blocks = (TLVector)ObjectUtils.DeserializeVector(br); - Photos = (TLVector)ObjectUtils.DeserializeVector(br); - Videos = (TLVector)ObjectUtils.DeserializeVector(br); + Title = (TLAbsRichText)ObjectUtils.DeserializeObject(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); + ObjectUtils.SerializeObject(Blocks, bw); - ObjectUtils.SerializeObject(Photos, bw); - ObjectUtils.SerializeObject(Videos, bw); + ObjectUtils.SerializeObject(Title, bw); } } diff --git a/src/TeleSharp.TL/TL/TLPageBlockEmbed.cs b/src/TeleSharp.TL/TL/TLPageBlockEmbed.cs index 81893ab..1399a43 100644 --- a/src/TeleSharp.TL/TL/TLPageBlockEmbed.cs +++ b/src/TeleSharp.TL/TL/TLPageBlockEmbed.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-840826671)] + [TLObject(-1468953147)] public class TLPageBlockEmbed : TLAbsPageBlock { public override int Constructor { get { - return -840826671; + return -1468953147; } } @@ -24,19 +24,13 @@ namespace TeleSharp.TL public string Url { get; set; } public string Html { get; set; } public long? PosterPhotoId { get; set; } - public int W { get; set; } - public int H { get; set; } - public TLAbsRichText Caption { get; set; } + public int? W { get; set; } + public int? H { get; set; } + public TLPageCaption Caption { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = FullWidth ? (Flags | 1) : (Flags & ~1); - Flags = AllowScrolling ? (Flags | 8) : (Flags & ~8); - Flags = Url != null ? (Flags | 2) : (Flags & ~2); - Flags = Html != null ? (Flags | 4) : (Flags & ~4); - Flags = PosterPhotoId != null ? (Flags | 16) : (Flags & ~16); } @@ -60,16 +54,23 @@ namespace TeleSharp.TL else PosterPhotoId = null; - W = br.ReadInt32(); - H = br.ReadInt32(); - Caption = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + if ((Flags & 32) != 0) + W = br.ReadInt32(); + else + W = null; + + if ((Flags & 32) != 0) + H = br.ReadInt32(); + else + H = null; + + Caption = (TLPageCaption)ObjectUtils.DeserializeObject(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); @@ -79,8 +80,10 @@ namespace TeleSharp.TL StringUtil.Serialize(Html, bw); if ((Flags & 16) != 0) bw.Write(PosterPhotoId.Value); - bw.Write(W); - bw.Write(H); + if ((Flags & 32) != 0) + bw.Write(W.Value); + if ((Flags & 32) != 0) + bw.Write(H.Value); ObjectUtils.SerializeObject(Caption, bw); } diff --git a/src/TeleSharp.TL/TL/TLPageBlockEmbedPost.cs b/src/TeleSharp.TL/TL/TLPageBlockEmbedPost.cs index cc69b30..b13e391 100644 --- a/src/TeleSharp.TL/TL/TLPageBlockEmbedPost.cs +++ b/src/TeleSharp.TL/TL/TLPageBlockEmbedPost.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(690781161)] + [TLObject(-229005301)] public class TLPageBlockEmbedPost : TLAbsPageBlock { public override int Constructor { get { - return 690781161; + return -229005301; } } @@ -24,7 +24,7 @@ namespace TeleSharp.TL public string Author { get; set; } public int Date { get; set; } public TLVector Blocks { get; set; } - public TLAbsRichText Caption { get; set; } + public TLPageCaption Caption { get; set; } public void ComputeFlags() @@ -40,7 +40,7 @@ namespace TeleSharp.TL Author = StringUtil.Deserialize(br); Date = br.ReadInt32(); Blocks = (TLVector)ObjectUtils.DeserializeVector(br); - Caption = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + Caption = (TLPageCaption)ObjectUtils.DeserializeObject(br); } diff --git a/src/TeleSharp.TL/TL/TLPageBlockKicker.cs b/src/TeleSharp.TL/TL/TLPageBlockKicker.cs new file mode 100644 index 0000000..abfb162 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPageBlockKicker.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(504660880)] + public class TLPageBlockKicker : TLAbsPageBlock + { + public override int Constructor + { + get + { + return 504660880; + } + } + + public TLAbsRichText Text { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Text, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPageBlockList.cs b/src/TeleSharp.TL/TL/TLPageBlockList.cs index 7b2fa3b..4390a5d 100644 --- a/src/TeleSharp.TL/TL/TLPageBlockList.cs +++ b/src/TeleSharp.TL/TL/TLPageBlockList.cs @@ -7,19 +7,18 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(978896884)] + [TLObject(-454524911)] public class TLPageBlockList : TLAbsPageBlock { public override int Constructor { get { - return 978896884; + return -454524911; } } - public bool Ordered { get; set; } - public TLVector Items { get; set; } + public TLVector Items { get; set; } public void ComputeFlags() @@ -29,15 +28,13 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { - Ordered = BoolUtil.Deserialize(br); - Items = (TLVector)ObjectUtils.DeserializeVector(br); + Items = (TLVector)ObjectUtils.DeserializeVector(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - BoolUtil.Serialize(Ordered, bw); ObjectUtils.SerializeObject(Items, bw); } diff --git a/src/TeleSharp.TL/TL/TLPageBlockMap.cs b/src/TeleSharp.TL/TL/TLPageBlockMap.cs new file mode 100644 index 0000000..d705516 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPageBlockMap.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1538310410)] + public class TLPageBlockMap : TLAbsPageBlock + { + public override int Constructor + { + get + { + return -1538310410; + } + } + + public TLAbsGeoPoint Geo { get; set; } + public int Zoom { get; set; } + public int W { get; set; } + public int H { get; set; } + public TLPageCaption Caption { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Geo = (TLAbsGeoPoint)ObjectUtils.DeserializeObject(br); + Zoom = br.ReadInt32(); + W = br.ReadInt32(); + H = br.ReadInt32(); + Caption = (TLPageCaption)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Geo, bw); + bw.Write(Zoom); + bw.Write(W); + bw.Write(H); + ObjectUtils.SerializeObject(Caption, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPageBlockOrderedList.cs b/src/TeleSharp.TL/TL/TLPageBlockOrderedList.cs new file mode 100644 index 0000000..c5078c4 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPageBlockOrderedList.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1702174239)] + public class TLPageBlockOrderedList : TLAbsPageBlock + { + public override int Constructor + { + get + { + return -1702174239; + } + } + + public TLVector Items { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Items = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Items, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPageBlockPhoto.cs b/src/TeleSharp.TL/TL/TLPageBlockPhoto.cs index d7f6a20..5ccb7a5 100644 --- a/src/TeleSharp.TL/TL/TLPageBlockPhoto.cs +++ b/src/TeleSharp.TL/TL/TLPageBlockPhoto.cs @@ -7,19 +7,22 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-372860542)] + [TLObject(391759200)] public class TLPageBlockPhoto : TLAbsPageBlock { public override int Constructor { get { - return -372860542; + return 391759200; } } + public int Flags { get; set; } public long PhotoId { get; set; } - public TLAbsRichText Caption { get; set; } + public TLPageCaption Caption { get; set; } + public string Url { get; set; } + public long? WebpageId { get; set; } public void ComputeFlags() @@ -29,16 +32,32 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); PhotoId = br.ReadInt64(); - Caption = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + Caption = (TLPageCaption)ObjectUtils.DeserializeObject(br); + if ((Flags & 1) != 0) + Url = StringUtil.Deserialize(br); + else + Url = null; + + if ((Flags & 1) != 0) + WebpageId = br.ReadInt64(); + else + WebpageId = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); bw.Write(PhotoId); ObjectUtils.SerializeObject(Caption, bw); + if ((Flags & 1) != 0) + StringUtil.Serialize(Url, bw); + if ((Flags & 1) != 0) + bw.Write(WebpageId.Value); } } diff --git a/src/TeleSharp.TL/TL/TLPageBlockRelatedArticles.cs b/src/TeleSharp.TL/TL/TLPageBlockRelatedArticles.cs new file mode 100644 index 0000000..67794e0 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPageBlockRelatedArticles.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(370236054)] + public class TLPageBlockRelatedArticles : TLAbsPageBlock + { + public override int Constructor + { + get + { + return 370236054; + } + } + + public TLAbsRichText Title { get; set; } + public TLVector Articles { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Title = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + Articles = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Title, bw); + ObjectUtils.SerializeObject(Articles, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPageBlockSlideshow.cs b/src/TeleSharp.TL/TL/TLPageBlockSlideshow.cs index e74545a..c27f5ad 100644 --- a/src/TeleSharp.TL/TL/TLPageBlockSlideshow.cs +++ b/src/TeleSharp.TL/TL/TLPageBlockSlideshow.cs @@ -7,19 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(319588707)] + [TLObject(52401552)] public class TLPageBlockSlideshow : TLAbsPageBlock { public override int Constructor { get { - return 319588707; + return 52401552; } } public TLVector Items { get; set; } - public TLAbsRichText Caption { get; set; } + public TLPageCaption Caption { get; set; } public void ComputeFlags() @@ -30,7 +30,7 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { Items = (TLVector)ObjectUtils.DeserializeVector(br); - Caption = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + Caption = (TLPageCaption)ObjectUtils.DeserializeObject(br); } diff --git a/src/TeleSharp.TL/TL/TLPageBlockTable.cs b/src/TeleSharp.TL/TL/TLPageBlockTable.cs new file mode 100644 index 0000000..1a3137f --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPageBlockTable.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1085412734)] + public class TLPageBlockTable : TLAbsPageBlock + { + public override int Constructor + { + get + { + return -1085412734; + } + } + + public int Flags { get; set; } + public bool Bordered { get; set; } + public bool Striped { get; set; } + public TLAbsRichText Title { get; set; } + public TLVector Rows { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Bordered = (Flags & 1) != 0; + Striped = (Flags & 2) != 0; + Title = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + Rows = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + + ObjectUtils.SerializeObject(Title, bw); + ObjectUtils.SerializeObject(Rows, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPageBlockVideo.cs b/src/TeleSharp.TL/TL/TLPageBlockVideo.cs index 1443903..9e4ba16 100644 --- a/src/TeleSharp.TL/TL/TLPageBlockVideo.cs +++ b/src/TeleSharp.TL/TL/TLPageBlockVideo.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-640214938)] + [TLObject(2089805750)] public class TLPageBlockVideo : TLAbsPageBlock { public override int Constructor { get { - return -640214938; + return 2089805750; } } @@ -22,14 +22,11 @@ namespace TeleSharp.TL public bool Autoplay { get; set; } public bool Loop { get; set; } public long VideoId { get; set; } - public TLAbsRichText Caption { get; set; } + public TLPageCaption Caption { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Autoplay ? (Flags | 1) : (Flags & ~1); - Flags = Loop ? (Flags | 2) : (Flags & ~2); } @@ -39,14 +36,13 @@ namespace TeleSharp.TL Autoplay = (Flags & 1) != 0; Loop = (Flags & 2) != 0; VideoId = br.ReadInt64(); - Caption = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + Caption = (TLPageCaption)ObjectUtils.DeserializeObject(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); diff --git a/src/TeleSharp.TL/TL/TLPageCaption.cs b/src/TeleSharp.TL/TL/TLPageCaption.cs new file mode 100644 index 0000000..2ecb46d --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPageCaption.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1869903447)] + public class TLPageCaption : TLObject + { + public override int Constructor + { + get + { + return 1869903447; + } + } + + public TLAbsRichText Text { get; set; } + public TLAbsRichText Credit { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + Credit = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Text, bw); + ObjectUtils.SerializeObject(Credit, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPageListItemBlocks.cs b/src/TeleSharp.TL/TL/TLPageListItemBlocks.cs new file mode 100644 index 0000000..e86d834 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPageListItemBlocks.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(635466748)] + public class TLPageListItemBlocks : TLAbsPageListItem + { + public override int Constructor + { + get + { + return 635466748; + } + } + + public TLVector Blocks { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Blocks = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Blocks, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPageListItemText.cs b/src/TeleSharp.TL/TL/TLPageListItemText.cs new file mode 100644 index 0000000..d75f07e --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPageListItemText.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1188055347)] + public class TLPageListItemText : TLAbsPageListItem + { + public override int Constructor + { + get + { + return -1188055347; + } + } + + public TLAbsRichText Text { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Text, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPagePart.cs b/src/TeleSharp.TL/TL/TLPageListOrderedItemBlocks.cs similarity index 59% rename from src/TeleSharp.TL/TL/TLPagePart.cs rename to src/TeleSharp.TL/TL/TLPageListOrderedItemBlocks.cs index e64b1e9..d1f54f9 100644 --- a/src/TeleSharp.TL/TL/TLPagePart.cs +++ b/src/TeleSharp.TL/TL/TLPageListOrderedItemBlocks.cs @@ -7,20 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1913754556)] - public class TLPagePart : TLAbsPage + [TLObject(-1730311882)] + public class TLPageListOrderedItemBlocks : TLAbsPageListOrderedItem { public override int Constructor { get { - return -1913754556; + return -1730311882; } } + public string Num { get; set; } public TLVector Blocks { get; set; } - public TLVector Photos { get; set; } - public TLVector Videos { get; set; } public void ComputeFlags() @@ -30,18 +29,16 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { + Num = StringUtil.Deserialize(br); Blocks = (TLVector)ObjectUtils.DeserializeVector(br); - Photos = (TLVector)ObjectUtils.DeserializeVector(br); - Videos = (TLVector)ObjectUtils.DeserializeVector(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + StringUtil.Serialize(Num, bw); ObjectUtils.SerializeObject(Blocks, bw); - ObjectUtils.SerializeObject(Photos, bw); - ObjectUtils.SerializeObject(Videos, bw); } } diff --git a/src/TeleSharp.TL/TL/TLPageListOrderedItemText.cs b/src/TeleSharp.TL/TL/TLPageListOrderedItemText.cs new file mode 100644 index 0000000..c840152 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPageListOrderedItemText.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1577484359)] + public class TLPageListOrderedItemText : TLAbsPageListOrderedItem + { + public override int Constructor + { + get + { + return 1577484359; + } + } + + public string Num { get; set; } + public TLAbsRichText Text { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Num = StringUtil.Deserialize(br); + Text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Num, bw); + ObjectUtils.SerializeObject(Text, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPageRelatedArticle.cs b/src/TeleSharp.TL/TL/TLPageRelatedArticle.cs new file mode 100644 index 0000000..b8e51f6 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPageRelatedArticle.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1282352120)] + public class TLPageRelatedArticle : TLObject + { + public override int Constructor + { + get + { + return -1282352120; + } + } + + public int Flags { get; set; } + public string Url { get; set; } + public long WebpageId { get; set; } + public string Title { get; set; } + public string Description { get; set; } + public long? PhotoId { get; set; } + public string Author { get; set; } + public int? PublishedDate { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Url = StringUtil.Deserialize(br); + WebpageId = br.ReadInt64(); + if ((Flags & 1) != 0) + Title = StringUtil.Deserialize(br); + else + Title = null; + + if ((Flags & 2) != 0) + Description = StringUtil.Deserialize(br); + else + Description = null; + + if ((Flags & 4) != 0) + PhotoId = br.ReadInt64(); + else + PhotoId = null; + + if ((Flags & 8) != 0) + Author = StringUtil.Deserialize(br); + else + Author = null; + + if ((Flags & 16) != 0) + PublishedDate = br.ReadInt32(); + else + PublishedDate = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + StringUtil.Serialize(Url, bw); + bw.Write(WebpageId); + if ((Flags & 1) != 0) + StringUtil.Serialize(Title, bw); + if ((Flags & 2) != 0) + StringUtil.Serialize(Description, bw); + if ((Flags & 4) != 0) + bw.Write(PhotoId.Value); + if ((Flags & 8) != 0) + StringUtil.Serialize(Author, bw); + if ((Flags & 16) != 0) + bw.Write(PublishedDate.Value); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPageTableCell.cs b/src/TeleSharp.TL/TL/TLPageTableCell.cs new file mode 100644 index 0000000..09ac0c8 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPageTableCell.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(878078826)] + public class TLPageTableCell : TLObject + { + public override int Constructor + { + get + { + return 878078826; + } + } + + public int Flags { get; set; } + public bool Header { get; set; } + public bool AlignCenter { get; set; } + public bool AlignRight { get; set; } + public bool ValignMiddle { get; set; } + public bool ValignBottom { get; set; } + public TLAbsRichText Text { get; set; } + public int? Colspan { get; set; } + public int? Rowspan { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Header = (Flags & 1) != 0; + AlignCenter = (Flags & 8) != 0; + AlignRight = (Flags & 16) != 0; + ValignMiddle = (Flags & 32) != 0; + ValignBottom = (Flags & 64) != 0; + if ((Flags & 128) != 0) + Text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + else + Text = null; + + if ((Flags & 2) != 0) + Colspan = br.ReadInt32(); + else + Colspan = null; + + if ((Flags & 4) != 0) + Rowspan = br.ReadInt32(); + else + Rowspan = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + + + + + if ((Flags & 128) != 0) + ObjectUtils.SerializeObject(Text, bw); + if ((Flags & 2) != 0) + bw.Write(Colspan.Value); + if ((Flags & 4) != 0) + bw.Write(Rowspan.Value); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPageTableRow.cs b/src/TeleSharp.TL/TL/TLPageTableRow.cs new file mode 100644 index 0000000..f1eb002 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPageTableRow.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-524237339)] + public class TLPageTableRow : TLObject + { + public override int Constructor + { + get + { + return -524237339; + } + } + + public TLVector Cells { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Cells = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Cells, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow.cs b/src/TeleSharp.TL/TL/TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow.cs new file mode 100644 index 0000000..cd2afaf --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(982592842)] + public class TLPasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow : TLAbsPasswordKdfAlgo + { + public override int Constructor + { + get + { + return 982592842; + } + } + + public byte[] Salt1 { get; set; } + public byte[] Salt2 { get; set; } + public int G { get; set; } + public byte[] P { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Salt1 = BytesUtil.Deserialize(br); + Salt2 = BytesUtil.Deserialize(br); + G = br.ReadInt32(); + P = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + BytesUtil.Serialize(Salt1, bw); + BytesUtil.Serialize(Salt2, bw); + bw.Write(G); + BytesUtil.Serialize(P, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPasswordKdfAlgoUnknown.cs b/src/TeleSharp.TL/TL/TLPasswordKdfAlgoUnknown.cs new file mode 100644 index 0000000..bd1da83 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPasswordKdfAlgoUnknown.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-732254058)] + public class TLPasswordKdfAlgoUnknown : TLAbsPasswordKdfAlgo + { + public override int Constructor + { + get + { + return -732254058; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPaymentRequestedInfo.cs b/src/TeleSharp.TL/TL/TLPaymentRequestedInfo.cs index e01d966..75d62cd 100644 --- a/src/TeleSharp.TL/TL/TLPaymentRequestedInfo.cs +++ b/src/TeleSharp.TL/TL/TLPaymentRequestedInfo.cs @@ -27,11 +27,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Name != null ? (Flags | 1) : (Flags & ~1); - Flags = Phone != null ? (Flags | 2) : (Flags & ~2); - Flags = Email != null ? (Flags | 4) : (Flags & ~4); - Flags = ShippingAddress != null ? (Flags | 8) : (Flags & ~8); } @@ -64,7 +59,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); if ((Flags & 1) != 0) StringUtil.Serialize(Name, bw); diff --git a/src/TeleSharp.TL/TL/TLPeerLocated.cs b/src/TeleSharp.TL/TL/TLPeerLocated.cs new file mode 100644 index 0000000..31deb1b --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPeerLocated.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-901375139)] + public class TLPeerLocated : TLObject + { + public override int Constructor + { + get + { + return -901375139; + } + } + + public TLAbsPeer Peer { get; set; } + public int Expires { get; set; } + public int Distance { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsPeer)ObjectUtils.DeserializeObject(br); + Expires = br.ReadInt32(); + Distance = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + bw.Write(Expires); + bw.Write(Distance); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPeerNotifyEventsAll.cs b/src/TeleSharp.TL/TL/TLPeerNotifyEventsAll.cs deleted file mode 100644 index 6d829fd..0000000 --- a/src/TeleSharp.TL/TL/TLPeerNotifyEventsAll.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using TeleSharp.TL; -namespace TeleSharp.TL -{ - [TLObject(1830677896)] - public class TLPeerNotifyEventsAll : TLAbsPeerNotifyEvents - { - public override int Constructor - { - get - { - return 1830677896; - } - } - - - - public void ComputeFlags() - { - - } - - public override void DeserializeBody(BinaryReader br) - { - - } - - public override void SerializeBody(BinaryWriter bw) - { - bw.Write(Constructor); - - } - } -} diff --git a/src/TeleSharp.TL/TL/TLPeerNotifySettings.cs b/src/TeleSharp.TL/TL/TLPeerNotifySettings.cs index 412a4b7..2a95ed9 100644 --- a/src/TeleSharp.TL/TL/TLPeerNotifySettings.cs +++ b/src/TeleSharp.TL/TL/TLPeerNotifySettings.cs @@ -7,51 +7,67 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1697798976)] - public class TLPeerNotifySettings : TLAbsPeerNotifySettings + [TLObject(-1353671392)] + public class TLPeerNotifySettings : TLObject { public override int Constructor { get { - return -1697798976; + return -1353671392; } } public int Flags { get; set; } - public bool ShowPreviews { get; set; } - public bool Silent { get; set; } - public int MuteUntil { get; set; } + public bool? ShowPreviews { get; set; } + public bool? Silent { get; set; } + public int? MuteUntil { get; set; } public string Sound { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = ShowPreviews ? (Flags | 1) : (Flags & ~1); - Flags = Silent ? (Flags | 2) : (Flags & ~2); } public override void DeserializeBody(BinaryReader br) { Flags = br.ReadInt32(); - ShowPreviews = (Flags & 1) != 0; - Silent = (Flags & 2) != 0; - MuteUntil = br.ReadInt32(); - Sound = StringUtil.Deserialize(br); + if ((Flags & 1) != 0) + ShowPreviews = BoolUtil.Deserialize(br); + else + ShowPreviews = null; + + if ((Flags & 2) != 0) + Silent = BoolUtil.Deserialize(br); + else + Silent = null; + + if ((Flags & 4) != 0) + MuteUntil = br.ReadInt32(); + else + MuteUntil = null; + + if ((Flags & 8) != 0) + Sound = StringUtil.Deserialize(br); + else + Sound = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); - - - bw.Write(MuteUntil); - StringUtil.Serialize(Sound, bw); + if ((Flags & 1) != 0) + BoolUtil.Serialize(ShowPreviews.Value, bw); + if ((Flags & 2) != 0) + BoolUtil.Serialize(Silent.Value, bw); + if ((Flags & 4) != 0) + bw.Write(MuteUntil.Value); + if ((Flags & 8) != 0) + StringUtil.Serialize(Sound, bw); } } diff --git a/src/TeleSharp.TL/TL/TLPeerNotifySettingsEmpty.cs b/src/TeleSharp.TL/TL/TLPeerNotifySettingsEmpty.cs deleted file mode 100644 index d3e028f..0000000 --- a/src/TeleSharp.TL/TL/TLPeerNotifySettingsEmpty.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using TeleSharp.TL; -namespace TeleSharp.TL -{ - [TLObject(1889961234)] - public class TLPeerNotifySettingsEmpty : TLAbsPeerNotifySettings - { - public override int Constructor - { - get - { - return 1889961234; - } - } - - - - public void ComputeFlags() - { - - } - - public override void DeserializeBody(BinaryReader br) - { - - } - - public override void SerializeBody(BinaryWriter bw) - { - bw.Write(Constructor); - - } - } -} diff --git a/src/TeleSharp.TL/TL/TLPeerSettings.cs b/src/TeleSharp.TL/TL/TLPeerSettings.cs index 05647c9..b450993 100644 --- a/src/TeleSharp.TL/TL/TLPeerSettings.cs +++ b/src/TeleSharp.TL/TL/TLPeerSettings.cs @@ -20,12 +20,15 @@ namespace TeleSharp.TL public int Flags { get; set; } public bool ReportSpam { get; set; } + public bool AddContact { get; set; } + public bool BlockContact { get; set; } + public bool ShareContact { get; set; } + public bool NeedContactsException { get; set; } + public bool ReportGeo { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = ReportSpam ? (Flags | 1) : (Flags & ~1); } @@ -33,16 +36,25 @@ namespace TeleSharp.TL { Flags = br.ReadInt32(); ReportSpam = (Flags & 1) != 0; + AddContact = (Flags & 2) != 0; + BlockContact = (Flags & 4) != 0; + ShareContact = (Flags & 8) != 0; + NeedContactsException = (Flags & 16) != 0; + ReportGeo = (Flags & 32) != 0; } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + + + + + } } } diff --git a/src/TeleSharp.TL/TL/TLPhoneCall.cs b/src/TeleSharp.TL/TL/TLPhoneCall.cs index 84dbc63..8895a46 100644 --- a/src/TeleSharp.TL/TL/TLPhoneCall.cs +++ b/src/TeleSharp.TL/TL/TLPhoneCall.cs @@ -7,17 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1660057)] + [TLObject(-2025673089)] public class TLPhoneCall : TLAbsPhoneCall { public override int Constructor { get { - return -1660057; + return -2025673089; } } + public int Flags { get; set; } + public bool P2pAllowed { get; set; } public long Id { get; set; } public long AccessHash { get; set; } public int Date { get; set; } @@ -26,8 +28,7 @@ namespace TeleSharp.TL public byte[] GAOrB { get; set; } public long KeyFingerprint { get; set; } public TLPhoneCallProtocol Protocol { get; set; } - public TLPhoneConnection Connection { get; set; } - public TLVector AlternativeConnections { get; set; } + public TLVector Connections { get; set; } public int StartDate { get; set; } @@ -38,6 +39,8 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); + P2pAllowed = (Flags & 32) != 0; Id = br.ReadInt64(); AccessHash = br.ReadInt64(); Date = br.ReadInt32(); @@ -46,8 +49,7 @@ namespace TeleSharp.TL GAOrB = BytesUtil.Deserialize(br); KeyFingerprint = br.ReadInt64(); Protocol = (TLPhoneCallProtocol)ObjectUtils.DeserializeObject(br); - Connection = (TLPhoneConnection)ObjectUtils.DeserializeObject(br); - AlternativeConnections = (TLVector)ObjectUtils.DeserializeVector(br); + Connections = (TLVector)ObjectUtils.DeserializeVector(br); StartDate = br.ReadInt32(); } @@ -55,6 +57,8 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); + bw.Write(Id); bw.Write(AccessHash); bw.Write(Date); @@ -63,8 +67,7 @@ namespace TeleSharp.TL BytesUtil.Serialize(GAOrB, bw); bw.Write(KeyFingerprint); ObjectUtils.SerializeObject(Protocol, bw); - ObjectUtils.SerializeObject(Connection, bw); - ObjectUtils.SerializeObject(AlternativeConnections, bw); + ObjectUtils.SerializeObject(Connections, bw); bw.Write(StartDate); } diff --git a/src/TeleSharp.TL/TL/TLPhoneCallAccepted.cs b/src/TeleSharp.TL/TL/TLPhoneCallAccepted.cs index 8a3c92f..c085e6c 100644 --- a/src/TeleSharp.TL/TL/TLPhoneCallAccepted.cs +++ b/src/TeleSharp.TL/TL/TLPhoneCallAccepted.cs @@ -7,17 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(1828732223)] + [TLObject(-1719909046)] public class TLPhoneCallAccepted : TLAbsPhoneCall { public override int Constructor { get { - return 1828732223; + return -1719909046; } } + public int Flags { get; set; } + public bool Video { get; set; } public long Id { get; set; } public long AccessHash { get; set; } public int Date { get; set; } @@ -34,6 +36,8 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); + Video = (Flags & 32) != 0; Id = br.ReadInt64(); AccessHash = br.ReadInt64(); Date = br.ReadInt32(); @@ -47,6 +51,8 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); + bw.Write(Id); bw.Write(AccessHash); bw.Write(Date); diff --git a/src/TeleSharp.TL/TL/TLPhoneCallDiscarded.cs b/src/TeleSharp.TL/TL/TLPhoneCallDiscarded.cs index 36ecbea..405fee7 100644 --- a/src/TeleSharp.TL/TL/TLPhoneCallDiscarded.cs +++ b/src/TeleSharp.TL/TL/TLPhoneCallDiscarded.cs @@ -21,6 +21,7 @@ namespace TeleSharp.TL public int Flags { get; set; } public bool NeedRating { get; set; } public bool NeedDebug { get; set; } + public bool Video { get; set; } public long Id { get; set; } public TLAbsPhoneCallDiscardReason Reason { get; set; } public int? Duration { get; set; } @@ -28,11 +29,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = NeedRating ? (Flags | 4) : (Flags & ~4); - Flags = NeedDebug ? (Flags | 8) : (Flags & ~8); - Flags = Reason != null ? (Flags | 1) : (Flags & ~1); - Flags = Duration != null ? (Flags | 2) : (Flags & ~2); } @@ -41,6 +37,7 @@ namespace TeleSharp.TL Flags = br.ReadInt32(); NeedRating = (Flags & 4) != 0; NeedDebug = (Flags & 8) != 0; + Video = (Flags & 32) != 0; Id = br.ReadInt64(); if ((Flags & 1) != 0) Reason = (TLAbsPhoneCallDiscardReason)ObjectUtils.DeserializeObject(br); @@ -58,10 +55,10 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + bw.Write(Id); if ((Flags & 1) != 0) ObjectUtils.SerializeObject(Reason, bw); diff --git a/src/TeleSharp.TL/TL/TLPhoneCallProtocol.cs b/src/TeleSharp.TL/TL/TLPhoneCallProtocol.cs index 87c7361..a8218ac 100644 --- a/src/TeleSharp.TL/TL/TLPhoneCallProtocol.cs +++ b/src/TeleSharp.TL/TL/TLPhoneCallProtocol.cs @@ -27,9 +27,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = UdpP2p ? (Flags | 1) : (Flags & ~1); - Flags = UdpReflector ? (Flags | 2) : (Flags & ~2); } @@ -46,7 +43,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); diff --git a/src/TeleSharp.TL/TL/TLPhoneCallRequested.cs b/src/TeleSharp.TL/TL/TLPhoneCallRequested.cs index a09895f..b701c46 100644 --- a/src/TeleSharp.TL/TL/TLPhoneCallRequested.cs +++ b/src/TeleSharp.TL/TL/TLPhoneCallRequested.cs @@ -7,17 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-2089411356)] + [TLObject(-2014659757)] public class TLPhoneCallRequested : TLAbsPhoneCall { public override int Constructor { get { - return -2089411356; + return -2014659757; } } + public int Flags { get; set; } + public bool Video { get; set; } public long Id { get; set; } public long AccessHash { get; set; } public int Date { get; set; } @@ -34,6 +36,8 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); + Video = (Flags & 32) != 0; Id = br.ReadInt64(); AccessHash = br.ReadInt64(); Date = br.ReadInt32(); @@ -47,6 +51,8 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); + bw.Write(Id); bw.Write(AccessHash); bw.Write(Date); diff --git a/src/TeleSharp.TL/TL/TLPhoneCallWaiting.cs b/src/TeleSharp.TL/TL/TLPhoneCallWaiting.cs index 20eb455..77b4d50 100644 --- a/src/TeleSharp.TL/TL/TLPhoneCallWaiting.cs +++ b/src/TeleSharp.TL/TL/TLPhoneCallWaiting.cs @@ -19,6 +19,7 @@ namespace TeleSharp.TL } public int Flags { get; set; } + public bool Video { get; set; } public long Id { get; set; } public long AccessHash { get; set; } public int Date { get; set; } @@ -30,14 +31,13 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = ReceiveDate != null ? (Flags | 1) : (Flags & ~1); } public override void DeserializeBody(BinaryReader br) { Flags = br.ReadInt32(); + Video = (Flags & 32) != 0; Id = br.ReadInt64(); AccessHash = br.ReadInt64(); Date = br.ReadInt32(); @@ -55,8 +55,8 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + bw.Write(Id); bw.Write(AccessHash); bw.Write(Date); diff --git a/src/TeleSharp.TL/TL/TLPhoto.cs b/src/TeleSharp.TL/TL/TLPhoto.cs index 8857440..478adac 100644 --- a/src/TeleSharp.TL/TL/TLPhoto.cs +++ b/src/TeleSharp.TL/TL/TLPhoto.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1836524247)] + [TLObject(-797637467)] public class TLPhoto : TLAbsPhoto { public override int Constructor { get { - return -1836524247; + return -797637467; } } @@ -22,14 +22,14 @@ namespace TeleSharp.TL public bool HasStickers { get; set; } public long Id { get; set; } public long AccessHash { get; set; } + public byte[] FileReference { get; set; } public int Date { get; set; } public TLVector Sizes { get; set; } + public int DcId { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = HasStickers ? (Flags | 1) : (Flags & ~1); } @@ -39,21 +39,24 @@ namespace TeleSharp.TL HasStickers = (Flags & 1) != 0; Id = br.ReadInt64(); AccessHash = br.ReadInt64(); + FileReference = BytesUtil.Deserialize(br); Date = br.ReadInt32(); Sizes = (TLVector)ObjectUtils.DeserializeVector(br); + DcId = br.ReadInt32(); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(Id); bw.Write(AccessHash); + BytesUtil.Serialize(FileReference, bw); bw.Write(Date); ObjectUtils.SerializeObject(Sizes, bw); + bw.Write(DcId); } } diff --git a/src/TeleSharp.TL/TL/TLPhotoCachedSize.cs b/src/TeleSharp.TL/TL/TLPhotoCachedSize.cs index 2625bad..d1c542c 100644 --- a/src/TeleSharp.TL/TL/TLPhotoCachedSize.cs +++ b/src/TeleSharp.TL/TL/TLPhotoCachedSize.cs @@ -19,7 +19,7 @@ namespace TeleSharp.TL } public string Type { get; set; } - public TLAbsFileLocation Location { get; set; } + public TLFileLocationToBeDeprecated Location { get; set; } public int W { get; set; } public int H { get; set; } public byte[] Bytes { get; set; } @@ -33,7 +33,7 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { Type = StringUtil.Deserialize(br); - Location = (TLAbsFileLocation)ObjectUtils.DeserializeObject(br); + Location = (TLFileLocationToBeDeprecated)ObjectUtils.DeserializeObject(br); W = br.ReadInt32(); H = br.ReadInt32(); Bytes = BytesUtil.Deserialize(br); diff --git a/src/TeleSharp.TL/TL/TLPhotoSize.cs b/src/TeleSharp.TL/TL/TLPhotoSize.cs index 877fc5f..5c1fc6f 100644 --- a/src/TeleSharp.TL/TL/TLPhotoSize.cs +++ b/src/TeleSharp.TL/TL/TLPhotoSize.cs @@ -19,7 +19,7 @@ namespace TeleSharp.TL } public string Type { get; set; } - public TLAbsFileLocation Location { get; set; } + public TLFileLocationToBeDeprecated Location { get; set; } public int W { get; set; } public int H { get; set; } public int Size { get; set; } @@ -33,7 +33,7 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { Type = StringUtil.Deserialize(br); - Location = (TLAbsFileLocation)ObjectUtils.DeserializeObject(br); + Location = (TLFileLocationToBeDeprecated)ObjectUtils.DeserializeObject(br); W = br.ReadInt32(); H = br.ReadInt32(); Size = br.ReadInt32(); diff --git a/src/TeleSharp.TL/TL/TLPhotoStrippedSize.cs b/src/TeleSharp.TL/TL/TLPhotoStrippedSize.cs new file mode 100644 index 0000000..c9fdfdd --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPhotoStrippedSize.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-525288402)] + public class TLPhotoStrippedSize : TLAbsPhotoSize + { + public override int Constructor + { + get + { + return -525288402; + } + } + + public string Type { get; set; } + public byte[] Bytes { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Type = StringUtil.Deserialize(br); + Bytes = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Type, bw); + BytesUtil.Serialize(Bytes, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPoll.cs b/src/TeleSharp.TL/TL/TLPoll.cs new file mode 100644 index 0000000..80eeb66 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPoll.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-716006138)] + public class TLPoll : TLObject + { + public override int Constructor + { + get + { + return -716006138; + } + } + + public long Id { get; set; } + public int Flags { get; set; } + public bool Closed { get; set; } + public bool PublicVoters { get; set; } + public bool MultipleChoice { get; set; } + public bool Quiz { get; set; } + public string Question { get; set; } + public TLVector Answers { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Id = br.ReadInt64(); + Flags = br.ReadInt32(); + Closed = (Flags & 1) != 0; + PublicVoters = (Flags & 2) != 0; + MultipleChoice = (Flags & 4) != 0; + Quiz = (Flags & 8) != 0; + Question = StringUtil.Deserialize(br); + Answers = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Id); + bw.Write(Flags); + + + + + StringUtil.Serialize(Question, bw); + ObjectUtils.SerializeObject(Answers, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPollAnswer.cs b/src/TeleSharp.TL/TL/TLPollAnswer.cs new file mode 100644 index 0000000..05f4118 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPollAnswer.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1823064809)] + public class TLPollAnswer : TLObject + { + public override int Constructor + { + get + { + return 1823064809; + } + } + + public string Text { get; set; } + public byte[] Option { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Text = StringUtil.Deserialize(br); + Option = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Text, bw); + BytesUtil.Serialize(Option, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPollAnswerVoters.cs b/src/TeleSharp.TL/TL/TLPollAnswerVoters.cs new file mode 100644 index 0000000..a8595b1 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPollAnswerVoters.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(997055186)] + public class TLPollAnswerVoters : TLObject + { + public override int Constructor + { + get + { + return 997055186; + } + } + + public int Flags { get; set; } + public bool Chosen { get; set; } + public bool Correct { get; set; } + public byte[] Option { get; set; } + public int Voters { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Chosen = (Flags & 1) != 0; + Correct = (Flags & 2) != 0; + Option = BytesUtil.Deserialize(br); + Voters = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + + BytesUtil.Serialize(Option, bw); + bw.Write(Voters); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPollResults.cs b/src/TeleSharp.TL/TL/TLPollResults.cs new file mode 100644 index 0000000..912f054 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPollResults.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1465219162)] + public class TLPollResults : TLObject + { + public override int Constructor + { + get + { + return 1465219162; + } + } + + public int Flags { get; set; } + public bool Min { get; set; } + public TLVector Results { get; set; } + public int? TotalVoters { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Min = (Flags & 1) != 0; + if ((Flags & 2) != 0) + Results = (TLVector)ObjectUtils.DeserializeVector(br); + else + Results = null; + + if ((Flags & 4) != 0) + TotalVoters = br.ReadInt32(); + else + TotalVoters = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + if ((Flags & 2) != 0) + ObjectUtils.SerializeObject(Results, bw); + if ((Flags & 4) != 0) + bw.Write(TotalVoters.Value); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPopularContact.cs b/src/TeleSharp.TL/TL/TLPopularContact.cs new file mode 100644 index 0000000..672036b --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPopularContact.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1558266229)] + public class TLPopularContact : TLObject + { + public override int Constructor + { + get + { + return 1558266229; + } + } + + public long ClientId { get; set; } + public int Importers { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + ClientId = br.ReadInt64(); + Importers = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(ClientId); + bw.Write(Importers); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPrivacyKeyAddedByPhone.cs b/src/TeleSharp.TL/TL/TLPrivacyKeyAddedByPhone.cs new file mode 100644 index 0000000..a3afdbe --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPrivacyKeyAddedByPhone.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1124062251)] + public class TLPrivacyKeyAddedByPhone : TLAbsPrivacyKey + { + public override int Constructor + { + get + { + return 1124062251; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPrivacyKeyForwards.cs b/src/TeleSharp.TL/TL/TLPrivacyKeyForwards.cs new file mode 100644 index 0000000..8ee9b0c --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPrivacyKeyForwards.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1777096355)] + public class TLPrivacyKeyForwards : TLAbsPrivacyKey + { + public override int Constructor + { + get + { + return 1777096355; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLContactLinkUnknown.cs b/src/TeleSharp.TL/TL/TLPrivacyKeyPhoneNumber.cs similarity index 82% rename from src/TeleSharp.TL/TL/TLContactLinkUnknown.cs rename to src/TeleSharp.TL/TL/TLPrivacyKeyPhoneNumber.cs index a4a4cd6..6ea31e8 100644 --- a/src/TeleSharp.TL/TL/TLContactLinkUnknown.cs +++ b/src/TeleSharp.TL/TL/TLPrivacyKeyPhoneNumber.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(1599050311)] - public class TLContactLinkUnknown : TLAbsContactLink + [TLObject(-778378131)] + public class TLPrivacyKeyPhoneNumber : TLAbsPrivacyKey { public override int Constructor { get { - return 1599050311; + return -778378131; } } diff --git a/src/TeleSharp.TL/TL/TLPrivacyKeyPhoneP2P.cs b/src/TeleSharp.TL/TL/TLPrivacyKeyPhoneP2P.cs new file mode 100644 index 0000000..08c69e0 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPrivacyKeyPhoneP2P.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(961092808)] + public class TLPrivacyKeyPhoneP2P : TLAbsPrivacyKey + { + public override int Constructor + { + get + { + return 961092808; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPrivacyKeyProfilePhoto.cs b/src/TeleSharp.TL/TL/TLPrivacyKeyProfilePhoto.cs new file mode 100644 index 0000000..4221a55 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPrivacyKeyProfilePhoto.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1777000467)] + public class TLPrivacyKeyProfilePhoto : TLAbsPrivacyKey + { + public override int Constructor + { + get + { + return -1777000467; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPrivacyValueAllowChatParticipants.cs b/src/TeleSharp.TL/TL/TLPrivacyValueAllowChatParticipants.cs new file mode 100644 index 0000000..11574ba --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPrivacyValueAllowChatParticipants.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(415136107)] + public class TLPrivacyValueAllowChatParticipants : TLAbsPrivacyRule + { + public override int Constructor + { + get + { + return 415136107; + } + } + + public TLVector Chats { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Chats = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Chats, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLPrivacyValueDisallowChatParticipants.cs b/src/TeleSharp.TL/TL/TLPrivacyValueDisallowChatParticipants.cs new file mode 100644 index 0000000..7380cb5 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLPrivacyValueDisallowChatParticipants.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1397881200)] + public class TLPrivacyValueDisallowChatParticipants : TLAbsPrivacyRule + { + public override int Constructor + { + get + { + return -1397881200; + } + } + + public TLVector Chats { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Chats = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Chats, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLReceivedNotifyMessage.cs b/src/TeleSharp.TL/TL/TLReceivedNotifyMessage.cs index 7990fde..095f0af 100644 --- a/src/TeleSharp.TL/TL/TLReceivedNotifyMessage.cs +++ b/src/TeleSharp.TL/TL/TLReceivedNotifyMessage.cs @@ -24,7 +24,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; } @@ -38,9 +37,8 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); - bw.Write(Flags); bw.Write(Id); + bw.Write(Flags); } } diff --git a/src/TeleSharp.TL/TL/TLRecentMeUrlChat.cs b/src/TeleSharp.TL/TL/TLRecentMeUrlChat.cs new file mode 100644 index 0000000..6ccc7fd --- /dev/null +++ b/src/TeleSharp.TL/TL/TLRecentMeUrlChat.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1608834311)] + public class TLRecentMeUrlChat : TLAbsRecentMeUrl + { + public override int Constructor + { + get + { + return -1608834311; + } + } + + public string Url { get; set; } + public int ChatId { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Url = StringUtil.Deserialize(br); + ChatId = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Url, bw); + bw.Write(ChatId); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLRecentMeUrlChatInvite.cs b/src/TeleSharp.TL/TL/TLRecentMeUrlChatInvite.cs new file mode 100644 index 0000000..8f52a93 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLRecentMeUrlChatInvite.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-347535331)] + public class TLRecentMeUrlChatInvite : TLAbsRecentMeUrl + { + public override int Constructor + { + get + { + return -347535331; + } + } + + public string Url { get; set; } + public TLAbsChatInvite ChatInvite { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Url = StringUtil.Deserialize(br); + ChatInvite = (TLAbsChatInvite)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Url, bw); + ObjectUtils.SerializeObject(ChatInvite, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLRecentMeUrlStickerSet.cs b/src/TeleSharp.TL/TL/TLRecentMeUrlStickerSet.cs new file mode 100644 index 0000000..90f83cd --- /dev/null +++ b/src/TeleSharp.TL/TL/TLRecentMeUrlStickerSet.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1140172836)] + public class TLRecentMeUrlStickerSet : TLAbsRecentMeUrl + { + public override int Constructor + { + get + { + return -1140172836; + } + } + + public string Url { get; set; } + public TLAbsStickerSetCovered Set { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Url = StringUtil.Deserialize(br); + Set = (TLAbsStickerSetCovered)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Url, bw); + ObjectUtils.SerializeObject(Set, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLRecentMeUrlUnknown.cs b/src/TeleSharp.TL/TL/TLRecentMeUrlUnknown.cs new file mode 100644 index 0000000..33e192c --- /dev/null +++ b/src/TeleSharp.TL/TL/TLRecentMeUrlUnknown.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1189204285)] + public class TLRecentMeUrlUnknown : TLAbsRecentMeUrl + { + public override int Constructor + { + get + { + return 1189204285; + } + } + + public string Url { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Url = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Url, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelParticipantKicked.cs b/src/TeleSharp.TL/TL/TLRecentMeUrlUser.cs similarity index 65% rename from src/TeleSharp.TL/TL/TLChannelParticipantKicked.cs rename to src/TeleSharp.TL/TL/TLRecentMeUrlUser.cs index 8559924..b6e536c 100644 --- a/src/TeleSharp.TL/TL/TLChannelParticipantKicked.cs +++ b/src/TeleSharp.TL/TL/TLRecentMeUrlUser.cs @@ -7,20 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1933187430)] - public class TLChannelParticipantKicked : TLAbsChannelParticipant + [TLObject(-1917045962)] + public class TLRecentMeUrlUser : TLAbsRecentMeUrl { public override int Constructor { get { - return -1933187430; + return -1917045962; } } + public string Url { get; set; } public int UserId { get; set; } - public int KickedBy { get; set; } - public int Date { get; set; } public void ComputeFlags() @@ -30,18 +29,16 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { + Url = StringUtil.Deserialize(br); UserId = br.ReadInt32(); - KickedBy = br.ReadInt32(); - Date = br.ReadInt32(); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + StringUtil.Serialize(Url, bw); bw.Write(UserId); - bw.Write(KickedBy); - bw.Write(Date); } } diff --git a/src/TeleSharp.TL/TL/TLReplyKeyboardForceReply.cs b/src/TeleSharp.TL/TL/TLReplyKeyboardForceReply.cs index a7ca09f..5283266 100644 --- a/src/TeleSharp.TL/TL/TLReplyKeyboardForceReply.cs +++ b/src/TeleSharp.TL/TL/TLReplyKeyboardForceReply.cs @@ -25,9 +25,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = SingleUse ? (Flags | 2) : (Flags & ~2); - Flags = Selective ? (Flags | 4) : (Flags & ~4); } @@ -42,7 +39,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); diff --git a/src/TeleSharp.TL/TL/TLReplyKeyboardHide.cs b/src/TeleSharp.TL/TL/TLReplyKeyboardHide.cs index 707a1cc..2376433 100644 --- a/src/TeleSharp.TL/TL/TLReplyKeyboardHide.cs +++ b/src/TeleSharp.TL/TL/TLReplyKeyboardHide.cs @@ -24,8 +24,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Selective ? (Flags | 4) : (Flags & ~4); } @@ -39,7 +37,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); diff --git a/src/TeleSharp.TL/TL/TLReplyKeyboardMarkup.cs b/src/TeleSharp.TL/TL/TLReplyKeyboardMarkup.cs index 7a9385f..8a7e3c6 100644 --- a/src/TeleSharp.TL/TL/TLReplyKeyboardMarkup.cs +++ b/src/TeleSharp.TL/TL/TLReplyKeyboardMarkup.cs @@ -27,10 +27,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Resize ? (Flags | 1) : (Flags & ~1); - Flags = SingleUse ? (Flags | 2) : (Flags & ~2); - Flags = Selective ? (Flags | 4) : (Flags & ~4); } @@ -47,7 +43,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); diff --git a/src/TeleSharp.TL/TL/TLRequestInitConnection.cs b/src/TeleSharp.TL/TL/TLRequestInitConnection.cs index 656fd4b..f2fa790 100644 --- a/src/TeleSharp.TL/TL/TLRequestInitConnection.cs +++ b/src/TeleSharp.TL/TL/TLRequestInitConnection.cs @@ -7,22 +7,27 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(1769565673)] + [TLObject(2018609336)] public class TLRequestInitConnection : TLMethod { public override int Constructor { get { - return 1769565673; + return 2018609336; } } + public int Flags { get; set; } public int ApiId { get; set; } public string DeviceModel { get; set; } public string SystemVersion { get; set; } public string AppVersion { get; set; } + public string SystemLangCode { get; set; } + public string LangPack { get; set; } public string LangCode { get; set; } + public TLInputClientProxy Proxy { get; set; } + public TLAbsJSONValue Params { get; set; } public TLObject Query { get; set; } public TLObject Response { get; set; } @@ -34,11 +39,24 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); ApiId = br.ReadInt32(); DeviceModel = StringUtil.Deserialize(br); SystemVersion = StringUtil.Deserialize(br); AppVersion = StringUtil.Deserialize(br); + SystemLangCode = StringUtil.Deserialize(br); + LangPack = StringUtil.Deserialize(br); LangCode = StringUtil.Deserialize(br); + if ((Flags & 1) != 0) + Proxy = (TLInputClientProxy)ObjectUtils.DeserializeObject(br); + else + Proxy = null; + + if ((Flags & 2) != 0) + Params = (TLAbsJSONValue)ObjectUtils.DeserializeObject(br); + else + Params = null; + Query = (TLObject)ObjectUtils.DeserializeObject(br); } @@ -46,11 +64,18 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); bw.Write(ApiId); StringUtil.Serialize(DeviceModel, bw); StringUtil.Serialize(SystemVersion, bw); StringUtil.Serialize(AppVersion, bw); + StringUtil.Serialize(SystemLangCode, bw); + StringUtil.Serialize(LangPack, bw); StringUtil.Serialize(LangCode, bw); + if ((Flags & 1) != 0) + ObjectUtils.SerializeObject(Proxy, bw); + if ((Flags & 2) != 0) + ObjectUtils.SerializeObject(Params, bw); ObjectUtils.SerializeObject(Query, bw); } diff --git a/src/TeleSharp.TL/TL/TLRequestInvokeWithMessagesRange.cs b/src/TeleSharp.TL/TL/TLRequestInvokeWithMessagesRange.cs new file mode 100644 index 0000000..211ae6c --- /dev/null +++ b/src/TeleSharp.TL/TL/TLRequestInvokeWithMessagesRange.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(911373810)] + public class TLRequestInvokeWithMessagesRange : TLMethod + { + public override int Constructor + { + get + { + return 911373810; + } + } + + public TLMessageRange Range { get; set; } + public TLObject Query { get; set; } + public TLObject Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Range = (TLMessageRange)ObjectUtils.DeserializeObject(br); + Query = (TLObject)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Range, bw); + ObjectUtils.SerializeObject(Query, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLObject)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLRequestInvokeWithTakeout.cs b/src/TeleSharp.TL/TL/TLRequestInvokeWithTakeout.cs new file mode 100644 index 0000000..b6d5ee9 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLRequestInvokeWithTakeout.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1398145746)] + public class TLRequestInvokeWithTakeout : TLMethod + { + public override int Constructor + { + get + { + return -1398145746; + } + } + + public long TakeoutId { get; set; } + public TLObject Query { get; set; } + public TLObject Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + TakeoutId = br.ReadInt64(); + Query = (TLObject)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(TakeoutId); + ObjectUtils.SerializeObject(Query, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLObject)ObjectUtils.DeserializeObject(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLRestrictionReason.cs b/src/TeleSharp.TL/TL/TLRestrictionReason.cs new file mode 100644 index 0000000..9232086 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLRestrictionReason.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-797791052)] + public class TLRestrictionReason : TLObject + { + public override int Constructor + { + get + { + return -797791052; + } + } + + public string Platform { get; set; } + public string Reason { get; set; } + public string Text { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Platform = StringUtil.Deserialize(br); + Reason = StringUtil.Deserialize(br); + Text = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Platform, bw); + StringUtil.Serialize(Reason, bw); + StringUtil.Serialize(Text, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSavedPhoneContact.cs b/src/TeleSharp.TL/TL/TLSavedPhoneContact.cs new file mode 100644 index 0000000..e4c1b05 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSavedPhoneContact.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(289586518)] + public class TLSavedPhoneContact : TLObject + { + public override int Constructor + { + get + { + return 289586518; + } + } + + public string Phone { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public int Date { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Phone = StringUtil.Deserialize(br); + FirstName = StringUtil.Deserialize(br); + LastName = StringUtil.Deserialize(br); + Date = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Phone, bw); + StringUtil.Serialize(FirstName, bw); + StringUtil.Serialize(LastName, bw); + bw.Write(Date); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureCredentialsEncrypted.cs b/src/TeleSharp.TL/TL/TLSecureCredentialsEncrypted.cs new file mode 100644 index 0000000..96fa719 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureCredentialsEncrypted.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(871426631)] + public class TLSecureCredentialsEncrypted : TLObject + { + public override int Constructor + { + get + { + return 871426631; + } + } + + public byte[] Data { get; set; } + public byte[] Hash { get; set; } + public byte[] Secret { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Data = BytesUtil.Deserialize(br); + Hash = BytesUtil.Deserialize(br); + Secret = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + BytesUtil.Serialize(Data, bw); + BytesUtil.Serialize(Hash, bw); + BytesUtil.Serialize(Secret, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureData.cs b/src/TeleSharp.TL/TL/TLSecureData.cs new file mode 100644 index 0000000..b3bf86d --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureData.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1964327229)] + public class TLSecureData : TLObject + { + public override int Constructor + { + get + { + return -1964327229; + } + } + + public byte[] Data { get; set; } + public byte[] DataHash { get; set; } + public byte[] Secret { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Data = BytesUtil.Deserialize(br); + DataHash = BytesUtil.Deserialize(br); + Secret = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + BytesUtil.Serialize(Data, bw); + BytesUtil.Serialize(DataHash, bw); + BytesUtil.Serialize(Secret, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureFile.cs b/src/TeleSharp.TL/TL/TLSecureFile.cs new file mode 100644 index 0000000..2198bb5 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureFile.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-534283678)] + public class TLSecureFile : TLAbsSecureFile + { + public override int Constructor + { + get + { + return -534283678; + } + } + + public long Id { get; set; } + public long AccessHash { get; set; } + public int Size { get; set; } + public int DcId { get; set; } + public int Date { get; set; } + public byte[] FileHash { get; set; } + public byte[] Secret { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Id = br.ReadInt64(); + AccessHash = br.ReadInt64(); + Size = br.ReadInt32(); + DcId = br.ReadInt32(); + Date = br.ReadInt32(); + FileHash = BytesUtil.Deserialize(br); + Secret = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Id); + bw.Write(AccessHash); + bw.Write(Size); + bw.Write(DcId); + bw.Write(Date); + BytesUtil.Serialize(FileHash, bw); + BytesUtil.Serialize(Secret, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureFileEmpty.cs b/src/TeleSharp.TL/TL/TLSecureFileEmpty.cs new file mode 100644 index 0000000..bf97ba7 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureFileEmpty.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1679398724)] + public class TLSecureFileEmpty : TLAbsSecureFile + { + public override int Constructor + { + get + { + return 1679398724; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000.cs b/src/TeleSharp.TL/TL/TLSecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000.cs new file mode 100644 index 0000000..b29ed64 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1141711456)] + public class TLSecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000 : TLAbsSecurePasswordKdfAlgo + { + public override int Constructor + { + get + { + return -1141711456; + } + } + + public byte[] Salt { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Salt = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + BytesUtil.Serialize(Salt, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecurePasswordKdfAlgoSHA512.cs b/src/TeleSharp.TL/TL/TLSecurePasswordKdfAlgoSHA512.cs new file mode 100644 index 0000000..fb14eb4 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecurePasswordKdfAlgoSHA512.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-2042159726)] + public class TLSecurePasswordKdfAlgoSHA512 : TLAbsSecurePasswordKdfAlgo + { + public override int Constructor + { + get + { + return -2042159726; + } + } + + public byte[] Salt { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Salt = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + BytesUtil.Serialize(Salt, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecurePasswordKdfAlgoUnknown.cs b/src/TeleSharp.TL/TL/TLSecurePasswordKdfAlgoUnknown.cs new file mode 100644 index 0000000..f89747f --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecurePasswordKdfAlgoUnknown.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(4883767)] + public class TLSecurePasswordKdfAlgoUnknown : TLAbsSecurePasswordKdfAlgo + { + public override int Constructor + { + get + { + return 4883767; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecurePlainEmail.cs b/src/TeleSharp.TL/TL/TLSecurePlainEmail.cs new file mode 100644 index 0000000..74d30dc --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecurePlainEmail.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(569137759)] + public class TLSecurePlainEmail : TLAbsSecurePlainData + { + public override int Constructor + { + get + { + return 569137759; + } + } + + public string Email { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Email = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Email, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecurePlainPhone.cs b/src/TeleSharp.TL/TL/TLSecurePlainPhone.cs new file mode 100644 index 0000000..6ba9a30 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecurePlainPhone.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(2103482845)] + public class TLSecurePlainPhone : TLAbsSecurePlainData + { + public override int Constructor + { + get + { + return 2103482845; + } + } + + public string Phone { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Phone = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Phone, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureRequiredType.cs b/src/TeleSharp.TL/TL/TLSecureRequiredType.cs new file mode 100644 index 0000000..90fb96a --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureRequiredType.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-2103600678)] + public class TLSecureRequiredType : TLAbsSecureRequiredType + { + public override int Constructor + { + get + { + return -2103600678; + } + } + + public int Flags { get; set; } + public bool NativeNames { get; set; } + public bool SelfieRequired { get; set; } + public bool TranslationRequired { get; set; } + public TLAbsSecureValueType Type { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + NativeNames = (Flags & 1) != 0; + SelfieRequired = (Flags & 2) != 0; + TranslationRequired = (Flags & 4) != 0; + Type = (TLAbsSecureValueType)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + + + ObjectUtils.SerializeObject(Type, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureRequiredTypeOneOf.cs b/src/TeleSharp.TL/TL/TLSecureRequiredTypeOneOf.cs new file mode 100644 index 0000000..efa277d --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureRequiredTypeOneOf.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(41187252)] + public class TLSecureRequiredTypeOneOf : TLAbsSecureRequiredType + { + public override int Constructor + { + get + { + return 41187252; + } + } + + public TLVector Types { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Types = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Types, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureSecretSettings.cs b/src/TeleSharp.TL/TL/TLSecureSecretSettings.cs new file mode 100644 index 0000000..45eaaa7 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureSecretSettings.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(354925740)] + public class TLSecureSecretSettings : TLObject + { + public override int Constructor + { + get + { + return 354925740; + } + } + + public TLAbsSecurePasswordKdfAlgo SecureAlgo { get; set; } + public byte[] SecureSecret { get; set; } + public long SecureSecretId { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + SecureAlgo = (TLAbsSecurePasswordKdfAlgo)ObjectUtils.DeserializeObject(br); + SecureSecret = BytesUtil.Deserialize(br); + SecureSecretId = br.ReadInt64(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(SecureAlgo, bw); + BytesUtil.Serialize(SecureSecret, bw); + bw.Write(SecureSecretId); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureValue.cs b/src/TeleSharp.TL/TL/TLSecureValue.cs new file mode 100644 index 0000000..b34040d --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValue.cs @@ -0,0 +1,104 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(411017418)] + public class TLSecureValue : TLObject + { + public override int Constructor + { + get + { + return 411017418; + } + } + + public int Flags { get; set; } + public TLAbsSecureValueType Type { get; set; } + public TLSecureData Data { get; set; } + public TLAbsSecureFile FrontSide { get; set; } + public TLAbsSecureFile ReverseSide { get; set; } + public TLAbsSecureFile Selfie { get; set; } + public TLVector Translation { get; set; } + public TLVector Files { get; set; } + public TLAbsSecurePlainData PlainData { get; set; } + public byte[] Hash { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Type = (TLAbsSecureValueType)ObjectUtils.DeserializeObject(br); + if ((Flags & 1) != 0) + Data = (TLSecureData)ObjectUtils.DeserializeObject(br); + else + Data = null; + + if ((Flags & 2) != 0) + FrontSide = (TLAbsSecureFile)ObjectUtils.DeserializeObject(br); + else + FrontSide = null; + + if ((Flags & 4) != 0) + ReverseSide = (TLAbsSecureFile)ObjectUtils.DeserializeObject(br); + else + ReverseSide = null; + + if ((Flags & 8) != 0) + Selfie = (TLAbsSecureFile)ObjectUtils.DeserializeObject(br); + else + Selfie = null; + + if ((Flags & 64) != 0) + Translation = (TLVector)ObjectUtils.DeserializeVector(br); + else + Translation = null; + + if ((Flags & 16) != 0) + Files = (TLVector)ObjectUtils.DeserializeVector(br); + else + Files = null; + + if ((Flags & 32) != 0) + PlainData = (TLAbsSecurePlainData)ObjectUtils.DeserializeObject(br); + else + PlainData = null; + + Hash = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + ObjectUtils.SerializeObject(Type, bw); + if ((Flags & 1) != 0) + ObjectUtils.SerializeObject(Data, bw); + if ((Flags & 2) != 0) + ObjectUtils.SerializeObject(FrontSide, bw); + if ((Flags & 4) != 0) + ObjectUtils.SerializeObject(ReverseSide, bw); + if ((Flags & 8) != 0) + ObjectUtils.SerializeObject(Selfie, bw); + if ((Flags & 64) != 0) + ObjectUtils.SerializeObject(Translation, bw); + if ((Flags & 16) != 0) + ObjectUtils.SerializeObject(Files, bw); + if ((Flags & 32) != 0) + ObjectUtils.SerializeObject(PlainData, bw); + BytesUtil.Serialize(Hash, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureValueError.cs b/src/TeleSharp.TL/TL/TLSecureValueError.cs new file mode 100644 index 0000000..a3c0e4a --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValueError.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-2036501105)] + public class TLSecureValueError : TLAbsSecureValueError + { + public override int Constructor + { + get + { + return -2036501105; + } + } + + public TLAbsSecureValueType Type { get; set; } + public byte[] Hash { get; set; } + public string Text { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Type = (TLAbsSecureValueType)ObjectUtils.DeserializeObject(br); + Hash = BytesUtil.Deserialize(br); + Text = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Type, bw); + BytesUtil.Serialize(Hash, bw); + StringUtil.Serialize(Text, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureValueErrorData.cs b/src/TeleSharp.TL/TL/TLSecureValueErrorData.cs new file mode 100644 index 0000000..e685ff2 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValueErrorData.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-391902247)] + public class TLSecureValueErrorData : TLAbsSecureValueError + { + public override int Constructor + { + get + { + return -391902247; + } + } + + public TLAbsSecureValueType Type { get; set; } + public byte[] DataHash { get; set; } + public string Field { get; set; } + public string Text { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Type = (TLAbsSecureValueType)ObjectUtils.DeserializeObject(br); + DataHash = BytesUtil.Deserialize(br); + Field = StringUtil.Deserialize(br); + Text = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Type, bw); + BytesUtil.Serialize(DataHash, bw); + StringUtil.Serialize(Field, bw); + StringUtil.Serialize(Text, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureValueErrorFile.cs b/src/TeleSharp.TL/TL/TLSecureValueErrorFile.cs new file mode 100644 index 0000000..f100745 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValueErrorFile.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(2054162547)] + public class TLSecureValueErrorFile : TLAbsSecureValueError + { + public override int Constructor + { + get + { + return 2054162547; + } + } + + public TLAbsSecureValueType Type { get; set; } + public byte[] FileHash { get; set; } + public string Text { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Type = (TLAbsSecureValueType)ObjectUtils.DeserializeObject(br); + FileHash = BytesUtil.Deserialize(br); + Text = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Type, bw); + BytesUtil.Serialize(FileHash, bw); + StringUtil.Serialize(Text, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureValueErrorFiles.cs b/src/TeleSharp.TL/TL/TLSecureValueErrorFiles.cs new file mode 100644 index 0000000..6c99ca0 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValueErrorFiles.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1717706985)] + public class TLSecureValueErrorFiles : TLAbsSecureValueError + { + public override int Constructor + { + get + { + return 1717706985; + } + } + + public TLAbsSecureValueType Type { get; set; } + public TLVector FileHash { get; set; } + public string Text { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Type = (TLAbsSecureValueType)ObjectUtils.DeserializeObject(br); + FileHash = (TLVector)ObjectUtils.DeserializeVector(br); + Text = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Type, bw); + ObjectUtils.SerializeObject(FileHash, bw); + StringUtil.Serialize(Text, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureValueErrorFrontSide.cs b/src/TeleSharp.TL/TL/TLSecureValueErrorFrontSide.cs new file mode 100644 index 0000000..4f63a17 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValueErrorFrontSide.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(12467706)] + public class TLSecureValueErrorFrontSide : TLAbsSecureValueError + { + public override int Constructor + { + get + { + return 12467706; + } + } + + public TLAbsSecureValueType Type { get; set; } + public byte[] FileHash { get; set; } + public string Text { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Type = (TLAbsSecureValueType)ObjectUtils.DeserializeObject(br); + FileHash = BytesUtil.Deserialize(br); + Text = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Type, bw); + BytesUtil.Serialize(FileHash, bw); + StringUtil.Serialize(Text, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureValueErrorReverseSide.cs b/src/TeleSharp.TL/TL/TLSecureValueErrorReverseSide.cs new file mode 100644 index 0000000..fc26699 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValueErrorReverseSide.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-2037765467)] + public class TLSecureValueErrorReverseSide : TLAbsSecureValueError + { + public override int Constructor + { + get + { + return -2037765467; + } + } + + public TLAbsSecureValueType Type { get; set; } + public byte[] FileHash { get; set; } + public string Text { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Type = (TLAbsSecureValueType)ObjectUtils.DeserializeObject(br); + FileHash = BytesUtil.Deserialize(br); + Text = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Type, bw); + BytesUtil.Serialize(FileHash, bw); + StringUtil.Serialize(Text, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureValueErrorSelfie.cs b/src/TeleSharp.TL/TL/TLSecureValueErrorSelfie.cs new file mode 100644 index 0000000..18b7790 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValueErrorSelfie.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-449327402)] + public class TLSecureValueErrorSelfie : TLAbsSecureValueError + { + public override int Constructor + { + get + { + return -449327402; + } + } + + public TLAbsSecureValueType Type { get; set; } + public byte[] FileHash { get; set; } + public string Text { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Type = (TLAbsSecureValueType)ObjectUtils.DeserializeObject(br); + FileHash = BytesUtil.Deserialize(br); + Text = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Type, bw); + BytesUtil.Serialize(FileHash, bw); + StringUtil.Serialize(Text, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureValueErrorTranslationFile.cs b/src/TeleSharp.TL/TL/TLSecureValueErrorTranslationFile.cs new file mode 100644 index 0000000..7e47888 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValueErrorTranslationFile.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1592506512)] + public class TLSecureValueErrorTranslationFile : TLAbsSecureValueError + { + public override int Constructor + { + get + { + return -1592506512; + } + } + + public TLAbsSecureValueType Type { get; set; } + public byte[] FileHash { get; set; } + public string Text { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Type = (TLAbsSecureValueType)ObjectUtils.DeserializeObject(br); + FileHash = BytesUtil.Deserialize(br); + Text = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Type, bw); + BytesUtil.Serialize(FileHash, bw); + StringUtil.Serialize(Text, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureValueErrorTranslationFiles.cs b/src/TeleSharp.TL/TL/TLSecureValueErrorTranslationFiles.cs new file mode 100644 index 0000000..b141632 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValueErrorTranslationFiles.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(878931416)] + public class TLSecureValueErrorTranslationFiles : TLAbsSecureValueError + { + public override int Constructor + { + get + { + return 878931416; + } + } + + public TLAbsSecureValueType Type { get; set; } + public TLVector FileHash { get; set; } + public string Text { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Type = (TLAbsSecureValueType)ObjectUtils.DeserializeObject(br); + FileHash = (TLVector)ObjectUtils.DeserializeVector(br); + Text = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Type, bw); + ObjectUtils.SerializeObject(FileHash, bw); + StringUtil.Serialize(Text, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureValueHash.cs b/src/TeleSharp.TL/TL/TLSecureValueHash.cs new file mode 100644 index 0000000..87dc445 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValueHash.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-316748368)] + public class TLSecureValueHash : TLObject + { + public override int Constructor + { + get + { + return -316748368; + } + } + + public TLAbsSecureValueType Type { get; set; } + public byte[] Hash { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Type = (TLAbsSecureValueType)ObjectUtils.DeserializeObject(br); + Hash = BytesUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Type, bw); + BytesUtil.Serialize(Hash, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureValueTypeAddress.cs b/src/TeleSharp.TL/TL/TLSecureValueTypeAddress.cs new file mode 100644 index 0000000..98d5ee3 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValueTypeAddress.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-874308058)] + public class TLSecureValueTypeAddress : TLAbsSecureValueType + { + public override int Constructor + { + get + { + return -874308058; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureValueTypeBankStatement.cs b/src/TeleSharp.TL/TL/TLSecureValueTypeBankStatement.cs new file mode 100644 index 0000000..27bbdef --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValueTypeBankStatement.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1995211763)] + public class TLSecureValueTypeBankStatement : TLAbsSecureValueType + { + public override int Constructor + { + get + { + return -1995211763; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureValueTypeDriverLicense.cs b/src/TeleSharp.TL/TL/TLSecureValueTypeDriverLicense.cs new file mode 100644 index 0000000..ccf929a --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValueTypeDriverLicense.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(115615172)] + public class TLSecureValueTypeDriverLicense : TLAbsSecureValueType + { + public override int Constructor + { + get + { + return 115615172; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureValueTypeEmail.cs b/src/TeleSharp.TL/TL/TLSecureValueTypeEmail.cs new file mode 100644 index 0000000..f3c3277 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValueTypeEmail.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1908627474)] + public class TLSecureValueTypeEmail : TLAbsSecureValueType + { + public override int Constructor + { + get + { + return -1908627474; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelRoleModerator.cs b/src/TeleSharp.TL/TL/TLSecureValueTypeIdentityCard.cs similarity index 80% rename from src/TeleSharp.TL/TL/TLChannelRoleModerator.cs rename to src/TeleSharp.TL/TL/TLSecureValueTypeIdentityCard.cs index 4c83bab..781b75e 100644 --- a/src/TeleSharp.TL/TL/TLChannelRoleModerator.cs +++ b/src/TeleSharp.TL/TL/TLSecureValueTypeIdentityCard.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1776756363)] - public class TLChannelRoleModerator : TLAbsChannelParticipantRole + [TLObject(-1596951477)] + public class TLSecureValueTypeIdentityCard : TLAbsSecureValueType { public override int Constructor { get { - return -1776756363; + return -1596951477; } } diff --git a/src/TeleSharp.TL/TL/TLSecureValueTypeInternalPassport.cs b/src/TeleSharp.TL/TL/TLSecureValueTypeInternalPassport.cs new file mode 100644 index 0000000..a15b0f2 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValueTypeInternalPassport.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1717268701)] + public class TLSecureValueTypeInternalPassport : TLAbsSecureValueType + { + public override int Constructor + { + get + { + return -1717268701; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLChannelRoleEmpty.cs b/src/TeleSharp.TL/TL/TLSecureValueTypePassport.cs similarity index 81% rename from src/TeleSharp.TL/TL/TLChannelRoleEmpty.cs rename to src/TeleSharp.TL/TL/TLSecureValueTypePassport.cs index 5382073..98e2c33 100644 --- a/src/TeleSharp.TL/TL/TLChannelRoleEmpty.cs +++ b/src/TeleSharp.TL/TL/TLSecureValueTypePassport.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1299865402)] - public class TLChannelRoleEmpty : TLAbsChannelParticipantRole + [TLObject(1034709504)] + public class TLSecureValueTypePassport : TLAbsSecureValueType { public override int Constructor { get { - return -1299865402; + return 1034709504; } } diff --git a/src/TeleSharp.TL/TL/TLSecureValueTypePassportRegistration.cs b/src/TeleSharp.TL/TL/TLSecureValueTypePassportRegistration.cs new file mode 100644 index 0000000..cd90d96 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValueTypePassportRegistration.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1713143702)] + public class TLSecureValueTypePassportRegistration : TLAbsSecureValueType + { + public override int Constructor + { + get + { + return -1713143702; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureValueTypePersonalDetails.cs b/src/TeleSharp.TL/TL/TLSecureValueTypePersonalDetails.cs new file mode 100644 index 0000000..849cdbf --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValueTypePersonalDetails.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1658158621)] + public class TLSecureValueTypePersonalDetails : TLAbsSecureValueType + { + public override int Constructor + { + get + { + return -1658158621; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureValueTypePhone.cs b/src/TeleSharp.TL/TL/TLSecureValueTypePhone.cs new file mode 100644 index 0000000..dde0794 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValueTypePhone.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1289704741)] + public class TLSecureValueTypePhone : TLAbsSecureValueType + { + public override int Constructor + { + get + { + return -1289704741; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureValueTypeRentalAgreement.cs b/src/TeleSharp.TL/TL/TLSecureValueTypeRentalAgreement.cs new file mode 100644 index 0000000..0f83044 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValueTypeRentalAgreement.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1954007928)] + public class TLSecureValueTypeRentalAgreement : TLAbsSecureValueType + { + public override int Constructor + { + get + { + return -1954007928; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureValueTypeTemporaryRegistration.cs b/src/TeleSharp.TL/TL/TLSecureValueTypeTemporaryRegistration.cs new file mode 100644 index 0000000..e259e2f --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValueTypeTemporaryRegistration.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-368907213)] + public class TLSecureValueTypeTemporaryRegistration : TLAbsSecureValueType + { + public override int Constructor + { + get + { + return -368907213; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLSecureValueTypeUtilityBill.cs b/src/TeleSharp.TL/TL/TLSecureValueTypeUtilityBill.cs new file mode 100644 index 0000000..d5cff50 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLSecureValueTypeUtilityBill.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-63531698)] + public class TLSecureValueTypeUtilityBill : TLAbsSecureValueType + { + public override int Constructor + { + get + { + return -63531698; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLStatsURL.cs b/src/TeleSharp.TL/TL/TLStatsURL.cs new file mode 100644 index 0000000..d3044a8 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLStatsURL.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1202287072)] + public class TLStatsURL : TLObject + { + public override int Constructor + { + get + { + return 1202287072; + } + } + + public string Url { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Url = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Url, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLStickerSet.cs b/src/TeleSharp.TL/TL/TLStickerSet.cs index 73724d1..ad877d5 100644 --- a/src/TeleSharp.TL/TL/TLStickerSet.cs +++ b/src/TeleSharp.TL/TL/TLStickerSet.cs @@ -7,51 +7,64 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-852477119)] + [TLObject(-290164953)] public class TLStickerSet : TLObject { public override int Constructor { get { - return -852477119; + return -290164953; } } public int Flags { get; set; } - public bool Installed { get; set; } public bool Archived { get; set; } public bool Official { get; set; } public bool Masks { get; set; } + public bool Animated { get; set; } + public int? InstalledDate { get; set; } public long Id { get; set; } public long AccessHash { get; set; } public string Title { get; set; } public string ShortName { get; set; } + public TLAbsPhotoSize Thumb { get; set; } + public int? ThumbDcId { get; set; } public int Count { get; set; } public int Hash { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Installed ? (Flags | 1) : (Flags & ~1); - Flags = Archived ? (Flags | 2) : (Flags & ~2); - Flags = Official ? (Flags | 4) : (Flags & ~4); - Flags = Masks ? (Flags | 8) : (Flags & ~8); } public override void DeserializeBody(BinaryReader br) { Flags = br.ReadInt32(); - Installed = (Flags & 1) != 0; Archived = (Flags & 2) != 0; Official = (Flags & 4) != 0; Masks = (Flags & 8) != 0; + Animated = (Flags & 32) != 0; + if ((Flags & 1) != 0) + InstalledDate = br.ReadInt32(); + else + InstalledDate = null; + Id = br.ReadInt64(); AccessHash = br.ReadInt64(); Title = StringUtil.Deserialize(br); ShortName = StringUtil.Deserialize(br); + if ((Flags & 16) != 0) + Thumb = (TLAbsPhotoSize)ObjectUtils.DeserializeObject(br); + else + Thumb = null; + + if ((Flags & 16) != 0) + ThumbDcId = br.ReadInt32(); + else + ThumbDcId = null; + Count = br.ReadInt32(); Hash = br.ReadInt32(); @@ -60,16 +73,21 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + if ((Flags & 1) != 0) + bw.Write(InstalledDate.Value); bw.Write(Id); bw.Write(AccessHash); StringUtil.Serialize(Title, bw); StringUtil.Serialize(ShortName, bw); + if ((Flags & 16) != 0) + ObjectUtils.SerializeObject(Thumb, bw); + if ((Flags & 16) != 0) + bw.Write(ThumbDcId.Value); bw.Write(Count); bw.Write(Hash); diff --git a/src/TeleSharp.TL/TL/TLTextAnchor.cs b/src/TeleSharp.TL/TL/TLTextAnchor.cs new file mode 100644 index 0000000..9ad2c59 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLTextAnchor.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(894777186)] + public class TLTextAnchor : TLAbsRichText + { + public override int Constructor + { + get + { + return 894777186; + } + } + + public TLAbsRichText Text { get; set; } + public string Name { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + Name = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Text, bw); + StringUtil.Serialize(Name, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLTextImage.cs b/src/TeleSharp.TL/TL/TLTextImage.cs new file mode 100644 index 0000000..0de5e60 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLTextImage.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(136105807)] + public class TLTextImage : TLAbsRichText + { + public override int Constructor + { + get + { + return 136105807; + } + } + + public long DocumentId { get; set; } + public int W { get; set; } + public int H { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + DocumentId = br.ReadInt64(); + W = br.ReadInt32(); + H = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(DocumentId); + bw.Write(W); + bw.Write(H); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLTextMarked.cs b/src/TeleSharp.TL/TL/TLTextMarked.cs new file mode 100644 index 0000000..7d603e6 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLTextMarked.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(55281185)] + public class TLTextMarked : TLAbsRichText + { + public override int Constructor + { + get + { + return 55281185; + } + } + + public TLAbsRichText Text { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Text, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLTextPhone.cs b/src/TeleSharp.TL/TL/TLTextPhone.cs new file mode 100644 index 0000000..744ddf9 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLTextPhone.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(483104362)] + public class TLTextPhone : TLAbsRichText + { + public override int Constructor + { + get + { + return 483104362; + } + } + + public TLAbsRichText Text { get; set; } + public string Phone { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + Phone = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Text, bw); + StringUtil.Serialize(Phone, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLTextSubscript.cs b/src/TeleSharp.TL/TL/TLTextSubscript.cs new file mode 100644 index 0000000..b2053af --- /dev/null +++ b/src/TeleSharp.TL/TL/TLTextSubscript.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-311786236)] + public class TLTextSubscript : TLAbsRichText + { + public override int Constructor + { + get + { + return -311786236; + } + } + + public TLAbsRichText Text { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Text, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLTextSuperscript.cs b/src/TeleSharp.TL/TL/TLTextSuperscript.cs new file mode 100644 index 0000000..b72d64a --- /dev/null +++ b/src/TeleSharp.TL/TL/TLTextSuperscript.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-939827711)] + public class TLTextSuperscript : TLAbsRichText + { + public override int Constructor + { + get + { + return -939827711; + } + } + + public TLAbsRichText Text { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Text = (TLAbsRichText)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Text, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLTheme.cs b/src/TeleSharp.TL/TL/TLTheme.cs new file mode 100644 index 0000000..0e54e91 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLTheme.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(42930452)] + public class TLTheme : TLObject + { + public override int Constructor + { + get + { + return 42930452; + } + } + + public int Flags { get; set; } + public bool Creator { get; set; } + public bool Default { get; set; } + public long Id { get; set; } + public long AccessHash { get; set; } + public string Slug { get; set; } + public string Title { get; set; } + public TLAbsDocument Document { get; set; } + public TLThemeSettings Settings { get; set; } + public int InstallsCount { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Creator = (Flags & 1) != 0; + Default = (Flags & 2) != 0; + Id = br.ReadInt64(); + AccessHash = br.ReadInt64(); + Slug = StringUtil.Deserialize(br); + Title = StringUtil.Deserialize(br); + if ((Flags & 4) != 0) + Document = (TLAbsDocument)ObjectUtils.DeserializeObject(br); + else + Document = null; + + if ((Flags & 8) != 0) + Settings = (TLThemeSettings)ObjectUtils.DeserializeObject(br); + else + Settings = null; + + InstallsCount = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + + bw.Write(Id); + bw.Write(AccessHash); + StringUtil.Serialize(Slug, bw); + StringUtil.Serialize(Title, bw); + if ((Flags & 4) != 0) + ObjectUtils.SerializeObject(Document, bw); + if ((Flags & 8) != 0) + ObjectUtils.SerializeObject(Settings, bw); + bw.Write(InstallsCount); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLThemeSettings.cs b/src/TeleSharp.TL/TL/TLThemeSettings.cs new file mode 100644 index 0000000..c574e04 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLThemeSettings.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1676371894)] + public class TLThemeSettings : TLObject + { + public override int Constructor + { + get + { + return -1676371894; + } + } + + public int Flags { get; set; } + public TLAbsBaseTheme BaseTheme { get; set; } + public int AccentColor { get; set; } + public int? MessageTopColor { get; set; } + public int? MessageBottomColor { get; set; } + public TLAbsWallPaper Wallpaper { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + BaseTheme = (TLAbsBaseTheme)ObjectUtils.DeserializeObject(br); + AccentColor = br.ReadInt32(); + if ((Flags & 1) != 0) + MessageTopColor = br.ReadInt32(); + else + MessageTopColor = null; + + if ((Flags & 1) != 0) + MessageBottomColor = br.ReadInt32(); + else + MessageBottomColor = null; + + if ((Flags & 2) != 0) + Wallpaper = (TLAbsWallPaper)ObjectUtils.DeserializeObject(br); + else + Wallpaper = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + ObjectUtils.SerializeObject(BaseTheme, bw); + bw.Write(AccentColor); + if ((Flags & 1) != 0) + bw.Write(MessageTopColor.Value); + if ((Flags & 1) != 0) + bw.Write(MessageBottomColor.Value); + if ((Flags & 2) != 0) + ObjectUtils.SerializeObject(Wallpaper, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLTopPeerCategoryForwardChats.cs b/src/TeleSharp.TL/TL/TLTopPeerCategoryForwardChats.cs new file mode 100644 index 0000000..082ba9a --- /dev/null +++ b/src/TeleSharp.TL/TL/TLTopPeerCategoryForwardChats.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-68239120)] + public class TLTopPeerCategoryForwardChats : TLAbsTopPeerCategory + { + public override int Constructor + { + get + { + return -68239120; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLTopPeerCategoryForwardUsers.cs b/src/TeleSharp.TL/TL/TLTopPeerCategoryForwardUsers.cs new file mode 100644 index 0000000..06c6001 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLTopPeerCategoryForwardUsers.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1472172887)] + public class TLTopPeerCategoryForwardUsers : TLAbsTopPeerCategory + { + public override int Constructor + { + get + { + return -1472172887; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLTopPeerCategoryPhoneCalls.cs b/src/TeleSharp.TL/TL/TLTopPeerCategoryPhoneCalls.cs new file mode 100644 index 0000000..d226367 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLTopPeerCategoryPhoneCalls.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(511092620)] + public class TLTopPeerCategoryPhoneCalls : TLAbsTopPeerCategory + { + public override int Constructor + { + get + { + return 511092620; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLUpdateBotCallbackQuery.cs b/src/TeleSharp.TL/TL/TLUpdateBotCallbackQuery.cs index a5b84ae..41f95cb 100644 --- a/src/TeleSharp.TL/TL/TLUpdateBotCallbackQuery.cs +++ b/src/TeleSharp.TL/TL/TLUpdateBotCallbackQuery.cs @@ -30,9 +30,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Data != null ? (Flags | 1) : (Flags & ~1); - Flags = GameShortName != null ? (Flags | 2) : (Flags & ~2); } @@ -60,7 +57,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(QueryId); bw.Write(UserId); diff --git a/src/TeleSharp.TL/TL/TLUpdateBotInlineQuery.cs b/src/TeleSharp.TL/TL/TLUpdateBotInlineQuery.cs index 24fbfa2..6dab6f0 100644 --- a/src/TeleSharp.TL/TL/TLUpdateBotInlineQuery.cs +++ b/src/TeleSharp.TL/TL/TLUpdateBotInlineQuery.cs @@ -28,8 +28,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Geo != null ? (Flags | 1) : (Flags & ~1); } @@ -51,7 +49,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(QueryId); bw.Write(UserId); diff --git a/src/TeleSharp.TL/TL/TLUpdateBotInlineSend.cs b/src/TeleSharp.TL/TL/TLUpdateBotInlineSend.cs index ab22b9b..694e732 100644 --- a/src/TeleSharp.TL/TL/TLUpdateBotInlineSend.cs +++ b/src/TeleSharp.TL/TL/TLUpdateBotInlineSend.cs @@ -28,9 +28,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Geo != null ? (Flags | 1) : (Flags & ~1); - Flags = MsgId != null ? (Flags | 2) : (Flags & ~2); } @@ -56,7 +53,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(UserId); StringUtil.Serialize(Query, bw); diff --git a/src/TeleSharp.TL/TL/TLUpdateBotPrecheckoutQuery.cs b/src/TeleSharp.TL/TL/TLUpdateBotPrecheckoutQuery.cs index 4db1daf..bfccc1c 100644 --- a/src/TeleSharp.TL/TL/TLUpdateBotPrecheckoutQuery.cs +++ b/src/TeleSharp.TL/TL/TLUpdateBotPrecheckoutQuery.cs @@ -30,9 +30,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Info != null ? (Flags | 1) : (Flags & ~1); - Flags = ShippingOptionId != null ? (Flags | 2) : (Flags & ~2); } @@ -60,7 +57,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(QueryId); bw.Write(UserId); diff --git a/src/TeleSharp.TL/TL/TLUpdateChannelAvailableMessages.cs b/src/TeleSharp.TL/TL/TLUpdateChannelAvailableMessages.cs new file mode 100644 index 0000000..2a07ed4 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLUpdateChannelAvailableMessages.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1893427255)] + public class TLUpdateChannelAvailableMessages : TLAbsUpdate + { + public override int Constructor + { + get + { + return 1893427255; + } + } + + public int ChannelId { get; set; } + public int AvailableMinId { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + ChannelId = br.ReadInt32(); + AvailableMinId = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(ChannelId); + bw.Write(AvailableMinId); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLUpdateChannelReadMessagesContents.cs b/src/TeleSharp.TL/TL/TLUpdateChannelReadMessagesContents.cs new file mode 100644 index 0000000..5154492 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLUpdateChannelReadMessagesContents.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1987495099)] + public class TLUpdateChannelReadMessagesContents : TLAbsUpdate + { + public override int Constructor + { + get + { + return -1987495099; + } + } + + public int ChannelId { get; set; } + public TLVector Messages { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + ChannelId = br.ReadInt32(); + Messages = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(ChannelId); + ObjectUtils.SerializeObject(Messages, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLUpdateChannelTooLong.cs b/src/TeleSharp.TL/TL/TLUpdateChannelTooLong.cs index e8c2b4d..82d3bca 100644 --- a/src/TeleSharp.TL/TL/TLUpdateChannelTooLong.cs +++ b/src/TeleSharp.TL/TL/TLUpdateChannelTooLong.cs @@ -25,8 +25,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Pts != null ? (Flags | 1) : (Flags & ~1); } @@ -45,7 +43,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(ChannelId); if ((Flags & 1) != 0) diff --git a/src/TeleSharp.TL/TL/TLUpdateChatDefaultBannedRights.cs b/src/TeleSharp.TL/TL/TLUpdateChatDefaultBannedRights.cs new file mode 100644 index 0000000..4db4083 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLUpdateChatDefaultBannedRights.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1421875280)] + public class TLUpdateChatDefaultBannedRights : TLAbsUpdate + { + public override int Constructor + { + get + { + return 1421875280; + } + } + + public TLAbsPeer Peer { get; set; } + public TLChatBannedRights DefaultBannedRights { get; set; } + public int Version { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsPeer)ObjectUtils.DeserializeObject(br); + DefaultBannedRights = (TLChatBannedRights)ObjectUtils.DeserializeObject(br); + Version = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + ObjectUtils.SerializeObject(DefaultBannedRights, bw); + bw.Write(Version); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLUpdateChatAdmins.cs b/src/TeleSharp.TL/TL/TLUpdateChatPinnedMessage.cs similarity index 75% rename from src/TeleSharp.TL/TL/TLUpdateChatAdmins.cs rename to src/TeleSharp.TL/TL/TLUpdateChatPinnedMessage.cs index 8632d9c..4063439 100644 --- a/src/TeleSharp.TL/TL/TLUpdateChatAdmins.cs +++ b/src/TeleSharp.TL/TL/TLUpdateChatPinnedMessage.cs @@ -7,19 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(1855224129)] - public class TLUpdateChatAdmins : TLAbsUpdate + [TLObject(-519195831)] + public class TLUpdateChatPinnedMessage : TLAbsUpdate { public override int Constructor { get { - return 1855224129; + return -519195831; } } public int ChatId { get; set; } - public bool Enabled { get; set; } + public int Id { get; set; } public int Version { get; set; } @@ -31,7 +31,7 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { ChatId = br.ReadInt32(); - Enabled = BoolUtil.Deserialize(br); + Id = br.ReadInt32(); Version = br.ReadInt32(); } @@ -40,7 +40,7 @@ namespace TeleSharp.TL { bw.Write(Constructor); bw.Write(ChatId); - BoolUtil.Serialize(Enabled, bw); + bw.Write(Id); bw.Write(Version); } diff --git a/src/TeleSharp.TL/TL/TLUpdateContactLink.cs b/src/TeleSharp.TL/TL/TLUpdateContactLink.cs deleted file mode 100644 index bba7e0b..0000000 --- a/src/TeleSharp.TL/TL/TLUpdateContactLink.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using TeleSharp.TL; -namespace TeleSharp.TL -{ - [TLObject(-1657903163)] - public class TLUpdateContactLink : TLAbsUpdate - { - public override int Constructor - { - get - { - return -1657903163; - } - } - - public int UserId { get; set; } - public TLAbsContactLink MyLink { get; set; } - public TLAbsContactLink ForeignLink { get; set; } - - - public void ComputeFlags() - { - - } - - public override void DeserializeBody(BinaryReader br) - { - UserId = br.ReadInt32(); - MyLink = (TLAbsContactLink)ObjectUtils.DeserializeObject(br); - ForeignLink = (TLAbsContactLink)ObjectUtils.DeserializeObject(br); - - } - - public override void SerializeBody(BinaryWriter bw) - { - bw.Write(Constructor); - bw.Write(UserId); - ObjectUtils.SerializeObject(MyLink, bw); - ObjectUtils.SerializeObject(ForeignLink, bw); - - } - } -} diff --git a/src/TeleSharp.TL/TL/TLUpdateContactsReset.cs b/src/TeleSharp.TL/TL/TLUpdateContactsReset.cs new file mode 100644 index 0000000..274f1f0 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLUpdateContactsReset.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1887741886)] + public class TLUpdateContactsReset : TLAbsUpdate + { + public override int Constructor + { + get + { + return 1887741886; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLUpdateDeleteScheduledMessages.cs b/src/TeleSharp.TL/TL/TLUpdateDeleteScheduledMessages.cs new file mode 100644 index 0000000..241e4e6 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLUpdateDeleteScheduledMessages.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1870238482)] + public class TLUpdateDeleteScheduledMessages : TLAbsUpdate + { + public override int Constructor + { + get + { + return -1870238482; + } + } + + public TLAbsPeer Peer { get; set; } + public TLVector Messages { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsPeer)ObjectUtils.DeserializeObject(br); + Messages = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + ObjectUtils.SerializeObject(Messages, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLUpdateDialogPinned.cs b/src/TeleSharp.TL/TL/TLUpdateDialogPinned.cs index e32d0c6..695fe89 100644 --- a/src/TeleSharp.TL/TL/TLUpdateDialogPinned.cs +++ b/src/TeleSharp.TL/TL/TLUpdateDialogPinned.cs @@ -7,26 +7,25 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-686710068)] + [TLObject(1852826908)] public class TLUpdateDialogPinned : TLAbsUpdate { public override int Constructor { get { - return -686710068; + return 1852826908; } } public int Flags { get; set; } public bool Pinned { get; set; } - public TLAbsPeer Peer { get; set; } + public int? FolderId { get; set; } + public TLAbsDialogPeer Peer { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Pinned ? (Flags | 1) : (Flags & ~1); } @@ -34,16 +33,22 @@ namespace TeleSharp.TL { Flags = br.ReadInt32(); Pinned = (Flags & 1) != 0; - Peer = (TLAbsPeer)ObjectUtils.DeserializeObject(br); + if ((Flags & 2) != 0) + FolderId = br.ReadInt32(); + else + FolderId = null; + + Peer = (TLAbsDialogPeer)ObjectUtils.DeserializeObject(br); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + if ((Flags & 2) != 0) + bw.Write(FolderId.Value); ObjectUtils.SerializeObject(Peer, bw); } diff --git a/src/TeleSharp.TL/TL/TLUpdateDialogUnreadMark.cs b/src/TeleSharp.TL/TL/TLUpdateDialogUnreadMark.cs new file mode 100644 index 0000000..2df1320 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLUpdateDialogUnreadMark.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-513517117)] + public class TLUpdateDialogUnreadMark : TLAbsUpdate + { + public override int Constructor + { + get + { + return -513517117; + } + } + + public int Flags { get; set; } + public bool Unread { get; set; } + public TLAbsDialogPeer Peer { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Unread = (Flags & 1) != 0; + Peer = (TLAbsDialogPeer)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + ObjectUtils.SerializeObject(Peer, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLUpdateFavedStickers.cs b/src/TeleSharp.TL/TL/TLUpdateFavedStickers.cs new file mode 100644 index 0000000..c994760 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLUpdateFavedStickers.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-451831443)] + public class TLUpdateFavedStickers : TLAbsUpdate + { + public override int Constructor + { + get + { + return -451831443; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLUpdateFolderPeers.cs b/src/TeleSharp.TL/TL/TLUpdateFolderPeers.cs new file mode 100644 index 0000000..8f5ba31 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLUpdateFolderPeers.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(422972864)] + public class TLUpdateFolderPeers : TLAbsUpdate + { + public override int Constructor + { + get + { + return 422972864; + } + } + + public TLVector FolderPeers { get; set; } + public int Pts { get; set; } + public int PtsCount { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + FolderPeers = (TLVector)ObjectUtils.DeserializeVector(br); + Pts = br.ReadInt32(); + PtsCount = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(FolderPeers, bw); + bw.Write(Pts); + bw.Write(PtsCount); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLUpdateGeoLiveViewed.cs b/src/TeleSharp.TL/TL/TLUpdateGeoLiveViewed.cs new file mode 100644 index 0000000..d99a2ed --- /dev/null +++ b/src/TeleSharp.TL/TL/TLUpdateGeoLiveViewed.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-2027964103)] + public class TLUpdateGeoLiveViewed : TLAbsUpdate + { + public override int Constructor + { + get + { + return -2027964103; + } + } + + public TLAbsPeer Peer { get; set; } + public int MsgId { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsPeer)ObjectUtils.DeserializeObject(br); + MsgId = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + bw.Write(MsgId); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLUpdateInlineBotCallbackQuery.cs b/src/TeleSharp.TL/TL/TLUpdateInlineBotCallbackQuery.cs index 24d36be..4a54d2e 100644 --- a/src/TeleSharp.TL/TL/TLUpdateInlineBotCallbackQuery.cs +++ b/src/TeleSharp.TL/TL/TLUpdateInlineBotCallbackQuery.cs @@ -29,9 +29,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Data != null ? (Flags | 1) : (Flags & ~1); - Flags = GameShortName != null ? (Flags | 2) : (Flags & ~2); } @@ -58,7 +55,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(QueryId); bw.Write(UserId); diff --git a/src/TeleSharp.TL/TL/TLUpdateLangPack.cs b/src/TeleSharp.TL/TL/TLUpdateLangPack.cs new file mode 100644 index 0000000..732b8c3 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLUpdateLangPack.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1442983757)] + public class TLUpdateLangPack : TLAbsUpdate + { + public override int Constructor + { + get + { + return 1442983757; + } + } + + public TLLangPackDifference Difference { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Difference = (TLLangPackDifference)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Difference, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLUpdateLangPackTooLong.cs b/src/TeleSharp.TL/TL/TLUpdateLangPackTooLong.cs new file mode 100644 index 0000000..e91a6f1 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLUpdateLangPackTooLong.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1180041828)] + public class TLUpdateLangPackTooLong : TLAbsUpdate + { + public override int Constructor + { + get + { + return 1180041828; + } + } + + public string LangCode { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + LangCode = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(LangCode, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLUpdateLoginToken.cs b/src/TeleSharp.TL/TL/TLUpdateLoginToken.cs new file mode 100644 index 0000000..a4a3ef3 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLUpdateLoginToken.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1448076945)] + public class TLUpdateLoginToken : TLAbsUpdate + { + public override int Constructor + { + get + { + return 1448076945; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLUpdateMessagePoll.cs b/src/TeleSharp.TL/TL/TLUpdateMessagePoll.cs new file mode 100644 index 0000000..ad1127b --- /dev/null +++ b/src/TeleSharp.TL/TL/TLUpdateMessagePoll.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1398708869)] + public class TLUpdateMessagePoll : TLAbsUpdate + { + public override int Constructor + { + get + { + return -1398708869; + } + } + + public int Flags { get; set; } + public long PollId { get; set; } + public TLPoll Poll { get; set; } + public TLPollResults Results { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + PollId = br.ReadInt64(); + if ((Flags & 1) != 0) + Poll = (TLPoll)ObjectUtils.DeserializeObject(br); + else + Poll = null; + + Results = (TLPollResults)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + bw.Write(PollId); + if ((Flags & 1) != 0) + ObjectUtils.SerializeObject(Poll, bw); + ObjectUtils.SerializeObject(Results, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLUpdateNewScheduledMessage.cs b/src/TeleSharp.TL/TL/TLUpdateNewScheduledMessage.cs new file mode 100644 index 0000000..a4714f0 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLUpdateNewScheduledMessage.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(967122427)] + public class TLUpdateNewScheduledMessage : TLAbsUpdate + { + public override int Constructor + { + get + { + return 967122427; + } + } + + public TLAbsMessage Message { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Message = (TLAbsMessage)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Message, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLUpdateNotifySettings.cs b/src/TeleSharp.TL/TL/TLUpdateNotifySettings.cs index 7fa5fca..3714f83 100644 --- a/src/TeleSharp.TL/TL/TLUpdateNotifySettings.cs +++ b/src/TeleSharp.TL/TL/TLUpdateNotifySettings.cs @@ -19,7 +19,7 @@ namespace TeleSharp.TL } public TLAbsNotifyPeer Peer { get; set; } - public TLAbsPeerNotifySettings NotifySettings { get; set; } + public TLPeerNotifySettings NotifySettings { get; set; } public void ComputeFlags() @@ -30,7 +30,7 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { Peer = (TLAbsNotifyPeer)ObjectUtils.DeserializeObject(br); - NotifySettings = (TLAbsPeerNotifySettings)ObjectUtils.DeserializeObject(br); + NotifySettings = (TLPeerNotifySettings)ObjectUtils.DeserializeObject(br); } diff --git a/src/TeleSharp.TL/TL/TLUpdatePeerLocated.cs b/src/TeleSharp.TL/TL/TLUpdatePeerLocated.cs new file mode 100644 index 0000000..eab67fd --- /dev/null +++ b/src/TeleSharp.TL/TL/TLUpdatePeerLocated.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1263546448)] + public class TLUpdatePeerLocated : TLAbsUpdate + { + public override int Constructor + { + get + { + return -1263546448; + } + } + + public TLVector Peers { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peers = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peers, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLUpdatePeerSettings.cs b/src/TeleSharp.TL/TL/TLUpdatePeerSettings.cs new file mode 100644 index 0000000..86094cd --- /dev/null +++ b/src/TeleSharp.TL/TL/TLUpdatePeerSettings.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1786671974)] + public class TLUpdatePeerSettings : TLAbsUpdate + { + public override int Constructor + { + get + { + return 1786671974; + } + } + + public TLAbsPeer Peer { get; set; } + public TLPeerSettings Settings { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Peer = (TLAbsPeer)ObjectUtils.DeserializeObject(br); + Settings = (TLPeerSettings)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Peer, bw); + ObjectUtils.SerializeObject(Settings, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLUpdatePinnedDialogs.cs b/src/TeleSharp.TL/TL/TLUpdatePinnedDialogs.cs index 270db76..da27fd6 100644 --- a/src/TeleSharp.TL/TL/TLUpdatePinnedDialogs.cs +++ b/src/TeleSharp.TL/TL/TLUpdatePinnedDialogs.cs @@ -7,33 +7,37 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-657787251)] + [TLObject(-99664734)] public class TLUpdatePinnedDialogs : TLAbsUpdate { public override int Constructor { get { - return -657787251; + return -99664734; } } public int Flags { get; set; } - public TLVector Order { get; set; } + public int? FolderId { get; set; } + public TLVector Order { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Order != null ? (Flags | 1) : (Flags & ~1); } public override void DeserializeBody(BinaryReader br) { Flags = br.ReadInt32(); + if ((Flags & 2) != 0) + FolderId = br.ReadInt32(); + else + FolderId = null; + if ((Flags & 1) != 0) - Order = (TLVector)ObjectUtils.DeserializeVector(br); + Order = (TLVector)ObjectUtils.DeserializeVector(br); else Order = null; @@ -43,8 +47,9 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + if ((Flags & 2) != 0) + bw.Write(FolderId.Value); if ((Flags & 1) != 0) ObjectUtils.SerializeObject(Order, bw); diff --git a/src/TeleSharp.TL/TL/TLUpdateReadChannelInbox.cs b/src/TeleSharp.TL/TL/TLUpdateReadChannelInbox.cs index bc0e875..f57a5fc 100644 --- a/src/TeleSharp.TL/TL/TLUpdateReadChannelInbox.cs +++ b/src/TeleSharp.TL/TL/TLUpdateReadChannelInbox.cs @@ -7,19 +7,23 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(1108669311)] + [TLObject(856380452)] public class TLUpdateReadChannelInbox : TLAbsUpdate { public override int Constructor { get { - return 1108669311; + return 856380452; } } + public int Flags { get; set; } + public int? FolderId { get; set; } public int ChannelId { get; set; } public int MaxId { get; set; } + public int StillUnreadCount { get; set; } + public int Pts { get; set; } public void ComputeFlags() @@ -29,16 +33,29 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); + if ((Flags & 1) != 0) + FolderId = br.ReadInt32(); + else + FolderId = null; + ChannelId = br.ReadInt32(); MaxId = br.ReadInt32(); + StillUnreadCount = br.ReadInt32(); + Pts = br.ReadInt32(); } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); + if ((Flags & 1) != 0) + bw.Write(FolderId.Value); bw.Write(ChannelId); bw.Write(MaxId); + bw.Write(StillUnreadCount); + bw.Write(Pts); } } diff --git a/src/TeleSharp.TL/TL/TLUpdateReadHistoryInbox.cs b/src/TeleSharp.TL/TL/TLUpdateReadHistoryInbox.cs index 7334caa..c31dd8c 100644 --- a/src/TeleSharp.TL/TL/TLUpdateReadHistoryInbox.cs +++ b/src/TeleSharp.TL/TL/TLUpdateReadHistoryInbox.cs @@ -7,19 +7,22 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-1721631396)] + [TLObject(-1667805217)] public class TLUpdateReadHistoryInbox : TLAbsUpdate { public override int Constructor { get { - return -1721631396; + return -1667805217; } } + public int Flags { get; set; } + public int? FolderId { get; set; } public TLAbsPeer Peer { get; set; } public int MaxId { get; set; } + public int StillUnreadCount { get; set; } public int Pts { get; set; } public int PtsCount { get; set; } @@ -31,8 +34,15 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); + if ((Flags & 1) != 0) + FolderId = br.ReadInt32(); + else + FolderId = null; + Peer = (TLAbsPeer)ObjectUtils.DeserializeObject(br); MaxId = br.ReadInt32(); + StillUnreadCount = br.ReadInt32(); Pts = br.ReadInt32(); PtsCount = br.ReadInt32(); @@ -41,8 +51,12 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); + if ((Flags & 1) != 0) + bw.Write(FolderId.Value); ObjectUtils.SerializeObject(Peer, bw); bw.Write(MaxId); + bw.Write(StillUnreadCount); bw.Write(Pts); bw.Write(PtsCount); diff --git a/src/TeleSharp.TL/TL/TLUpdateServiceNotification.cs b/src/TeleSharp.TL/TL/TLUpdateServiceNotification.cs index f2a70e8..8d30766 100644 --- a/src/TeleSharp.TL/TL/TLUpdateServiceNotification.cs +++ b/src/TeleSharp.TL/TL/TLUpdateServiceNotification.cs @@ -29,9 +29,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Popup ? (Flags | 1) : (Flags & ~1); - Flags = InboxDate != null ? (Flags | 2) : (Flags & ~2); } @@ -54,7 +51,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); if ((Flags & 2) != 0) diff --git a/src/TeleSharp.TL/TL/TLUpdateShortChatMessage.cs b/src/TeleSharp.TL/TL/TLUpdateShortChatMessage.cs index eed4f17..d89a621 100644 --- a/src/TeleSharp.TL/TL/TLUpdateShortChatMessage.cs +++ b/src/TeleSharp.TL/TL/TLUpdateShortChatMessage.cs @@ -38,15 +38,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Out ? (Flags | 2) : (Flags & ~2); - Flags = Mentioned ? (Flags | 16) : (Flags & ~16); - Flags = MediaUnread ? (Flags | 32) : (Flags & ~32); - Flags = Silent ? (Flags | 8192) : (Flags & ~8192); - Flags = FwdFrom != null ? (Flags | 4) : (Flags & ~4); - Flags = ViaBotId != null ? (Flags | 2048) : (Flags & ~2048); - Flags = ReplyToMsgId != null ? (Flags | 8) : (Flags & ~8); - Flags = Entities != null ? (Flags | 128) : (Flags & ~128); } @@ -90,7 +81,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); diff --git a/src/TeleSharp.TL/TL/TLUpdateShortMessage.cs b/src/TeleSharp.TL/TL/TLUpdateShortMessage.cs index 822d255..79b764c 100644 --- a/src/TeleSharp.TL/TL/TLUpdateShortMessage.cs +++ b/src/TeleSharp.TL/TL/TLUpdateShortMessage.cs @@ -37,15 +37,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Out ? (Flags | 2) : (Flags & ~2); - Flags = Mentioned ? (Flags | 16) : (Flags & ~16); - Flags = MediaUnread ? (Flags | 32) : (Flags & ~32); - Flags = Silent ? (Flags | 8192) : (Flags & ~8192); - Flags = FwdFrom != null ? (Flags | 4) : (Flags & ~4); - Flags = ViaBotId != null ? (Flags | 2048) : (Flags & ~2048); - Flags = ReplyToMsgId != null ? (Flags | 8) : (Flags & ~8); - Flags = Entities != null ? (Flags | 128) : (Flags & ~128); } @@ -88,7 +79,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); diff --git a/src/TeleSharp.TL/TL/TLUpdateShortSentMessage.cs b/src/TeleSharp.TL/TL/TLUpdateShortSentMessage.cs index 24ddc2a..2382ee0 100644 --- a/src/TeleSharp.TL/TL/TLUpdateShortSentMessage.cs +++ b/src/TeleSharp.TL/TL/TLUpdateShortSentMessage.cs @@ -30,10 +30,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Out ? (Flags | 2) : (Flags & ~2); - Flags = Media != null ? (Flags | 512) : (Flags & ~512); - Flags = Entities != null ? (Flags | 128) : (Flags & ~128); } @@ -61,7 +57,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(Id); diff --git a/src/TeleSharp.TL/TL/TLUpdateStickerSetsOrder.cs b/src/TeleSharp.TL/TL/TLUpdateStickerSetsOrder.cs index 0f0de13..8c5836f 100644 --- a/src/TeleSharp.TL/TL/TLUpdateStickerSetsOrder.cs +++ b/src/TeleSharp.TL/TL/TLUpdateStickerSetsOrder.cs @@ -25,8 +25,6 @@ namespace TeleSharp.TL public void ComputeFlags() { - Flags = 0; - Flags = Masks ? (Flags | 1) : (Flags & ~1); } @@ -41,7 +39,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); ObjectUtils.SerializeObject(Order, bw); diff --git a/src/TeleSharp.TL/TL/TLUpdateTheme.cs b/src/TeleSharp.TL/TL/TLUpdateTheme.cs new file mode 100644 index 0000000..455007e --- /dev/null +++ b/src/TeleSharp.TL/TL/TLUpdateTheme.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-2112423005)] + public class TLUpdateTheme : TLAbsUpdate + { + public override int Constructor + { + get + { + return -2112423005; + } + } + + public TLTheme Theme { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Theme = (TLTheme)ObjectUtils.DeserializeObject(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Theme, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLUpdateContactRegistered.cs b/src/TeleSharp.TL/TL/TLUpdateUserPinnedMessage.cs similarity index 75% rename from src/TeleSharp.TL/TL/TLUpdateContactRegistered.cs rename to src/TeleSharp.TL/TL/TLUpdateUserPinnedMessage.cs index 5cc83f7..55adfda 100644 --- a/src/TeleSharp.TL/TL/TLUpdateContactRegistered.cs +++ b/src/TeleSharp.TL/TL/TLUpdateUserPinnedMessage.cs @@ -7,19 +7,19 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(628472761)] - public class TLUpdateContactRegistered : TLAbsUpdate + [TLObject(1279515160)] + public class TLUpdateUserPinnedMessage : TLAbsUpdate { public override int Constructor { get { - return 628472761; + return 1279515160; } } public int UserId { get; set; } - public int Date { get; set; } + public int Id { get; set; } public void ComputeFlags() @@ -30,7 +30,7 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { UserId = br.ReadInt32(); - Date = br.ReadInt32(); + Id = br.ReadInt32(); } @@ -38,7 +38,7 @@ namespace TeleSharp.TL { bw.Write(Constructor); bw.Write(UserId); - bw.Write(Date); + bw.Write(Id); } } diff --git a/src/TeleSharp.TL/TL/TLUrlAuthResultAccepted.cs b/src/TeleSharp.TL/TL/TLUrlAuthResultAccepted.cs new file mode 100644 index 0000000..d7c8120 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLUrlAuthResultAccepted.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1886646706)] + public class TLUrlAuthResultAccepted : TLAbsUrlAuthResult + { + public override int Constructor + { + get + { + return -1886646706; + } + } + + public string Url { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Url = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Url, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLUrlAuthResultDefault.cs b/src/TeleSharp.TL/TL/TLUrlAuthResultDefault.cs new file mode 100644 index 0000000..1ca3324 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLUrlAuthResultDefault.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1445536993)] + public class TLUrlAuthResultDefault : TLAbsUrlAuthResult + { + public override int Constructor + { + get + { + return -1445536993; + } + } + + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLUrlAuthResultRequest.cs b/src/TeleSharp.TL/TL/TLUrlAuthResultRequest.cs new file mode 100644 index 0000000..a1e94dc --- /dev/null +++ b/src/TeleSharp.TL/TL/TLUrlAuthResultRequest.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1831650802)] + public class TLUrlAuthResultRequest : TLAbsUrlAuthResult + { + public override int Constructor + { + get + { + return -1831650802; + } + } + + public int Flags { get; set; } + public bool RequestWriteAccess { get; set; } + public TLAbsUser Bot { get; set; } + public string Domain { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + RequestWriteAccess = (Flags & 1) != 0; + Bot = (TLAbsUser)ObjectUtils.DeserializeObject(br); + Domain = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + ObjectUtils.SerializeObject(Bot, bw); + StringUtil.Serialize(Domain, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLUser.cs b/src/TeleSharp.TL/TL/TLUser.cs index 4456102..6562956 100644 --- a/src/TeleSharp.TL/TL/TLUser.cs +++ b/src/TeleSharp.TL/TL/TLUser.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(773059779)] + [TLObject(-1820043071)] public class TLUser : TLAbsUser { public override int Constructor { get { - return 773059779; + return -1820043071; } } @@ -30,6 +30,8 @@ namespace TeleSharp.TL public bool Restricted { get; set; } public bool Min { get; set; } public bool BotInlineGeo { get; set; } + public bool Support { get; set; } + public bool Scam { get; set; } public int Id { get; set; } public long? AccessHash { get; set; } public string FirstName { get; set; } @@ -39,36 +41,13 @@ namespace TeleSharp.TL public TLAbsUserProfilePhoto Photo { get; set; } public TLAbsUserStatus Status { get; set; } public int? BotInfoVersion { get; set; } - public string RestrictionReason { get; set; } + public TLVector RestrictionReason { get; set; } public string BotInlinePlaceholder { get; set; } public string LangCode { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Self ? (Flags | 1024) : (Flags & ~1024); - Flags = Contact ? (Flags | 2048) : (Flags & ~2048); - Flags = MutualContact ? (Flags | 4096) : (Flags & ~4096); - Flags = Deleted ? (Flags | 8192) : (Flags & ~8192); - Flags = Bot ? (Flags | 16384) : (Flags & ~16384); - Flags = BotChatHistory ? (Flags | 32768) : (Flags & ~32768); - Flags = BotNochats ? (Flags | 65536) : (Flags & ~65536); - Flags = Verified ? (Flags | 131072) : (Flags & ~131072); - Flags = Restricted ? (Flags | 262144) : (Flags & ~262144); - Flags = Min ? (Flags | 1048576) : (Flags & ~1048576); - Flags = BotInlineGeo ? (Flags | 2097152) : (Flags & ~2097152); - Flags = AccessHash != null ? (Flags | 1) : (Flags & ~1); - Flags = FirstName != null ? (Flags | 2) : (Flags & ~2); - Flags = LastName != null ? (Flags | 4) : (Flags & ~4); - Flags = Username != null ? (Flags | 8) : (Flags & ~8); - Flags = Phone != null ? (Flags | 16) : (Flags & ~16); - Flags = Photo != null ? (Flags | 32) : (Flags & ~32); - Flags = Status != null ? (Flags | 64) : (Flags & ~64); - Flags = BotInfoVersion != null ? (Flags | 16384) : (Flags & ~16384); - Flags = RestrictionReason != null ? (Flags | 262144) : (Flags & ~262144); - Flags = BotInlinePlaceholder != null ? (Flags | 524288) : (Flags & ~524288); - Flags = LangCode != null ? (Flags | 4194304) : (Flags & ~4194304); } @@ -86,6 +65,8 @@ namespace TeleSharp.TL Restricted = (Flags & 262144) != 0; Min = (Flags & 1048576) != 0; BotInlineGeo = (Flags & 2097152) != 0; + Support = (Flags & 8388608) != 0; + Scam = (Flags & 16777216) != 0; Id = br.ReadInt32(); if ((Flags & 1) != 0) AccessHash = br.ReadInt64(); @@ -128,7 +109,7 @@ namespace TeleSharp.TL BotInfoVersion = null; if ((Flags & 262144) != 0) - RestrictionReason = StringUtil.Deserialize(br); + RestrictionReason = (TLVector)ObjectUtils.DeserializeVector(br); else RestrictionReason = null; @@ -148,7 +129,6 @@ namespace TeleSharp.TL public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); @@ -161,6 +141,8 @@ namespace TeleSharp.TL + + bw.Write(Id); if ((Flags & 1) != 0) bw.Write(AccessHash.Value); @@ -179,7 +161,7 @@ namespace TeleSharp.TL if ((Flags & 16384) != 0) bw.Write(BotInfoVersion.Value); if ((Flags & 262144) != 0) - StringUtil.Serialize(RestrictionReason, bw); + ObjectUtils.SerializeObject(RestrictionReason, bw); if ((Flags & 524288) != 0) StringUtil.Serialize(BotInlinePlaceholder, bw); if ((Flags & 4194304) != 0) diff --git a/src/TeleSharp.TL/TL/TLUserFull.cs b/src/TeleSharp.TL/TL/TLUserFull.cs index 370852f..2ef6b13 100644 --- a/src/TeleSharp.TL/TL/TLUserFull.cs +++ b/src/TeleSharp.TL/TL/TLUserFull.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(253890367)] + [TLObject(-302941166)] public class TLUserFull : TLObject { public override int Constructor { get { - return 253890367; + return -302941166; } } @@ -22,24 +22,21 @@ namespace TeleSharp.TL public bool Blocked { get; set; } public bool PhoneCallsAvailable { get; set; } public bool PhoneCallsPrivate { get; set; } + public bool CanPinMessage { get; set; } + public bool HasScheduled { get; set; } public TLAbsUser User { get; set; } public string About { get; set; } - public Contacts.TLLink Link { get; set; } + public TLPeerSettings Settings { get; set; } public TLAbsPhoto ProfilePhoto { get; set; } - public TLAbsPeerNotifySettings NotifySettings { get; set; } + public TLPeerNotifySettings NotifySettings { get; set; } public TLBotInfo BotInfo { get; set; } + public int? PinnedMsgId { get; set; } public int CommonChatsCount { get; set; } + public int? FolderId { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Blocked ? (Flags | 1) : (Flags & ~1); - Flags = PhoneCallsAvailable ? (Flags | 16) : (Flags & ~16); - Flags = PhoneCallsPrivate ? (Flags | 32) : (Flags & ~32); - Flags = About != null ? (Flags | 2) : (Flags & ~2); - Flags = ProfilePhoto != null ? (Flags | 4) : (Flags & ~4); - Flags = BotInfo != null ? (Flags | 8) : (Flags & ~8); } @@ -49,46 +46,63 @@ namespace TeleSharp.TL Blocked = (Flags & 1) != 0; PhoneCallsAvailable = (Flags & 16) != 0; PhoneCallsPrivate = (Flags & 32) != 0; + CanPinMessage = (Flags & 128) != 0; + HasScheduled = (Flags & 4096) != 0; User = (TLAbsUser)ObjectUtils.DeserializeObject(br); if ((Flags & 2) != 0) About = StringUtil.Deserialize(br); else About = null; - Link = (Contacts.TLLink)ObjectUtils.DeserializeObject(br); + Settings = (TLPeerSettings)ObjectUtils.DeserializeObject(br); if ((Flags & 4) != 0) ProfilePhoto = (TLAbsPhoto)ObjectUtils.DeserializeObject(br); else ProfilePhoto = null; - NotifySettings = (TLAbsPeerNotifySettings)ObjectUtils.DeserializeObject(br); + NotifySettings = (TLPeerNotifySettings)ObjectUtils.DeserializeObject(br); if ((Flags & 8) != 0) BotInfo = (TLBotInfo)ObjectUtils.DeserializeObject(br); else BotInfo = null; + if ((Flags & 64) != 0) + PinnedMsgId = br.ReadInt32(); + else + PinnedMsgId = null; + CommonChatsCount = br.ReadInt32(); + if ((Flags & 2048) != 0) + FolderId = br.ReadInt32(); + else + FolderId = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); + + ObjectUtils.SerializeObject(User, bw); if ((Flags & 2) != 0) StringUtil.Serialize(About, bw); - ObjectUtils.SerializeObject(Link, bw); + ObjectUtils.SerializeObject(Settings, bw); if ((Flags & 4) != 0) ObjectUtils.SerializeObject(ProfilePhoto, bw); ObjectUtils.SerializeObject(NotifySettings, bw); if ((Flags & 8) != 0) ObjectUtils.SerializeObject(BotInfo, bw); + if ((Flags & 64) != 0) + bw.Write(PinnedMsgId.Value); bw.Write(CommonChatsCount); + if ((Flags & 2048) != 0) + bw.Write(FolderId.Value); } } diff --git a/src/TeleSharp.TL/TL/TLUserProfilePhoto.cs b/src/TeleSharp.TL/TL/TLUserProfilePhoto.cs index a6a774e..f23793f 100644 --- a/src/TeleSharp.TL/TL/TLUserProfilePhoto.cs +++ b/src/TeleSharp.TL/TL/TLUserProfilePhoto.cs @@ -7,20 +7,21 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-715532088)] + [TLObject(-321430132)] public class TLUserProfilePhoto : TLAbsUserProfilePhoto { public override int Constructor { get { - return -715532088; + return -321430132; } } public long PhotoId { get; set; } - public TLAbsFileLocation PhotoSmall { get; set; } - public TLAbsFileLocation PhotoBig { get; set; } + public TLFileLocationToBeDeprecated PhotoSmall { get; set; } + public TLFileLocationToBeDeprecated PhotoBig { get; set; } + public int DcId { get; set; } public void ComputeFlags() @@ -31,8 +32,9 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { PhotoId = br.ReadInt64(); - PhotoSmall = (TLAbsFileLocation)ObjectUtils.DeserializeObject(br); - PhotoBig = (TLAbsFileLocation)ObjectUtils.DeserializeObject(br); + PhotoSmall = (TLFileLocationToBeDeprecated)ObjectUtils.DeserializeObject(br); + PhotoBig = (TLFileLocationToBeDeprecated)ObjectUtils.DeserializeObject(br); + DcId = br.ReadInt32(); } @@ -42,6 +44,7 @@ namespace TeleSharp.TL bw.Write(PhotoId); ObjectUtils.SerializeObject(PhotoSmall, bw); ObjectUtils.SerializeObject(PhotoBig, bw); + bw.Write(DcId); } } diff --git a/src/TeleSharp.TL/TL/TLVector.cs b/src/TeleSharp.TL/TL/TLVector.cs index 562ceb0..c46d9db 100644 --- a/src/TeleSharp.TL/TL/TLVector.cs +++ b/src/TeleSharp.TL/TL/TLVector.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(481674261)] + [TLObject(481674261)] public class TLVector : TLObject { public override int Constructor @@ -18,22 +18,22 @@ namespace TeleSharp.TL } } - - public void ComputeFlags() - { - - } + + public void ComputeFlags() + { + + } public override void DeserializeBody(BinaryReader br) { - + } public override void SerializeBody(BinaryWriter bw) { - bw.Write(Constructor); - + bw.Write(Constructor); + } } } diff --git a/src/TeleSharp.TL/TL/TLWallPaper.cs b/src/TeleSharp.TL/TL/TLWallPaper.cs index ece244d..741cd72 100644 --- a/src/TeleSharp.TL/TL/TLWallPaper.cs +++ b/src/TeleSharp.TL/TL/TLWallPaper.cs @@ -7,21 +7,27 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-860866985)] + [TLObject(-1539849235)] public class TLWallPaper : TLAbsWallPaper { public override int Constructor { get { - return -860866985; + return -1539849235; } } - public int Id { get; set; } - public string Title { get; set; } - public TLVector Sizes { get; set; } - public int Color { get; set; } + public long Id { get; set; } + public int Flags { get; set; } + public bool Creator { get; set; } + public bool Default { get; set; } + public bool Pattern { get; set; } + public bool Dark { get; set; } + public long AccessHash { get; set; } + public string Slug { get; set; } + public TLAbsDocument Document { get; set; } + public TLWallPaperSettings Settings { get; set; } public void ComputeFlags() @@ -31,10 +37,20 @@ namespace TeleSharp.TL public override void DeserializeBody(BinaryReader br) { - Id = br.ReadInt32(); - Title = StringUtil.Deserialize(br); - Sizes = (TLVector)ObjectUtils.DeserializeVector(br); - Color = br.ReadInt32(); + Id = br.ReadInt64(); + Flags = br.ReadInt32(); + Creator = (Flags & 1) != 0; + Default = (Flags & 2) != 0; + Pattern = (Flags & 8) != 0; + Dark = (Flags & 16) != 0; + AccessHash = br.ReadInt64(); + Slug = StringUtil.Deserialize(br); + Document = (TLAbsDocument)ObjectUtils.DeserializeObject(br); + if ((Flags & 4) != 0) + Settings = (TLWallPaperSettings)ObjectUtils.DeserializeObject(br); + else + Settings = null; + } @@ -42,9 +58,16 @@ namespace TeleSharp.TL { bw.Write(Constructor); bw.Write(Id); - StringUtil.Serialize(Title, bw); - ObjectUtils.SerializeObject(Sizes, bw); - bw.Write(Color); + bw.Write(Flags); + + + + + bw.Write(AccessHash); + StringUtil.Serialize(Slug, bw); + ObjectUtils.SerializeObject(Document, bw); + if ((Flags & 4) != 0) + ObjectUtils.SerializeObject(Settings, bw); } } diff --git a/src/TeleSharp.TL/TL/TLWallPaperNoFile.cs b/src/TeleSharp.TL/TL/TLWallPaperNoFile.cs new file mode 100644 index 0000000..30825f7 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLWallPaperNoFile.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-1963717851)] + public class TLWallPaperNoFile : TLAbsWallPaper + { + public override int Constructor + { + get + { + return -1963717851; + } + } + + public int Flags { get; set; } + public bool Default { get; set; } + public bool Dark { get; set; } + public TLWallPaperSettings Settings { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Default = (Flags & 2) != 0; + Dark = (Flags & 16) != 0; + if ((Flags & 4) != 0) + Settings = (TLWallPaperSettings)ObjectUtils.DeserializeObject(br); + else + Settings = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + + if ((Flags & 4) != 0) + ObjectUtils.SerializeObject(Settings, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLWallPaperSettings.cs b/src/TeleSharp.TL/TL/TLWallPaperSettings.cs new file mode 100644 index 0000000..d1ef709 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLWallPaperSettings.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(84438264)] + public class TLWallPaperSettings : TLObject + { + public override int Constructor + { + get + { + return 84438264; + } + } + + public int Flags { get; set; } + public bool Blur { get; set; } + public bool Motion { get; set; } + public int? BackgroundColor { get; set; } + public int? SecondBackgroundColor { get; set; } + public int? Intensity { get; set; } + public int? Rotation { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + Blur = (Flags & 2) != 0; + Motion = (Flags & 4) != 0; + if ((Flags & 1) != 0) + BackgroundColor = br.ReadInt32(); + else + BackgroundColor = null; + + if ((Flags & 16) != 0) + SecondBackgroundColor = br.ReadInt32(); + else + SecondBackgroundColor = null; + + if ((Flags & 8) != 0) + Intensity = br.ReadInt32(); + else + Intensity = null; + + if ((Flags & 16) != 0) + Rotation = br.ReadInt32(); + else + Rotation = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + + + if ((Flags & 1) != 0) + bw.Write(BackgroundColor.Value); + if ((Flags & 16) != 0) + bw.Write(SecondBackgroundColor.Value); + if ((Flags & 8) != 0) + bw.Write(Intensity.Value); + if ((Flags & 16) != 0) + bw.Write(Rotation.Value); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLWallPaperSolid.cs b/src/TeleSharp.TL/TL/TLWallPaperSolid.cs deleted file mode 100644 index 3ddfda0..0000000 --- a/src/TeleSharp.TL/TL/TLWallPaperSolid.cs +++ /dev/null @@ -1,51 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using TeleSharp.TL; -namespace TeleSharp.TL -{ - [TLObject(1662091044)] - public class TLWallPaperSolid : TLAbsWallPaper - { - public override int Constructor - { - get - { - return 1662091044; - } - } - - public int Id { get; set; } - public string Title { get; set; } - public int BgColor { get; set; } - public int Color { get; set; } - - - public void ComputeFlags() - { - - } - - public override void DeserializeBody(BinaryReader br) - { - Id = br.ReadInt32(); - Title = StringUtil.Deserialize(br); - BgColor = br.ReadInt32(); - Color = br.ReadInt32(); - - } - - public override void SerializeBody(BinaryWriter bw) - { - bw.Write(Constructor); - bw.Write(Id); - StringUtil.Serialize(Title, bw); - bw.Write(BgColor); - bw.Write(Color); - - } - } -} diff --git a/src/TeleSharp.TL/TL/TLWebAuthorization.cs b/src/TeleSharp.TL/TL/TLWebAuthorization.cs new file mode 100644 index 0000000..a9ab6fe --- /dev/null +++ b/src/TeleSharp.TL/TL/TLWebAuthorization.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-892779534)] + public class TLWebAuthorization : TLObject + { + public override int Constructor + { + get + { + return -892779534; + } + } + + public long Hash { get; set; } + public int BotId { get; set; } + public string Domain { get; set; } + public string Browser { get; set; } + public string Platform { get; set; } + public int DateCreated { get; set; } + public int DateActive { get; set; } + public string Ip { get; set; } + public string Region { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Hash = br.ReadInt64(); + BotId = br.ReadInt32(); + Domain = StringUtil.Deserialize(br); + Browser = StringUtil.Deserialize(br); + Platform = StringUtil.Deserialize(br); + DateCreated = br.ReadInt32(); + DateActive = br.ReadInt32(); + Ip = StringUtil.Deserialize(br); + Region = StringUtil.Deserialize(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Hash); + bw.Write(BotId); + StringUtil.Serialize(Domain, bw); + StringUtil.Serialize(Browser, bw); + StringUtil.Serialize(Platform, bw); + bw.Write(DateCreated); + bw.Write(DateActive); + StringUtil.Serialize(Ip, bw); + StringUtil.Serialize(Region, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLWebDocument.cs b/src/TeleSharp.TL/TL/TLWebDocument.cs index 321d0dd..06cadcf 100644 --- a/src/TeleSharp.TL/TL/TLWebDocument.cs +++ b/src/TeleSharp.TL/TL/TLWebDocument.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(-971322408)] - public class TLWebDocument : TLObject + [TLObject(475467473)] + public class TLWebDocument : TLAbsWebDocument { public override int Constructor { get { - return -971322408; + return 475467473; } } @@ -23,7 +23,6 @@ namespace TeleSharp.TL public int Size { get; set; } public string MimeType { get; set; } public TLVector Attributes { get; set; } - public int DcId { get; set; } public void ComputeFlags() @@ -38,7 +37,6 @@ namespace TeleSharp.TL Size = br.ReadInt32(); MimeType = StringUtil.Deserialize(br); Attributes = (TLVector)ObjectUtils.DeserializeVector(br); - DcId = br.ReadInt32(); } @@ -50,7 +48,6 @@ namespace TeleSharp.TL bw.Write(Size); StringUtil.Serialize(MimeType, bw); ObjectUtils.SerializeObject(Attributes, bw); - bw.Write(DcId); } } diff --git a/src/TeleSharp.TL/TL/TLWebDocumentNoProxy.cs b/src/TeleSharp.TL/TL/TLWebDocumentNoProxy.cs new file mode 100644 index 0000000..93a73e8 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLWebDocumentNoProxy.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(-104284986)] + public class TLWebDocumentNoProxy : TLAbsWebDocument + { + public override int Constructor + { + get + { + return -104284986; + } + } + + public string Url { get; set; } + public int Size { get; set; } + public string MimeType { get; set; } + public TLVector Attributes { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Url = StringUtil.Deserialize(br); + Size = br.ReadInt32(); + MimeType = StringUtil.Deserialize(br); + Attributes = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + StringUtil.Serialize(Url, bw); + bw.Write(Size); + StringUtil.Serialize(MimeType, bw); + ObjectUtils.SerializeObject(Attributes, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/TLWebPage.cs b/src/TeleSharp.TL/TL/TLWebPage.cs index b673437..4625baa 100644 --- a/src/TeleSharp.TL/TL/TLWebPage.cs +++ b/src/TeleSharp.TL/TL/TLWebPage.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL { - [TLObject(1594340540)] + [TLObject(-392411726)] public class TLWebPage : TLAbsWebPage { public override int Constructor { get { - return 1594340540; + return -392411726; } } @@ -35,25 +35,12 @@ namespace TeleSharp.TL public int? Duration { get; set; } public string Author { get; set; } public TLAbsDocument Document { get; set; } - public TLAbsPage CachedPage { get; set; } + public TLPage CachedPage { get; set; } + public TLVector Attributes { get; set; } public void ComputeFlags() { - Flags = 0; - Flags = Type != null ? (Flags | 1) : (Flags & ~1); - Flags = SiteName != null ? (Flags | 2) : (Flags & ~2); - Flags = Title != null ? (Flags | 4) : (Flags & ~4); - Flags = Description != null ? (Flags | 8) : (Flags & ~8); - Flags = Photo != null ? (Flags | 16) : (Flags & ~16); - Flags = EmbedUrl != null ? (Flags | 32) : (Flags & ~32); - Flags = EmbedType != null ? (Flags | 32) : (Flags & ~32); - Flags = EmbedWidth != null ? (Flags | 64) : (Flags & ~64); - Flags = EmbedHeight != null ? (Flags | 64) : (Flags & ~64); - Flags = Duration != null ? (Flags | 128) : (Flags & ~128); - Flags = Author != null ? (Flags | 256) : (Flags & ~256); - Flags = Document != null ? (Flags | 512) : (Flags & ~512); - Flags = CachedPage != null ? (Flags | 1024) : (Flags & ~1024); } @@ -125,17 +112,21 @@ namespace TeleSharp.TL Document = null; if ((Flags & 1024) != 0) - CachedPage = (TLAbsPage)ObjectUtils.DeserializeObject(br); + CachedPage = (TLPage)ObjectUtils.DeserializeObject(br); else CachedPage = null; + if ((Flags & 4096) != 0) + Attributes = (TLVector)ObjectUtils.DeserializeVector(br); + else + Attributes = null; + } public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(Id); StringUtil.Serialize(Url, bw); @@ -167,6 +158,8 @@ namespace TeleSharp.TL ObjectUtils.SerializeObject(Document, bw); if ((Flags & 1024) != 0) ObjectUtils.SerializeObject(CachedPage, bw); + if ((Flags & 4096) != 0) + ObjectUtils.SerializeObject(Attributes, bw); } } diff --git a/src/TeleSharp.TL/TL/TLWebPageAttributeTheme.cs b/src/TeleSharp.TL/TL/TLWebPageAttributeTheme.cs new file mode 100644 index 0000000..98ab6d5 --- /dev/null +++ b/src/TeleSharp.TL/TL/TLWebPageAttributeTheme.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL +{ + [TLObject(1421174295)] + public class TLWebPageAttributeTheme : TLObject + { + public override int Constructor + { + get + { + return 1421174295; + } + } + + public int Flags { get; set; } + public TLVector Documents { get; set; } + public TLThemeSettings Settings { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Flags = br.ReadInt32(); + if ((Flags & 1) != 0) + Documents = (TLVector)ObjectUtils.DeserializeVector(br); + else + Documents = null; + + if ((Flags & 2) != 0) + Settings = (TLThemeSettings)ObjectUtils.DeserializeObject(br); + else + Settings = null; + + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + bw.Write(Flags); + if ((Flags & 1) != 0) + ObjectUtils.SerializeObject(Documents, bw); + if ((Flags & 2) != 0) + ObjectUtils.SerializeObject(Settings, bw); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Updates/TLChannelDifference.cs b/src/TeleSharp.TL/TL/Updates/TLChannelDifference.cs index deb181d..e12d3f1 100644 --- a/src/TeleSharp.TL/TL/Updates/TLChannelDifference.cs +++ b/src/TeleSharp.TL/TL/Updates/TLChannelDifference.cs @@ -30,9 +30,6 @@ namespace TeleSharp.TL.Updates public void ComputeFlags() { - Flags = 0; - Flags = Final ? (Flags | 1) : (Flags & ~1); - Flags = Timeout != null ? (Flags | 2) : (Flags & ~2); } @@ -56,7 +53,6 @@ namespace TeleSharp.TL.Updates public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(Pts); diff --git a/src/TeleSharp.TL/TL/Updates/TLChannelDifferenceEmpty.cs b/src/TeleSharp.TL/TL/Updates/TLChannelDifferenceEmpty.cs index 9850a3f..ea9766d 100644 --- a/src/TeleSharp.TL/TL/Updates/TLChannelDifferenceEmpty.cs +++ b/src/TeleSharp.TL/TL/Updates/TLChannelDifferenceEmpty.cs @@ -26,9 +26,6 @@ namespace TeleSharp.TL.Updates public void ComputeFlags() { - Flags = 0; - Flags = Final ? (Flags | 1) : (Flags & ~1); - Flags = Timeout != null ? (Flags | 2) : (Flags & ~2); } @@ -48,7 +45,6 @@ namespace TeleSharp.TL.Updates public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(Pts); diff --git a/src/TeleSharp.TL/TL/Updates/TLChannelDifferenceTooLong.cs b/src/TeleSharp.TL/TL/Updates/TLChannelDifferenceTooLong.cs index a21b8fb..8adf18c 100644 --- a/src/TeleSharp.TL/TL/Updates/TLChannelDifferenceTooLong.cs +++ b/src/TeleSharp.TL/TL/Updates/TLChannelDifferenceTooLong.cs @@ -7,25 +7,21 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Updates { - [TLObject(1091431943)] + [TLObject(-1531132162)] public class TLChannelDifferenceTooLong : TLAbsChannelDifference { public override int Constructor { get { - return 1091431943; + return -1531132162; } } public int Flags { get; set; } public bool Final { get; set; } - public int Pts { get; set; } public int? Timeout { get; set; } - public int TopMessage { get; set; } - public int ReadInboxMaxId { get; set; } - public int ReadOutboxMaxId { get; set; } - public int UnreadCount { get; set; } + public TLAbsDialog Dialog { get; set; } public TLVector Messages { get; set; } public TLVector Chats { get; set; } public TLVector Users { get; set; } @@ -33,9 +29,6 @@ namespace TeleSharp.TL.Updates public void ComputeFlags() { - Flags = 0; - Flags = Final ? (Flags | 1) : (Flags & ~1); - Flags = Timeout != null ? (Flags | 2) : (Flags & ~2); } @@ -43,16 +36,12 @@ namespace TeleSharp.TL.Updates { Flags = br.ReadInt32(); Final = (Flags & 1) != 0; - Pts = br.ReadInt32(); if ((Flags & 2) != 0) Timeout = br.ReadInt32(); else Timeout = null; - TopMessage = br.ReadInt32(); - ReadInboxMaxId = br.ReadInt32(); - ReadOutboxMaxId = br.ReadInt32(); - UnreadCount = br.ReadInt32(); + Dialog = (TLAbsDialog)ObjectUtils.DeserializeObject(br); Messages = (TLVector)ObjectUtils.DeserializeVector(br); Chats = (TLVector)ObjectUtils.DeserializeVector(br); Users = (TLVector)ObjectUtils.DeserializeVector(br); @@ -62,16 +51,11 @@ namespace TeleSharp.TL.Updates public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); - bw.Write(Pts); if ((Flags & 2) != 0) bw.Write(Timeout.Value); - bw.Write(TopMessage); - bw.Write(ReadInboxMaxId); - bw.Write(ReadOutboxMaxId); - bw.Write(UnreadCount); + ObjectUtils.SerializeObject(Dialog, bw); ObjectUtils.SerializeObject(Messages, bw); ObjectUtils.SerializeObject(Chats, bw); ObjectUtils.SerializeObject(Users, bw); diff --git a/src/TeleSharp.TL/TL/Updates/TLRequestGetChannelDifference.cs b/src/TeleSharp.TL/TL/Updates/TLRequestGetChannelDifference.cs index dc212f6..66654db 100644 --- a/src/TeleSharp.TL/TL/Updates/TLRequestGetChannelDifference.cs +++ b/src/TeleSharp.TL/TL/Updates/TLRequestGetChannelDifference.cs @@ -29,8 +29,6 @@ namespace TeleSharp.TL.Updates public void ComputeFlags() { - Flags = 0; - Flags = Force ? (Flags | 1) : (Flags & ~1); } @@ -48,7 +46,6 @@ namespace TeleSharp.TL.Updates public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); ObjectUtils.SerializeObject(Channel, bw); diff --git a/src/TeleSharp.TL/TL/Updates/TLRequestGetDifference.cs b/src/TeleSharp.TL/TL/Updates/TLRequestGetDifference.cs index c02d8f6..c7d9e1d 100644 --- a/src/TeleSharp.TL/TL/Updates/TLRequestGetDifference.cs +++ b/src/TeleSharp.TL/TL/Updates/TLRequestGetDifference.cs @@ -28,8 +28,6 @@ namespace TeleSharp.TL.Updates public void ComputeFlags() { - Flags = 0; - Flags = PtsTotalLimit != null ? (Flags | 1) : (Flags & ~1); } @@ -50,7 +48,6 @@ namespace TeleSharp.TL.Updates public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); - ComputeFlags(); bw.Write(Flags); bw.Write(Pts); if ((Flags & 1) != 0) diff --git a/src/TeleSharp.TL/TL/Upload/TLFileCdnRedirect.cs b/src/TeleSharp.TL/TL/Upload/TLFileCdnRedirect.cs index 5d492b5..d98fcff 100644 --- a/src/TeleSharp.TL/TL/Upload/TLFileCdnRedirect.cs +++ b/src/TeleSharp.TL/TL/Upload/TLFileCdnRedirect.cs @@ -7,14 +7,14 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Upload { - [TLObject(352864346)] + [TLObject(-242427324)] public class TLFileCdnRedirect : TLAbsFile { public override int Constructor { get { - return 352864346; + return -242427324; } } @@ -22,6 +22,7 @@ namespace TeleSharp.TL.Upload public byte[] FileToken { get; set; } public byte[] EncryptionKey { get; set; } public byte[] EncryptionIv { get; set; } + public TLVector FileHashes { get; set; } public void ComputeFlags() @@ -35,6 +36,7 @@ namespace TeleSharp.TL.Upload FileToken = BytesUtil.Deserialize(br); EncryptionKey = BytesUtil.Deserialize(br); EncryptionIv = BytesUtil.Deserialize(br); + FileHashes = (TLVector)ObjectUtils.DeserializeVector(br); } @@ -45,6 +47,7 @@ namespace TeleSharp.TL.Upload BytesUtil.Serialize(FileToken, bw); BytesUtil.Serialize(EncryptionKey, bw); BytesUtil.Serialize(EncryptionIv, bw); + ObjectUtils.SerializeObject(FileHashes, bw); } } diff --git a/src/TeleSharp.TL/TL/Upload/TLRequestGetCdnFileHashes.cs b/src/TeleSharp.TL/TL/Upload/TLRequestGetCdnFileHashes.cs new file mode 100644 index 0000000..3cd65ec --- /dev/null +++ b/src/TeleSharp.TL/TL/Upload/TLRequestGetCdnFileHashes.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Upload +{ + [TLObject(1302676017)] + public class TLRequestGetCdnFileHashes : TLMethod + { + public override int Constructor + { + get + { + return 1302676017; + } + } + + public byte[] FileToken { get; set; } + public int Offset { get; set; } + public TLVector Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + FileToken = BytesUtil.Deserialize(br); + Offset = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + BytesUtil.Serialize(FileToken, bw); + bw.Write(Offset); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLVector)ObjectUtils.DeserializeVector(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Upload/TLRequestGetFile.cs b/src/TeleSharp.TL/TL/Upload/TLRequestGetFile.cs index 69737fe..1292d82 100644 --- a/src/TeleSharp.TL/TL/Upload/TLRequestGetFile.cs +++ b/src/TeleSharp.TL/TL/Upload/TLRequestGetFile.cs @@ -7,17 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Upload { - [TLObject(-475607115)] + [TLObject(-1319462148)] public class TLRequestGetFile : TLMethod { public override int Constructor { get { - return -475607115; + return -1319462148; } } + public int Flags { get; set; } + public bool Precise { get; set; } + public bool CdnSupported { get; set; } public TLAbsInputFileLocation Location { get; set; } public int Offset { get; set; } public int Limit { get; set; } @@ -31,6 +34,9 @@ namespace TeleSharp.TL.Upload public override void DeserializeBody(BinaryReader br) { + Flags = br.ReadInt32(); + Precise = (Flags & 1) != 0; + CdnSupported = (Flags & 2) != 0; Location = (TLAbsInputFileLocation)ObjectUtils.DeserializeObject(br); Offset = br.ReadInt32(); Limit = br.ReadInt32(); @@ -40,6 +46,9 @@ namespace TeleSharp.TL.Upload public override void SerializeBody(BinaryWriter bw) { bw.Write(Constructor); + bw.Write(Flags); + + ObjectUtils.SerializeObject(Location, bw); bw.Write(Offset); bw.Write(Limit); diff --git a/src/TeleSharp.TL/TL/Upload/TLRequestGetFileHashes.cs b/src/TeleSharp.TL/TL/Upload/TLRequestGetFileHashes.cs new file mode 100644 index 0000000..1545b3a --- /dev/null +++ b/src/TeleSharp.TL/TL/Upload/TLRequestGetFileHashes.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Upload +{ + [TLObject(-956147407)] + public class TLRequestGetFileHashes : TLMethod + { + public override int Constructor + { + get + { + return -956147407; + } + } + + public TLAbsInputFileLocation Location { get; set; } + public int Offset { get; set; } + public TLVector Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Location = (TLAbsInputFileLocation)ObjectUtils.DeserializeObject(br); + Offset = br.ReadInt32(); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Location, bw); + bw.Write(Offset); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = (TLVector)ObjectUtils.DeserializeVector(br); + + } + } +} diff --git a/src/TeleSharp.TL/TL/Upload/TLRequestGetWebFile.cs b/src/TeleSharp.TL/TL/Upload/TLRequestGetWebFile.cs index 3f4b946..daf636d 100644 --- a/src/TeleSharp.TL/TL/Upload/TLRequestGetWebFile.cs +++ b/src/TeleSharp.TL/TL/Upload/TLRequestGetWebFile.cs @@ -18,7 +18,7 @@ namespace TeleSharp.TL.Upload } } - public TLInputWebFileLocation Location { get; set; } + public TLAbsInputWebFileLocation Location { get; set; } public int Offset { get; set; } public int Limit { get; set; } public Upload.TLWebFile Response { get; set; } @@ -31,7 +31,7 @@ namespace TeleSharp.TL.Upload public override void DeserializeBody(BinaryReader br) { - Location = (TLInputWebFileLocation)ObjectUtils.DeserializeObject(br); + Location = (TLAbsInputWebFileLocation)ObjectUtils.DeserializeObject(br); Offset = br.ReadInt32(); Limit = br.ReadInt32(); diff --git a/src/TeleSharp.TL/TL/Upload/TLRequestReuploadCdnFile.cs b/src/TeleSharp.TL/TL/Upload/TLRequestReuploadCdnFile.cs index 9602cd1..713d09f 100644 --- a/src/TeleSharp.TL/TL/Upload/TLRequestReuploadCdnFile.cs +++ b/src/TeleSharp.TL/TL/Upload/TLRequestReuploadCdnFile.cs @@ -7,20 +7,20 @@ using System.Threading.Tasks; using TeleSharp.TL; namespace TeleSharp.TL.Upload { - [TLObject(779755552)] + [TLObject(-1691921240)] public class TLRequestReuploadCdnFile : TLMethod { public override int Constructor { get { - return 779755552; + return -1691921240; } } public byte[] FileToken { get; set; } public byte[] RequestToken { get; set; } - public bool Response { get; set; } + public TLVector Response { get; set; } public void ComputeFlags() @@ -44,7 +44,7 @@ namespace TeleSharp.TL.Upload } public override void DeserializeResponse(BinaryReader br) { - Response = BoolUtil.Deserialize(br); + Response = (TLVector)ObjectUtils.DeserializeVector(br); } } diff --git a/src/TeleSharp.TL/TL/Users/TLRequestSetSecureValueErrors.cs b/src/TeleSharp.TL/TL/Users/TLRequestSetSecureValueErrors.cs new file mode 100644 index 0000000..1d46455 --- /dev/null +++ b/src/TeleSharp.TL/TL/Users/TLRequestSetSecureValueErrors.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using TeleSharp.TL; +namespace TeleSharp.TL.Users +{ + [TLObject(-1865902923)] + public class TLRequestSetSecureValueErrors : TLMethod + { + public override int Constructor + { + get + { + return -1865902923; + } + } + + public TLAbsInputUser Id { get; set; } + public TLVector Errors { get; set; } + public bool Response { get; set; } + + + public void ComputeFlags() + { + + } + + public override void DeserializeBody(BinaryReader br) + { + Id = (TLAbsInputUser)ObjectUtils.DeserializeObject(br); + Errors = (TLVector)ObjectUtils.DeserializeVector(br); + + } + + public override void SerializeBody(BinaryWriter bw) + { + bw.Write(Constructor); + ObjectUtils.SerializeObject(Id, bw); + ObjectUtils.SerializeObject(Errors, bw); + + } + public override void DeserializeResponse(BinaryReader br) + { + Response = BoolUtil.Deserialize(br); + + } + } +} diff --git a/src/TeleSharp.TL/TeleSharp.TL.csproj b/src/TeleSharp.TL/TeleSharp.TL.csproj index b6c36d5..803c0e2 100644 --- a/src/TeleSharp.TL/TeleSharp.TL.csproj +++ b/src/TeleSharp.TL/TeleSharp.TL.csproj @@ -77,4 +77,4 @@ --> - \ No newline at end of file + diff --git a/src/TgSharp.Core/TelegramClient.cs b/src/TgSharp.Core/TelegramClient.cs index b078ada..2918694 100644 --- a/src/TgSharp.Core/TelegramClient.cs +++ b/src/TgSharp.Core/TelegramClient.cs @@ -164,7 +164,7 @@ namespace TgSharp.Core throw new InvalidOperationException("Not connected!"); var completed = false; - while(!completed) + while (!completed) { try { @@ -172,7 +172,7 @@ namespace TgSharp.Core await sender.Receive(request, token).ConfigureAwait(false); completed = true; } - catch(DataCenterMigrationException e) + catch (DataCenterMigrationException e) { if (session.DataCenter.DataCenterId.HasValue && session.DataCenter.DataCenterId.Value == e.DC) @@ -192,18 +192,6 @@ namespace TgSharp.Core return session.TLUser != null; } - public async Task IsPhoneRegisteredAsync(string phoneNumber, CancellationToken token = default(CancellationToken)) - { - if (String.IsNullOrWhiteSpace(phoneNumber)) - throw new ArgumentNullException(nameof(phoneNumber)); - - var authCheckPhoneRequest = new TLRequestCheckPhone() { PhoneNumber = phoneNumber }; - - await RequestWithDcMigration(authCheckPhoneRequest, token).ConfigureAwait(false); - - return authCheckPhoneRequest.Response.PhoneRegistered; - } - public async Task SendCodeRequestAsync(string phoneNumber, CancellationToken token = default(CancellationToken)) { if (String.IsNullOrWhiteSpace(phoneNumber)) @@ -216,7 +204,7 @@ namespace TgSharp.Core return request.Response.PhoneCodeHash; } - public async Task MakeAuthAsync(string phoneNumber, string phoneCodeHash, string code, CancellationToken token = default(CancellationToken)) + public async Task MakeAuthAsync(string phoneNumber, string phoneCodeHash, string code, string firstName = "", string lastName = "", CancellationToken token = default(CancellationToken)) { if (String.IsNullOrWhiteSpace(phoneNumber)) throw new ArgumentNullException(nameof(phoneNumber)); @@ -226,53 +214,23 @@ namespace TgSharp.Core if (String.IsNullOrWhiteSpace(code)) throw new ArgumentNullException(nameof(code)); - + var request = new TLRequestSignIn() { PhoneNumber = phoneNumber, PhoneCodeHash = phoneCodeHash, PhoneCode = code }; await RequestWithDcMigration(request, token).ConfigureAwait(false); - OnUserAuthenticated(((TLUser)request.Response.User)); - - return ((TLUser)request.Response.User); - } - - public async Task GetPasswordSetting(CancellationToken token = default(CancellationToken)) - { - var request = new TLRequestGetPassword(); - - await RequestWithDcMigration(request, token).ConfigureAwait(false); - - return (TLPassword)request.Response; - } - - public async Task MakeAuthWithPasswordAsync(TLPassword password, string password_str, CancellationToken token = default(CancellationToken)) - { - token.ThrowIfCancellationRequested(); - - byte[] password_Bytes = Encoding.UTF8.GetBytes(password_str); - IEnumerable rv = password.CurrentSalt.Concat(password_Bytes).Concat(password.CurrentSalt); - - SHA256Managed hashstring = new SHA256Managed(); - var password_hash = hashstring.ComputeHash(rv.ToArray()); - - var request = new TLRequestCheckPassword() { PasswordHash = password_hash }; - - await RequestWithDcMigration(request, token).ConfigureAwait(false); - - OnUserAuthenticated((TLUser)request.Response.User); - - return (TLUser)request.Response.User; - } - - public async Task SignUpAsync(string phoneNumber, string phoneCodeHash, string code, string firstName, string lastName, CancellationToken token = default(CancellationToken)) - { - var request = new TLRequestSignUp() { PhoneNumber = phoneNumber, PhoneCode = code, PhoneCodeHash = phoneCodeHash, FirstName = firstName, LastName = lastName }; - - await RequestWithDcMigration(request, token).ConfigureAwait(false); - - OnUserAuthenticated((TLUser)request.Response.User); - - return (TLUser)request.Response.User; + if (request.Response is TLAuthorization) + { + OnUserAuthenticated(((TLUser)((TLAuthorization)request.Response).User)); + return ((TLUser)((TLAuthorization)request.Response).User); + } + else + { + var signUpRequest = new TLRequestSignUp() { PhoneNumber = phoneNumber, PhoneCodeHash = phoneCodeHash, FirstName = firstName, LastName = lastName }; + await RequestWithDcMigration(signUpRequest, token).ConfigureAwait(false); + OnUserAuthenticated((TLUser)signUpRequest.Response.User); + return (TLUser)signUpRequest.Response.User; + } } public async Task SendRequestAsync(TLMethod methodToExecute, CancellationToken token = default(CancellationToken)) @@ -284,7 +242,7 @@ namespace TgSharp.Core return (T)result; } - internal async Task SendAuthenticatedRequestAsync (TLMethod methodToExecute, CancellationToken token = default(CancellationToken)) + internal async Task SendAuthenticatedRequestAsync(TLMethod methodToExecute, CancellationToken token = default(CancellationToken)) { if (!IsUserAuthorized()) throw new InvalidOperationException("Authorize user first!"); @@ -311,7 +269,7 @@ namespace TgSharp.Core public async Task ImportContactsAsync(IReadOnlyList contacts, CancellationToken token = default(CancellationToken)) { - var req = new TLRequestImportContacts { Contacts = new TLVector(contacts)}; + var req = new TLRequestImportContacts { Contacts = new TLVector(contacts) }; return await SendAuthenticatedRequestAsync(req, token) .ConfigureAwait(false); @@ -319,23 +277,15 @@ namespace TgSharp.Core public async Task DeleteContactsAsync(IReadOnlyList users, CancellationToken token = default(CancellationToken)) { - var req = new TLRequestDeleteContacts {Id = new TLVector(users)}; + var req = new TLRequestDeleteContacts { Id = new TLVector(users) }; return await SendAuthenticatedRequestAsync(req, token) .ConfigureAwait(false); } - public async Task DeleteContactAsync(TLAbsInputUser user, CancellationToken token = default(CancellationToken)) - { - var req = new TLRequestDeleteContact {Id = user}; - - return await SendAuthenticatedRequestAsync(req, token) - .ConfigureAwait(false); - } - public async Task GetContactsAsync(CancellationToken token = default(CancellationToken)) { - var req = new TLRequestGetContacts() { Hash = "" }; + var req = new TLRequestGetContacts() { Hash = 0 }; return await SendAuthenticatedRequestAsync(req, token) .ConfigureAwait(false); @@ -370,57 +320,56 @@ namespace TgSharp.Core offsetPeer = new TLInputPeerSelf(); var req = new TLRequestGetDialogs() - { - OffsetDate = offsetDate, - OffsetId = offsetId, - OffsetPeer = offsetPeer, + { + OffsetDate = offsetDate, + OffsetId = offsetId, + OffsetPeer = offsetPeer, Limit = limit }; return await SendAuthenticatedRequestAsync(req, token) .ConfigureAwait(false); } - public async Task SendUploadedPhoto(TLAbsInputPeer peer, TLAbsInputFile file, string caption, CancellationToken token = default(CancellationToken)) + public async Task SendUploadedPhoto(TLAbsInputPeer peer, TLAbsInputFile file, CancellationToken token = default(CancellationToken)) { return await SendAuthenticatedRequestAsync(new TLRequestSendMedia() - { - RandomId = Helpers.GenerateRandomLong(), - Background = false, - ClearDraft = false, - Media = new TLInputMediaUploadedPhoto() { File = file, Caption = caption }, - Peer = peer - }, token) + { + RandomId = Helpers.GenerateRandomLong(), + Background = false, + ClearDraft = false, + Media = new TLInputMediaUploadedPhoto() { File = file }, + Peer = peer + }, token) .ConfigureAwait(false); } public async Task SendUploadedDocument( - TLAbsInputPeer peer, TLAbsInputFile file, string caption, string mimeType, TLVector attributes, CancellationToken token = default(CancellationToken)) + TLAbsInputPeer peer, TLAbsInputFile file, string mimeType, TLVector attributes, CancellationToken token = default(CancellationToken)) { return await SendAuthenticatedRequestAsync(new TLRequestSendMedia() + { + RandomId = Helpers.GenerateRandomLong(), + Background = false, + ClearDraft = false, + Media = new TLInputMediaUploadedDocument() { - RandomId = Helpers.GenerateRandomLong(), - Background = false, - ClearDraft = false, - Media = new TLInputMediaUploadedDocument() - { - File = file, - Caption = caption, - MimeType = mimeType, - Attributes = attributes - }, - Peer = peer - }, token) + File = file, + MimeType = mimeType, + Attributes = attributes + }, + Peer = peer + }, token) .ConfigureAwait(false); } public async Task GetFile(TLAbsInputFileLocation location, int filePartSize, int offset = 0, CancellationToken token = default(CancellationToken)) { TLFile result = await SendAuthenticatedRequestAsync(new TLRequestGetFile - { - Location = location, - Limit = filePartSize, - Offset = offset - }, token) + { + Location = location, + Limit = filePartSize, + Offset = offset + }, token) .ConfigureAwait(false); return result; } diff --git a/src/TgSharp.Tests.NUnit/Test.cs b/src/TgSharp.Tests.NUnit/Test.cs index b8a49a5..7845f08 100644 --- a/src/TgSharp.Tests.NUnit/Test.cs +++ b/src/TgSharp.Tests.NUnit/Test.cs @@ -63,19 +63,6 @@ namespace TgSharp.Tests await base.SignUpNewUser(); } - [Test] - public override async Task CheckPhones() - { - await base.CheckPhones(); - } - - [Test] - [Ignore("FIXME")] - public override async Task FloodExceptionShouldNotCauseCannotReadPackageLengthError() - { - await base.FloodExceptionShouldNotCauseCannotReadPackageLengthError(); - } - [Test] public override async Task SendMessageByUserNameTest() { diff --git a/src/TgSharp.Tests.VS/TgSharpTestsVs.cs b/src/TgSharp.Tests.VS/TgSharpTestsVs.cs index b06d896..a063a35 100644 --- a/src/TgSharp.Tests.VS/TgSharpTestsVs.cs +++ b/src/TgSharp.Tests.VS/TgSharpTestsVs.cs @@ -62,18 +62,6 @@ namespace TgSharp.Tests await base.SignUpNewUser(); } - [TestMethod] - public override async Task CheckPhones() - { - await base.CheckPhones(); - } - [TestMethod] - [Ignore] - public override async Task FloodExceptionShouldNotCauseCannotReadPackageLengthError() - { - await base.FloodExceptionShouldNotCauseCannotReadPackageLengthError(); - } - [TestMethod] public override async Task SendMessageByUserNameTest() { diff --git a/src/TgSharp.Tests/TgSharpTests.cs b/src/TgSharp.Tests/TgSharpTests.cs index 7d757fc..cdc723f 100644 --- a/src/TgSharp.Tests/TgSharpTests.cs +++ b/src/TgSharp.Tests/TgSharpTests.cs @@ -139,13 +139,6 @@ namespace TgSharp.Tests { user = await client.MakeAuthAsync(NumberToAuthenticate, hash, code); } - catch (CloudPasswordNeededException ex) - { - var passwordSetting = await client.GetPasswordSetting(); - var password = PasswordToAuthenticate; - - user = await client.MakeAuthWithPasswordAsync(passwordSetting, password); - } catch (InvalidPhoneCodeException ex) { throw new Exception("CodeToAuthenticate is wrong in the app.config file, fill it with the code you just got now by SMS/Telegram", @@ -192,7 +185,7 @@ namespace TgSharp.Tests await client.ConnectAsync(); - var dialogs = (TLDialogs) await client.GetUserDialogsAsync(); + var dialogs = (TLDialogs)await client.GetUserDialogsAsync(); var chat = dialogs.Chats .OfType() .FirstOrDefault(c => c.Title == "TestGroup"); @@ -213,7 +206,7 @@ namespace TgSharp.Tests .FirstOrDefault(x => x.Phone == NumberToSendMessage); var fileResult = (TLInputFile)await client.UploadFile("cat.jpg", new StreamReader("data/cat.jpg")); - await client.SendUploadedPhoto(new TLInputPeerUser() { UserId = user.Id }, fileResult, "kitty"); + await client.SendUploadedPhoto(new TLInputPeerUser() { UserId = user.Id }, fileResult); } public virtual async Task SendBigFileToContactTest() @@ -233,7 +226,6 @@ namespace TgSharp.Tests await client.SendUploadedDocument( new TLInputPeerUser() { UserId = user.Id }, fileResult, - "some zips", "application/zip", new TLVector()); } @@ -266,10 +258,11 @@ namespace TgSharp.Tests { AccessHash = document.AccessHash, Id = document.Id, - Version = document.Version + FileReference = document.FileReference, + ThumbSize = "250x250" }, document.Size); - + Assert.IsTrue(resFile.Bytes.Length > 0); } @@ -284,18 +277,19 @@ namespace TgSharp.Tests var user = result.Users .OfType() .FirstOrDefault(x => x.Id == 5880094); - - var photo = ((TLUserProfilePhoto)user.Photo); - var photoLocation = (TLFileLocation) photo.PhotoBig; - var resFile = await client.GetFile(new TLInputFileLocation() + var photo = ((TLUserProfilePhoto)user.Photo); + var photoLocation = (TLFileLocationToBeDeprecated)photo.PhotoBig; + + var resFile = await client.GetFile(new TLInputPeerPhotoFileLocation() { + Big = true, LocalId = photoLocation.LocalId, - Secret = photoLocation.Secret, - VolumeId = photoLocation.VolumeId + VolumeId = photoLocation.VolumeId, + Peer = new TLInputPeerUser { UserId = user.Id, AccessHash = user.AccessHash.Value } }, 1024); - var res = await client.GetUserDialogsAsync(); + var res = await client.GetUserDialogsAsync(); Assert.IsTrue(resFile.Bytes.Length > 0); } @@ -308,37 +302,9 @@ namespace TgSharp.Tests var hash = await client.SendCodeRequestAsync(NotRegisteredNumberToSignUp); var code = ""; - var registeredUser = await client.SignUpAsync(NotRegisteredNumberToSignUp, hash, code, "TgSharp", "User"); + var registeredUser = await client.MakeAuthAsync(NotRegisteredNumberToSignUp, hash, code, "TgSharp", "User"); Assert.IsNotNull(registeredUser); Assert.IsTrue(client.IsUserAuthorized()); - - var loggedInUser = await client.MakeAuthAsync(NotRegisteredNumberToSignUp, hash, code); - Assert.IsNotNull(loggedInUser); - } - - public virtual async Task CheckPhones() - { - var client = NewClient(); - await client.ConnectAsync(); - - var result = await client.IsPhoneRegisteredAsync(NumberToAuthenticate); - Assert.IsTrue(result); - } - - public virtual async Task FloodExceptionShouldNotCauseCannotReadPackageLengthError() - { - for (int i = 0; i < 50; i++) - { - try - { - await CheckPhones(); - } - catch (FloodException floodException) - { - Console.WriteLine($"FLOODEXCEPTION: {floodException}"); - Thread.Sleep(floodException.TimeToWait); - } - } } public virtual async Task SendMessageByUserNameTest()