diff --git a/submodules/FFMpegBinding/Sources/FFMpegAVCodec.m b/submodules/FFMpegBinding/Sources/FFMpegAVCodec.m index f50633c2a8..739ab5efb3 100644 --- a/submodules/FFMpegBinding/Sources/FFMpegAVCodec.m +++ b/submodules/FFMpegBinding/Sources/FFMpegAVCodec.m @@ -1,6 +1,6 @@ #import -#import "libavcodec/avcodec.h" +#import @interface FFMpegAVCodec () { AVCodec const *_impl; diff --git a/submodules/FFMpegBinding/Sources/FFMpegAVCodecContext.m b/submodules/FFMpegBinding/Sources/FFMpegAVCodecContext.m index ee2cde92c0..0fae131670 100644 --- a/submodules/FFMpegBinding/Sources/FFMpegAVCodecContext.m +++ b/submodules/FFMpegBinding/Sources/FFMpegAVCodecContext.m @@ -3,8 +3,8 @@ #import #import -#import "libavformat/avformat.h" -#import "libavcodec/avcodec.h" +#import +#import static enum AVPixelFormat getPreferredPixelFormat(__unused AVCodecContext *ctx, __unused const enum AVPixelFormat *pix_fmts) { return AV_PIX_FMT_VIDEOTOOLBOX; diff --git a/submodules/FFMpegBinding/Sources/FFMpegAVFormatContext.m b/submodules/FFMpegBinding/Sources/FFMpegAVFormatContext.m index ebc0d4f963..a98c295d6d 100644 --- a/submodules/FFMpegBinding/Sources/FFMpegAVFormatContext.m +++ b/submodules/FFMpegBinding/Sources/FFMpegAVFormatContext.m @@ -4,8 +4,8 @@ #import #import -#import "libavcodec/avcodec.h" -#import "libavformat/avformat.h" +#import +#import int FFMpegCodecIdH264 = AV_CODEC_ID_H264; int FFMpegCodecIdHEVC = AV_CODEC_ID_HEVC; diff --git a/submodules/FFMpegBinding/Sources/FFMpegAVFrame.m b/submodules/FFMpegBinding/Sources/FFMpegAVFrame.m index fda8224dc7..9c17b53c09 100644 --- a/submodules/FFMpegBinding/Sources/FFMpegAVFrame.m +++ b/submodules/FFMpegBinding/Sources/FFMpegAVFrame.m @@ -1,6 +1,6 @@ #import -#import "libavformat/avformat.h" +#import @interface FFMpegAVFrame () { AVFrame *_impl; diff --git a/submodules/FFMpegBinding/Sources/FFMpegAVIOContext.m b/submodules/FFMpegBinding/Sources/FFMpegAVIOContext.m index be3cecf4bd..ebad7d28c9 100644 --- a/submodules/FFMpegBinding/Sources/FFMpegAVIOContext.m +++ b/submodules/FFMpegBinding/Sources/FFMpegAVIOContext.m @@ -1,6 +1,6 @@ #import -#import "libavformat/avformat.h" +#import int FFMPEG_CONSTANT_AVERROR_EOF = AVERROR_EOF; diff --git a/submodules/FFMpegBinding/Sources/FFMpegGlobals.m b/submodules/FFMpegBinding/Sources/FFMpegGlobals.m index f0ff9091bb..459725e5ab 100644 --- a/submodules/FFMpegBinding/Sources/FFMpegGlobals.m +++ b/submodules/FFMpegBinding/Sources/FFMpegGlobals.m @@ -1,6 +1,6 @@ #import -#import "libavformat/avformat.h" +#import @implementation FFMpegGlobals diff --git a/submodules/FFMpegBinding/Sources/FFMpegLiveMuxer.m b/submodules/FFMpegBinding/Sources/FFMpegLiveMuxer.m index 85ddce8a9e..22531987c8 100644 --- a/submodules/FFMpegBinding/Sources/FFMpegLiveMuxer.m +++ b/submodules/FFMpegBinding/Sources/FFMpegLiveMuxer.m @@ -1,10 +1,10 @@ #import #import -#include "libavutil/timestamp.h" -#include "libavformat/avformat.h" -#include "libavcodec/avcodec.h" -#include "libswresample/swresample.h" +#include +#include +#include +#include #define MOV_TIMESCALE 1000 diff --git a/submodules/FFMpegBinding/Sources/FFMpegPacket.m b/submodules/FFMpegBinding/Sources/FFMpegPacket.m index 7da5655c96..4ef8b24dbe 100644 --- a/submodules/FFMpegBinding/Sources/FFMpegPacket.m +++ b/submodules/FFMpegBinding/Sources/FFMpegPacket.m @@ -2,8 +2,8 @@ #import -#import "libavcodec/avcodec.h" -#import "libavformat/avformat.h" +#import +#import @interface FFMpegPacket () { AVPacket *_impl; diff --git a/submodules/FFMpegBinding/Sources/FFMpegRemuxer.m b/submodules/FFMpegBinding/Sources/FFMpegRemuxer.m index df3c1adfb8..722a21f4fe 100644 --- a/submodules/FFMpegBinding/Sources/FFMpegRemuxer.m +++ b/submodules/FFMpegBinding/Sources/FFMpegRemuxer.m @@ -2,9 +2,9 @@ #import -#include "libavutil/timestamp.h" -#include "libavformat/avformat.h" -#include "libavcodec/avcodec.h" +#include +#include +#include #define MOV_TIMESCALE 1000 diff --git a/submodules/FFMpegBinding/Sources/FFMpegSWResample.m b/submodules/FFMpegBinding/Sources/FFMpegSWResample.m index c6771b6db3..de38cab260 100644 --- a/submodules/FFMpegBinding/Sources/FFMpegSWResample.m +++ b/submodules/FFMpegBinding/Sources/FFMpegSWResample.m @@ -2,9 +2,9 @@ #import -#import "libavformat/avformat.h" -#import "libavcodec/avcodec.h" -#import "libswresample/swresample.h" +#import +#import +#import @interface FFMpegSWResample () { int _sourceSampleRate; diff --git a/submodules/FFMpegBinding/Sources/FFMpegVideoWriter.m b/submodules/FFMpegBinding/Sources/FFMpegVideoWriter.m index 4746828e62..4274fc6d6c 100755 --- a/submodules/FFMpegBinding/Sources/FFMpegVideoWriter.m +++ b/submodules/FFMpegBinding/Sources/FFMpegVideoWriter.m @@ -1,9 +1,9 @@ #import #import -#include "libavformat/avformat.h" -#include "libavcodec/avcodec.h" -#include "libavutil/imgutils.h" +#include +#include +#include @interface FFMpegVideoWriter () diff --git a/submodules/LottieCpp/BUILD b/submodules/LottieCpp/BUILD index 8a1b9b096f..67dc182542 100644 --- a/submodules/LottieCpp/BUILD +++ b/submodules/LottieCpp/BUILD @@ -24,11 +24,9 @@ objc_library( ], hdrs = glob([ "lottiecpp/PublicHeaders/**/*.h", - "lottiecpp/PlatformSpecific/Darwin/PublicHeaders/**/*.h", ]), includes = [ "lottiecpp/PublicHeaders", - "lottiecpp/PlatformSpecific/Darwin/PublicHeaders", ], deps = [ ], diff --git a/submodules/MozjpegBinding/BUILD b/submodules/MozjpegBinding/BUILD index 15083f04d7..db74cf5040 100644 --- a/submodules/MozjpegBinding/BUILD +++ b/submodules/MozjpegBinding/BUILD @@ -16,7 +16,7 @@ objc_library( ], deps = [ "//third-party/mozjpeg:mozjpeg", - "//third-party/libjxl:jxl", + #"//third-party/libjxl:jxl", ], visibility = [ "//visibility:public", diff --git a/submodules/MozjpegBinding/Sources/MozjpegBinding.mm b/submodules/MozjpegBinding/Sources/MozjpegBinding.mm index 509929aeb7..92bf294f11 100644 --- a/submodules/MozjpegBinding/Sources/MozjpegBinding.mm +++ b/submodules/MozjpegBinding/Sources/MozjpegBinding.mm @@ -7,12 +7,14 @@ #import +#ifdef USE_JPEGXL #include #include #include #include //#include //#include +#endif #include #include @@ -31,6 +33,7 @@ static inline float JXLGetDistance(int32_t quality) { } NSData * _Nullable compressJPEGXLData(UIImage * _Nonnull sourceImage, int quality) { + #ifdef USE_JPEGXL int width = (int)(sourceImage.size.width * sourceImage.scale); int height = (int)(sourceImage.size.height * sourceImage.scale); @@ -140,9 +143,13 @@ NSData * _Nullable compressJPEGXLData(UIImage * _Nonnull sourceImage, int qualit fprintf(stderr, "JxlEncoderSetParallelRunner failed\n"); return false; }*/ + #else + return nil; + #endif } UIImage * _Nullable decompressJPEGXLData(NSData * _Nonnull data) { + #ifdef USE_JPEGXL //const uint8_t* jxl, size_t size, std::vector* pixels, size_t* xsize, size_t* ysize, std::vector* icc_profile auto dec = JxlDecoderMake(nullptr); @@ -266,6 +273,9 @@ UIImage * _Nullable decompressJPEGXLData(NSData * _Nonnull data) { } return nil; + #else + return nil; + #endif } static NSData *getHeaderPattern() { diff --git a/submodules/MtProtoKit/PublicHeaders/MtProtoKit/MtProtoKit.h b/submodules/MtProtoKit/PublicHeaders/MtProtoKit/MtProtoKit.h index 4865b56877..c4fab4d79a 100644 --- a/submodules/MtProtoKit/PublicHeaders/MtProtoKit/MtProtoKit.h +++ b/submodules/MtProtoKit/PublicHeaders/MtProtoKit/MtProtoKit.h @@ -55,3 +55,9 @@ #import #import #import +#import +#import +#import +#import +#import + diff --git a/submodules/TelegramApi/Sources/Api0.swift b/submodules/TelegramApi/Sources/Api0.swift index fd0edc75e8..95cf9c8a1d 100644 --- a/submodules/TelegramApi/Sources/Api0.swift +++ b/submodules/TelegramApi/Sources/Api0.swift @@ -171,6 +171,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[589338437] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionStartGroupCall($0) } dict[-1895328189] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionStopPoll($0) } dict[1693675004] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionToggleAntiSpam($0) } + dict[-988285058] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionToggleAutotranslation($0) } dict[46949251] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionToggleForum($0) } dict[1456906823] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionToggleGroupCallSetting($0) } dict[460916654] = { return Api.ChannelAdminLogEventAction.parse_channelAdminLogEventActionToggleInvites($0) } @@ -467,6 +468,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[583071445] = { return Api.InputReplyTo.parse_inputReplyToMessage($0) } dict[1484862010] = { return Api.InputReplyTo.parse_inputReplyToStory($0) } dict[-251549057] = { return Api.InputSavedStarGift.parse_inputSavedStarGiftChat($0) } + dict[545636920] = { return Api.InputSavedStarGift.parse_inputSavedStarGiftSlug($0) } dict[1764202389] = { return Api.InputSavedStarGift.parse_inputSavedStarGiftUser($0) } dict[1399317950] = { return Api.InputSecureFile.parse_inputSecureFile($0) } dict[859091184] = { return Api.InputSecureFile.parse_inputSecureFileUploaded($0) } @@ -601,7 +603,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[1348510708] = { return Api.MessageAction.parse_messageActionSetChatWallPaper($0) } dict[1007897979] = { return Api.MessageAction.parse_messageActionSetMessagesTTL($0) } dict[1192749220] = { return Api.MessageAction.parse_messageActionStarGift($0) } - dict[1600878025] = { return Api.MessageAction.parse_messageActionStarGiftUnique($0) } + dict[775611918] = { return Api.MessageAction.parse_messageActionStarGiftUnique($0) } dict[1474192222] = { return Api.MessageAction.parse_messageActionSuggestProfilePhoto($0) } dict[228168278] = { return Api.MessageAction.parse_messageActionTopicCreate($0) } dict[-1064024032] = { return Api.MessageAction.parse_messageActionTopicEdit($0) } @@ -747,6 +749,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[-1721619444] = { return Api.PeerNotifySettings.parse_peerNotifySettings($0) } dict[-193510921] = { return Api.PeerSettings.parse_peerSettings($0) } dict[-1707742823] = { return Api.PeerStories.parse_peerStories($0) } + dict[-404214254] = { return Api.PendingSuggestion.parse_pendingSuggestion($0) } dict[810769141] = { return Api.PhoneCall.parse_phoneCall($0) } dict[912311057] = { return Api.PhoneCall.parse_phoneCallAccepted($0) } dict[1355435489] = { return Api.PhoneCall.parse_phoneCallDiscarded($0) } @@ -870,7 +873,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[289586518] = { return Api.SavedContact.parse_savedPhoneContact($0) } dict[-1115174036] = { return Api.SavedDialog.parse_savedDialog($0) } dict[-881854424] = { return Api.SavedReactionTag.parse_savedReactionTag($0) } - dict[1616305061] = { return Api.SavedStarGift.parse_savedStarGift($0) } + dict[-539360103] = { return Api.SavedStarGift.parse_savedStarGift($0) } dict[-911191137] = { return Api.SearchResultsCalendarPeriod.parse_searchResultsCalendarPeriod($0) } dict[2137295719] = { return Api.SearchResultsPosition.parse_searchResultPosition($0) } dict[871426631] = { return Api.SecureCredentialsEncrypted.parse_secureCredentialsEncrypted($0) } @@ -1297,7 +1300,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[16313608] = { return Api.help.PeerColors.parse_peerColors($0) } dict[732034510] = { return Api.help.PeerColors.parse_peerColorsNotModified($0) } dict[1395946908] = { return Api.help.PremiumPromo.parse_premiumPromo($0) } - dict[-1942390465] = { return Api.help.PromoData.parse_promoData($0) } + dict[145021050] = { return Api.help.PromoData.parse_promoData($0) } dict[-1728664459] = { return Api.help.PromoData.parse_promoDataEmpty($0) } dict[235081943] = { return Api.help.RecentMeUrls.parse_recentMeUrls($0) } dict[398898678] = { return Api.help.Support.parse_support($0) } @@ -1460,6 +1463,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = { dict[276907596] = { return Api.storage.FileType.parse_fileWebp($0) } dict[1862033025] = { return Api.stories.AllStories.parse_allStories($0) } dict[291044926] = { return Api.stories.AllStories.parse_allStoriesNotModified($0) } + dict[-1014513586] = { return Api.stories.CanSendStoryCount.parse_canSendStoryCount($0) } dict[-488736969] = { return Api.stories.FoundStories.parse_foundStories($0) } dict[-890861720] = { return Api.stories.PeerStories.parse_peerStories($0) } dict[1673780490] = { return Api.stories.Stories.parse_stories($0) } @@ -2001,6 +2005,8 @@ public extension Api { _1.serialize(buffer, boxed) case let _1 as Api.PeerStories: _1.serialize(buffer, boxed) + case let _1 as Api.PendingSuggestion: + _1.serialize(buffer, boxed) case let _1 as Api.PhoneCall: _1.serialize(buffer, boxed) case let _1 as Api.PhoneCallDiscardReason: @@ -2591,6 +2597,8 @@ public extension Api { _1.serialize(buffer, boxed) case let _1 as Api.stories.AllStories: _1.serialize(buffer, boxed) + case let _1 as Api.stories.CanSendStoryCount: + _1.serialize(buffer, boxed) case let _1 as Api.stories.FoundStories: _1.serialize(buffer, boxed) case let _1 as Api.stories.PeerStories: diff --git a/submodules/TelegramApi/Sources/Api12.swift b/submodules/TelegramApi/Sources/Api12.swift index a01a8cf8bd..6057c17d36 100644 --- a/submodules/TelegramApi/Sources/Api12.swift +++ b/submodules/TelegramApi/Sources/Api12.swift @@ -367,6 +367,7 @@ public extension Api { public extension Api { indirect enum InputSavedStarGift: TypeConstructorDescription { case inputSavedStarGiftChat(peer: Api.InputPeer, savedId: Int64) + case inputSavedStarGiftSlug(slug: String) case inputSavedStarGiftUser(msgId: Int32) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { @@ -378,6 +379,12 @@ public extension Api { peer.serialize(buffer, true) serializeInt64(savedId, buffer: buffer, boxed: false) break + case .inputSavedStarGiftSlug(let slug): + if boxed { + buffer.appendInt32(545636920) + } + serializeString(slug, buffer: buffer, boxed: false) + break case .inputSavedStarGiftUser(let msgId): if boxed { buffer.appendInt32(1764202389) @@ -391,6 +398,8 @@ public extension Api { switch self { case .inputSavedStarGiftChat(let peer, let savedId): return ("inputSavedStarGiftChat", [("peer", peer as Any), ("savedId", savedId as Any)]) + case .inputSavedStarGiftSlug(let slug): + return ("inputSavedStarGiftSlug", [("slug", slug as Any)]) case .inputSavedStarGiftUser(let msgId): return ("inputSavedStarGiftUser", [("msgId", msgId as Any)]) } @@ -412,6 +421,17 @@ public extension Api { return nil } } + public static func parse_inputSavedStarGiftSlug(_ reader: BufferReader) -> InputSavedStarGift? { + var _1: String? + _1 = parseString(reader) + let _c1 = _1 != nil + if _c1 { + return Api.InputSavedStarGift.inputSavedStarGiftSlug(slug: _1!) + } + else { + return nil + } + } public static func parse_inputSavedStarGiftUser(_ reader: BufferReader) -> InputSavedStarGift? { var _1: Int32? _1 = reader.readInt32() diff --git a/submodules/TelegramApi/Sources/Api15.swift b/submodules/TelegramApi/Sources/Api15.swift index 33eec1e2b1..651700542b 100644 --- a/submodules/TelegramApi/Sources/Api15.swift +++ b/submodules/TelegramApi/Sources/Api15.swift @@ -381,7 +381,7 @@ public extension Api { case messageActionSetChatWallPaper(flags: Int32, wallpaper: Api.WallPaper) case messageActionSetMessagesTTL(flags: Int32, period: Int32, autoSettingFrom: Int64?) case messageActionStarGift(flags: Int32, gift: Api.StarGift, message: Api.TextWithEntities?, convertStars: Int64?, upgradeMsgId: Int32?, upgradeStars: Int64?, fromId: Api.Peer?, peer: Api.Peer?, savedId: Int64?) - case messageActionStarGiftUnique(flags: Int32, gift: Api.StarGift, canExportAt: Int32?, transferStars: Int64?, fromId: Api.Peer?, peer: Api.Peer?, savedId: Int64?, resaleStars: Int64?) + case messageActionStarGiftUnique(flags: Int32, gift: Api.StarGift, canExportAt: Int32?, transferStars: Int64?, fromId: Api.Peer?, peer: Api.Peer?, savedId: Int64?, resaleStars: Int64?, canTransferAt: Int32?, canResellAt: Int32?) case messageActionSuggestProfilePhoto(photo: Api.Photo) case messageActionTopicCreate(flags: Int32, title: String, iconColor: Int32, iconEmojiId: Int64?) case messageActionTopicEdit(flags: Int32, title: String?, iconEmojiId: Int64?, closed: Api.Bool?, hidden: Api.Bool?) @@ -767,9 +767,9 @@ public extension Api { if Int(flags) & Int(1 << 12) != 0 {peer!.serialize(buffer, true)} if Int(flags) & Int(1 << 12) != 0 {serializeInt64(savedId!, buffer: buffer, boxed: false)} break - case .messageActionStarGiftUnique(let flags, let gift, let canExportAt, let transferStars, let fromId, let peer, let savedId, let resaleStars): + case .messageActionStarGiftUnique(let flags, let gift, let canExportAt, let transferStars, let fromId, let peer, let savedId, let resaleStars, let canTransferAt, let canResellAt): if boxed { - buffer.appendInt32(1600878025) + buffer.appendInt32(775611918) } serializeInt32(flags, buffer: buffer, boxed: false) gift.serialize(buffer, true) @@ -779,6 +779,8 @@ public extension Api { if Int(flags) & Int(1 << 7) != 0 {peer!.serialize(buffer, true)} if Int(flags) & Int(1 << 7) != 0 {serializeInt64(savedId!, buffer: buffer, boxed: false)} if Int(flags) & Int(1 << 8) != 0 {serializeInt64(resaleStars!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 9) != 0 {serializeInt32(canTransferAt!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 10) != 0 {serializeInt32(canResellAt!, buffer: buffer, boxed: false)} break case .messageActionSuggestProfilePhoto(let photo): if boxed { @@ -913,8 +915,8 @@ public extension Api { return ("messageActionSetMessagesTTL", [("flags", flags as Any), ("period", period as Any), ("autoSettingFrom", autoSettingFrom as Any)]) case .messageActionStarGift(let flags, let gift, let message, let convertStars, let upgradeMsgId, let upgradeStars, let fromId, let peer, let savedId): return ("messageActionStarGift", [("flags", flags as Any), ("gift", gift as Any), ("message", message as Any), ("convertStars", convertStars as Any), ("upgradeMsgId", upgradeMsgId as Any), ("upgradeStars", upgradeStars as Any), ("fromId", fromId as Any), ("peer", peer as Any), ("savedId", savedId as Any)]) - case .messageActionStarGiftUnique(let flags, let gift, let canExportAt, let transferStars, let fromId, let peer, let savedId, let resaleStars): - return ("messageActionStarGiftUnique", [("flags", flags as Any), ("gift", gift as Any), ("canExportAt", canExportAt as Any), ("transferStars", transferStars as Any), ("fromId", fromId as Any), ("peer", peer as Any), ("savedId", savedId as Any), ("resaleStars", resaleStars as Any)]) + case .messageActionStarGiftUnique(let flags, let gift, let canExportAt, let transferStars, let fromId, let peer, let savedId, let resaleStars, let canTransferAt, let canResellAt): + return ("messageActionStarGiftUnique", [("flags", flags as Any), ("gift", gift as Any), ("canExportAt", canExportAt as Any), ("transferStars", transferStars as Any), ("fromId", fromId as Any), ("peer", peer as Any), ("savedId", savedId as Any), ("resaleStars", resaleStars as Any), ("canTransferAt", canTransferAt as Any), ("canResellAt", canResellAt as Any)]) case .messageActionSuggestProfilePhoto(let photo): return ("messageActionSuggestProfilePhoto", [("photo", photo as Any)]) case .messageActionTopicCreate(let flags, let title, let iconColor, let iconEmojiId): @@ -1675,6 +1677,10 @@ public extension Api { if Int(_1!) & Int(1 << 7) != 0 {_7 = reader.readInt64() } var _8: Int64? if Int(_1!) & Int(1 << 8) != 0 {_8 = reader.readInt64() } + var _9: Int32? + if Int(_1!) & Int(1 << 9) != 0 {_9 = reader.readInt32() } + var _10: Int32? + if Int(_1!) & Int(1 << 10) != 0 {_10 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = (Int(_1!) & Int(1 << 3) == 0) || _3 != nil @@ -1683,8 +1689,10 @@ public extension Api { let _c6 = (Int(_1!) & Int(1 << 7) == 0) || _6 != nil let _c7 = (Int(_1!) & Int(1 << 7) == 0) || _7 != nil let _c8 = (Int(_1!) & Int(1 << 8) == 0) || _8 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { - return Api.MessageAction.messageActionStarGiftUnique(flags: _1!, gift: _2!, canExportAt: _3, transferStars: _4, fromId: _5, peer: _6, savedId: _7, resaleStars: _8) + let _c9 = (Int(_1!) & Int(1 << 9) == 0) || _9 != nil + let _c10 = (Int(_1!) & Int(1 << 10) == 0) || _10 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 { + return Api.MessageAction.messageActionStarGiftUnique(flags: _1!, gift: _2!, canExportAt: _3, transferStars: _4, fromId: _5, peer: _6, savedId: _7, resaleStars: _8, canTransferAt: _9, canResellAt: _10) } else { return nil diff --git a/submodules/TelegramApi/Sources/Api19.swift b/submodules/TelegramApi/Sources/Api19.swift index ae28f75139..e49484163a 100644 --- a/submodules/TelegramApi/Sources/Api19.swift +++ b/submodules/TelegramApi/Sources/Api19.swift @@ -1090,6 +1090,58 @@ public extension Api { } } +public extension Api { + enum PendingSuggestion: TypeConstructorDescription { + case pendingSuggestion(suggestion: String, title: Api.TextWithEntities, description: Api.TextWithEntities, url: String) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .pendingSuggestion(let suggestion, let title, let description, let url): + if boxed { + buffer.appendInt32(-404214254) + } + serializeString(suggestion, buffer: buffer, boxed: false) + title.serialize(buffer, true) + description.serialize(buffer, true) + serializeString(url, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .pendingSuggestion(let suggestion, let title, let description, let url): + return ("pendingSuggestion", [("suggestion", suggestion as Any), ("title", title as Any), ("description", description as Any), ("url", url as Any)]) + } + } + + public static func parse_pendingSuggestion(_ reader: BufferReader) -> PendingSuggestion? { + var _1: String? + _1 = parseString(reader) + var _2: Api.TextWithEntities? + if let signature = reader.readInt32() { + _2 = Api.parse(reader, signature: signature) as? Api.TextWithEntities + } + var _3: Api.TextWithEntities? + if let signature = reader.readInt32() { + _3 = Api.parse(reader, signature: signature) as? Api.TextWithEntities + } + var _4: String? + _4 = parseString(reader) + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + if _c1 && _c2 && _c3 && _c4 { + return Api.PendingSuggestion.pendingSuggestion(suggestion: _1!, title: _2!, description: _3!, url: _4!) + } + else { + return nil + } + } + + } +} public extension Api { enum PhoneCall: TypeConstructorDescription { case phoneCall(flags: Int32, id: Int64, accessHash: Int64, date: Int32, adminId: Int64, participantId: Int64, gAOrB: Buffer, keyFingerprint: Int64, protocol: Api.PhoneCallProtocol, connections: [Api.PhoneConnection], startDate: Int32, customParameters: Api.DataJSON?) diff --git a/submodules/TelegramApi/Sources/Api23.swift b/submodules/TelegramApi/Sources/Api23.swift index 2d1c58a694..cbfbf62bbb 100644 --- a/submodules/TelegramApi/Sources/Api23.swift +++ b/submodules/TelegramApi/Sources/Api23.swift @@ -144,13 +144,13 @@ public extension Api { } public extension Api { enum SavedStarGift: TypeConstructorDescription { - case savedStarGift(flags: Int32, fromId: Api.Peer?, date: Int32, gift: Api.StarGift, message: Api.TextWithEntities?, msgId: Int32?, savedId: Int64?, convertStars: Int64?, upgradeStars: Int64?, canExportAt: Int32?, transferStars: Int64?) + case savedStarGift(flags: Int32, fromId: Api.Peer?, date: Int32, gift: Api.StarGift, message: Api.TextWithEntities?, msgId: Int32?, savedId: Int64?, convertStars: Int64?, upgradeStars: Int64?, canExportAt: Int32?, transferStars: Int64?, canTransferAt: Int32?, canResellAt: Int32?) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .savedStarGift(let flags, let fromId, let date, let gift, let message, let msgId, let savedId, let convertStars, let upgradeStars, let canExportAt, let transferStars): + case .savedStarGift(let flags, let fromId, let date, let gift, let message, let msgId, let savedId, let convertStars, let upgradeStars, let canExportAt, let transferStars, let canTransferAt, let canResellAt): if boxed { - buffer.appendInt32(1616305061) + buffer.appendInt32(-539360103) } serializeInt32(flags, buffer: buffer, boxed: false) if Int(flags) & Int(1 << 1) != 0 {fromId!.serialize(buffer, true)} @@ -163,14 +163,16 @@ public extension Api { if Int(flags) & Int(1 << 6) != 0 {serializeInt64(upgradeStars!, buffer: buffer, boxed: false)} if Int(flags) & Int(1 << 7) != 0 {serializeInt32(canExportAt!, buffer: buffer, boxed: false)} if Int(flags) & Int(1 << 8) != 0 {serializeInt64(transferStars!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 13) != 0 {serializeInt32(canTransferAt!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 14) != 0 {serializeInt32(canResellAt!, buffer: buffer, boxed: false)} break } } public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .savedStarGift(let flags, let fromId, let date, let gift, let message, let msgId, let savedId, let convertStars, let upgradeStars, let canExportAt, let transferStars): - return ("savedStarGift", [("flags", flags as Any), ("fromId", fromId as Any), ("date", date as Any), ("gift", gift as Any), ("message", message as Any), ("msgId", msgId as Any), ("savedId", savedId as Any), ("convertStars", convertStars as Any), ("upgradeStars", upgradeStars as Any), ("canExportAt", canExportAt as Any), ("transferStars", transferStars as Any)]) + case .savedStarGift(let flags, let fromId, let date, let gift, let message, let msgId, let savedId, let convertStars, let upgradeStars, let canExportAt, let transferStars, let canTransferAt, let canResellAt): + return ("savedStarGift", [("flags", flags as Any), ("fromId", fromId as Any), ("date", date as Any), ("gift", gift as Any), ("message", message as Any), ("msgId", msgId as Any), ("savedId", savedId as Any), ("convertStars", convertStars as Any), ("upgradeStars", upgradeStars as Any), ("canExportAt", canExportAt as Any), ("transferStars", transferStars as Any), ("canTransferAt", canTransferAt as Any), ("canResellAt", canResellAt as Any)]) } } @@ -203,6 +205,10 @@ public extension Api { if Int(_1!) & Int(1 << 7) != 0 {_10 = reader.readInt32() } var _11: Int64? if Int(_1!) & Int(1 << 8) != 0 {_11 = reader.readInt64() } + var _12: Int32? + if Int(_1!) & Int(1 << 13) != 0 {_12 = reader.readInt32() } + var _13: Int32? + if Int(_1!) & Int(1 << 14) != 0 {_13 = reader.readInt32() } let _c1 = _1 != nil let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil let _c3 = _3 != nil @@ -214,8 +220,10 @@ public extension Api { let _c9 = (Int(_1!) & Int(1 << 6) == 0) || _9 != nil let _c10 = (Int(_1!) & Int(1 << 7) == 0) || _10 != nil let _c11 = (Int(_1!) & Int(1 << 8) == 0) || _11 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { - return Api.SavedStarGift.savedStarGift(flags: _1!, fromId: _2, date: _3!, gift: _4!, message: _5, msgId: _6, savedId: _7, convertStars: _8, upgradeStars: _9, canExportAt: _10, transferStars: _11) + let _c12 = (Int(_1!) & Int(1 << 13) == 0) || _12 != nil + let _c13 = (Int(_1!) & Int(1 << 14) == 0) || _13 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 { + return Api.SavedStarGift.savedStarGift(flags: _1!, fromId: _2, date: _3!, gift: _4!, message: _5, msgId: _6, savedId: _7, convertStars: _8, upgradeStars: _9, canExportAt: _10, transferStars: _11, canTransferAt: _12, canResellAt: _13) } else { return nil diff --git a/submodules/TelegramApi/Sources/Api3.swift b/submodules/TelegramApi/Sources/Api3.swift index b6ec88ab5b..1818e0060b 100644 --- a/submodules/TelegramApi/Sources/Api3.swift +++ b/submodules/TelegramApi/Sources/Api3.swift @@ -605,6 +605,7 @@ public extension Api { case channelAdminLogEventActionStartGroupCall(call: Api.InputGroupCall) case channelAdminLogEventActionStopPoll(message: Api.Message) case channelAdminLogEventActionToggleAntiSpam(newValue: Api.Bool) + case channelAdminLogEventActionToggleAutotranslation(newValue: Api.Bool) case channelAdminLogEventActionToggleForum(newValue: Api.Bool) case channelAdminLogEventActionToggleGroupCallSetting(joinMuted: Api.Bool) case channelAdminLogEventActionToggleInvites(newValue: Api.Bool) @@ -897,6 +898,12 @@ public extension Api { } newValue.serialize(buffer, true) break + case .channelAdminLogEventActionToggleAutotranslation(let newValue): + if boxed { + buffer.appendInt32(-988285058) + } + newValue.serialize(buffer, true) + break case .channelAdminLogEventActionToggleForum(let newValue): if boxed { buffer.appendInt32(46949251) @@ -1039,6 +1046,8 @@ public extension Api { return ("channelAdminLogEventActionStopPoll", [("message", message as Any)]) case .channelAdminLogEventActionToggleAntiSpam(let newValue): return ("channelAdminLogEventActionToggleAntiSpam", [("newValue", newValue as Any)]) + case .channelAdminLogEventActionToggleAutotranslation(let newValue): + return ("channelAdminLogEventActionToggleAutotranslation", [("newValue", newValue as Any)]) case .channelAdminLogEventActionToggleForum(let newValue): return ("channelAdminLogEventActionToggleForum", [("newValue", newValue as Any)]) case .channelAdminLogEventActionToggleGroupCallSetting(let joinMuted): @@ -1677,6 +1686,19 @@ public extension Api { return nil } } + public static func parse_channelAdminLogEventActionToggleAutotranslation(_ reader: BufferReader) -> ChannelAdminLogEventAction? { + var _1: Api.Bool? + if let signature = reader.readInt32() { + _1 = Api.parse(reader, signature: signature) as? Api.Bool + } + let _c1 = _1 != nil + if _c1 { + return Api.ChannelAdminLogEventAction.channelAdminLogEventActionToggleAutotranslation(newValue: _1!) + } + else { + return nil + } + } public static func parse_channelAdminLogEventActionToggleForum(_ reader: BufferReader) -> ChannelAdminLogEventAction? { var _1: Api.Bool? if let signature = reader.readInt32() { diff --git a/submodules/TelegramApi/Sources/Api31.swift b/submodules/TelegramApi/Sources/Api31.swift index 8f0b7e1295..a9067b18c2 100644 --- a/submodules/TelegramApi/Sources/Api31.swift +++ b/submodules/TelegramApi/Sources/Api31.swift @@ -706,18 +706,31 @@ public extension Api.help { } public extension Api.help { enum PromoData: TypeConstructorDescription { - case promoData(flags: Int32, expires: Int32, peer: Api.Peer, chats: [Api.Chat], users: [Api.User], psaType: String?, psaMessage: String?) + case promoData(flags: Int32, expires: Int32, peer: Api.Peer?, psaType: String?, psaMessage: String?, pendingSuggestions: [String], dismissedSuggestions: [String], customPendingSuggestion: Api.PendingSuggestion?, chats: [Api.Chat], users: [Api.User]) case promoDataEmpty(expires: Int32) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { switch self { - case .promoData(let flags, let expires, let peer, let chats, let users, let psaType, let psaMessage): + case .promoData(let flags, let expires, let peer, let psaType, let psaMessage, let pendingSuggestions, let dismissedSuggestions, let customPendingSuggestion, let chats, let users): if boxed { - buffer.appendInt32(-1942390465) + buffer.appendInt32(145021050) } serializeInt32(flags, buffer: buffer, boxed: false) serializeInt32(expires, buffer: buffer, boxed: false) - peer.serialize(buffer, true) + if Int(flags) & Int(1 << 3) != 0 {peer!.serialize(buffer, true)} + if Int(flags) & Int(1 << 1) != 0 {serializeString(psaType!, buffer: buffer, boxed: false)} + if Int(flags) & Int(1 << 2) != 0 {serializeString(psaMessage!, buffer: buffer, boxed: false)} + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(pendingSuggestions.count)) + for item in pendingSuggestions { + serializeString(item, buffer: buffer, boxed: false) + } + buffer.appendInt32(481674261) + buffer.appendInt32(Int32(dismissedSuggestions.count)) + for item in dismissedSuggestions { + serializeString(item, buffer: buffer, boxed: false) + } + if Int(flags) & Int(1 << 4) != 0 {customPendingSuggestion!.serialize(buffer, true)} buffer.appendInt32(481674261) buffer.appendInt32(Int32(chats.count)) for item in chats { @@ -728,8 +741,6 @@ public extension Api.help { for item in users { item.serialize(buffer, true) } - if Int(flags) & Int(1 << 1) != 0 {serializeString(psaType!, buffer: buffer, boxed: false)} - if Int(flags) & Int(1 << 2) != 0 {serializeString(psaMessage!, buffer: buffer, boxed: false)} break case .promoDataEmpty(let expires): if boxed { @@ -742,8 +753,8 @@ public extension Api.help { public func descriptionFields() -> (String, [(String, Any)]) { switch self { - case .promoData(let flags, let expires, let peer, let chats, let users, let psaType, let psaMessage): - return ("promoData", [("flags", flags as Any), ("expires", expires as Any), ("peer", peer as Any), ("chats", chats as Any), ("users", users as Any), ("psaType", psaType as Any), ("psaMessage", psaMessage as Any)]) + case .promoData(let flags, let expires, let peer, let psaType, let psaMessage, let pendingSuggestions, let dismissedSuggestions, let customPendingSuggestion, let chats, let users): + return ("promoData", [("flags", flags as Any), ("expires", expires as Any), ("peer", peer as Any), ("psaType", psaType as Any), ("psaMessage", psaMessage as Any), ("pendingSuggestions", pendingSuggestions as Any), ("dismissedSuggestions", dismissedSuggestions as Any), ("customPendingSuggestion", customPendingSuggestion as Any), ("chats", chats as Any), ("users", users as Any)]) case .promoDataEmpty(let expires): return ("promoDataEmpty", [("expires", expires as Any)]) } @@ -755,30 +766,45 @@ public extension Api.help { var _2: Int32? _2 = reader.readInt32() var _3: Api.Peer? - if let signature = reader.readInt32() { + if Int(_1!) & Int(1 << 3) != 0 {if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.Peer - } - var _4: [Api.Chat]? + } } + var _4: String? + if Int(_1!) & Int(1 << 1) != 0 {_4 = parseString(reader) } + var _5: String? + if Int(_1!) & Int(1 << 2) != 0 {_5 = parseString(reader) } + var _6: [String]? if let _ = reader.readInt32() { - _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) + _6 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self) } - var _5: [Api.User]? + var _7: [String]? if let _ = reader.readInt32() { - _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) + _7 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self) + } + var _8: Api.PendingSuggestion? + if Int(_1!) & Int(1 << 4) != 0 {if let signature = reader.readInt32() { + _8 = Api.parse(reader, signature: signature) as? Api.PendingSuggestion + } } + var _9: [Api.Chat]? + if let _ = reader.readInt32() { + _9 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) + } + var _10: [Api.User]? + if let _ = reader.readInt32() { + _10 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) } - var _6: String? - if Int(_1!) & Int(1 << 1) != 0 {_6 = parseString(reader) } - var _7: String? - if Int(_1!) & Int(1 << 2) != 0 {_7 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 2) == 0) || _7 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { - return Api.help.PromoData.promoData(flags: _1!, expires: _2!, peer: _3!, chats: _4!, users: _5!, psaType: _6, psaMessage: _7) + let _c3 = (Int(_1!) & Int(1 << 3) == 0) || _3 != nil + let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c6 = _6 != nil + let _c7 = _7 != nil + let _c8 = (Int(_1!) & Int(1 << 4) == 0) || _8 != nil + let _c9 = _9 != nil + let _c10 = _10 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 { + return Api.help.PromoData.promoData(flags: _1!, expires: _2!, peer: _3, psaType: _4, psaMessage: _5, pendingSuggestions: _6!, dismissedSuggestions: _7!, customPendingSuggestion: _8, chats: _9!, users: _10!) } else { return nil diff --git a/submodules/TelegramApi/Sources/Api36.swift b/submodules/TelegramApi/Sources/Api36.swift index 804687918d..e3c0df82da 100644 --- a/submodules/TelegramApi/Sources/Api36.swift +++ b/submodules/TelegramApi/Sources/Api36.swift @@ -760,6 +760,42 @@ public extension Api.stories { } } +public extension Api.stories { + enum CanSendStoryCount: TypeConstructorDescription { + case canSendStoryCount(countRemains: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .canSendStoryCount(let countRemains): + if boxed { + buffer.appendInt32(-1014513586) + } + serializeInt32(countRemains, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .canSendStoryCount(let countRemains): + return ("canSendStoryCount", [("countRemains", countRemains as Any)]) + } + } + + public static func parse_canSendStoryCount(_ reader: BufferReader) -> CanSendStoryCount? { + var _1: Int32? + _1 = reader.readInt32() + let _c1 = _1 != nil + if _c1 { + return Api.stories.CanSendStoryCount.canSendStoryCount(countRemains: _1!) + } + else { + return nil + } + } + + } +} public extension Api.stories { enum FoundStories: TypeConstructorDescription { case foundStories(flags: Int32, count: Int32, stories: [Api.FoundStory], nextOffset: String?, chats: [Api.Chat], users: [Api.User]) @@ -1560,55 +1596,3 @@ public extension Api.updates { } } -public extension Api.updates { - enum State: TypeConstructorDescription { - case state(pts: Int32, qts: Int32, date: Int32, seq: Int32, unreadCount: Int32) - - public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { - switch self { - case .state(let pts, let qts, let date, let seq, let unreadCount): - if boxed { - buffer.appendInt32(-1519637954) - } - serializeInt32(pts, buffer: buffer, boxed: false) - serializeInt32(qts, buffer: buffer, boxed: false) - serializeInt32(date, buffer: buffer, boxed: false) - serializeInt32(seq, buffer: buffer, boxed: false) - serializeInt32(unreadCount, buffer: buffer, boxed: false) - break - } - } - - public func descriptionFields() -> (String, [(String, Any)]) { - switch self { - case .state(let pts, let qts, let date, let seq, let unreadCount): - return ("state", [("pts", pts as Any), ("qts", qts as Any), ("date", date as Any), ("seq", seq as Any), ("unreadCount", unreadCount as Any)]) - } - } - - public static func parse_state(_ reader: BufferReader) -> State? { - var _1: Int32? - _1 = reader.readInt32() - var _2: Int32? - _2 = reader.readInt32() - var _3: Int32? - _3 = reader.readInt32() - var _4: Int32? - _4 = reader.readInt32() - var _5: Int32? - _5 = reader.readInt32() - let _c1 = _1 != nil - let _c2 = _2 != nil - let _c3 = _3 != nil - let _c4 = _4 != nil - let _c5 = _5 != nil - if _c1 && _c2 && _c3 && _c4 && _c5 { - return Api.updates.State.state(pts: _1!, qts: _2!, date: _3!, seq: _4!, unreadCount: _5!) - } - else { - return nil - } - } - - } -} diff --git a/submodules/TelegramApi/Sources/Api37.swift b/submodules/TelegramApi/Sources/Api37.swift index e76c07649a..281a495dbf 100644 --- a/submodules/TelegramApi/Sources/Api37.swift +++ b/submodules/TelegramApi/Sources/Api37.swift @@ -1,3 +1,55 @@ +public extension Api.updates { + enum State: TypeConstructorDescription { + case state(pts: Int32, qts: Int32, date: Int32, seq: Int32, unreadCount: Int32) + + public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { + switch self { + case .state(let pts, let qts, let date, let seq, let unreadCount): + if boxed { + buffer.appendInt32(-1519637954) + } + serializeInt32(pts, buffer: buffer, boxed: false) + serializeInt32(qts, buffer: buffer, boxed: false) + serializeInt32(date, buffer: buffer, boxed: false) + serializeInt32(seq, buffer: buffer, boxed: false) + serializeInt32(unreadCount, buffer: buffer, boxed: false) + break + } + } + + public func descriptionFields() -> (String, [(String, Any)]) { + switch self { + case .state(let pts, let qts, let date, let seq, let unreadCount): + return ("state", [("pts", pts as Any), ("qts", qts as Any), ("date", date as Any), ("seq", seq as Any), ("unreadCount", unreadCount as Any)]) + } + } + + public static func parse_state(_ reader: BufferReader) -> State? { + var _1: Int32? + _1 = reader.readInt32() + var _2: Int32? + _2 = reader.readInt32() + var _3: Int32? + _3 = reader.readInt32() + var _4: Int32? + _4 = reader.readInt32() + var _5: Int32? + _5 = reader.readInt32() + let _c1 = _1 != nil + let _c2 = _2 != nil + let _c3 = _3 != nil + let _c4 = _4 != nil + let _c5 = _5 != nil + if _c1 && _c2 && _c3 && _c4 && _c5 { + return Api.updates.State.state(pts: _1!, qts: _2!, date: _3!, seq: _4!, unreadCount: _5!) + } + else { + return nil + } + } + + } +} public extension Api.upload { enum CdnFile: TypeConstructorDescription { case cdnFile(bytes: Buffer) diff --git a/submodules/TelegramApi/Sources/Api38.swift b/submodules/TelegramApi/Sources/Api38.swift index 8f39ceae97..f937d610ca 100644 --- a/submodules/TelegramApi/Sources/Api38.swift +++ b/submodules/TelegramApi/Sources/Api38.swift @@ -3590,6 +3590,22 @@ public extension Api.functions.channels { }) } } +public extension Api.functions.channels { + static func toggleAutotranslation(channel: Api.InputChannel, enabled: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + let buffer = Buffer() + buffer.appendInt32(377471137) + channel.serialize(buffer, true) + enabled.serialize(buffer, true) + return (FunctionDescription(name: "channels.toggleAutotranslation", parameters: [("channel", String(describing: channel)), ("enabled", String(describing: enabled))]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + let reader = BufferReader(buffer) + var result: Api.Updates? + if let signature = reader.readInt32() { + result = Api.parse(reader, signature: signature) as? Api.Updates + } + return result + }) + } +} public extension Api.functions.channels { static func toggleForum(channel: Api.InputChannel, enabled: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { let buffer = Buffer() @@ -9791,12 +9807,12 @@ public extension Api.functions.payments { } } public extension Api.functions.payments { - static func updateStarGiftPrice(slug: String, resellStars: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + static func updateStarGiftPrice(stargift: Api.InputSavedStarGift, resellStars: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { let buffer = Buffer() - buffer.appendInt32(-489360582) - serializeString(slug, buffer: buffer, boxed: false) + buffer.appendInt32(1001301217) + stargift.serialize(buffer, true) serializeInt64(resellStars, buffer: buffer, boxed: false) - return (FunctionDescription(name: "payments.updateStarGiftPrice", parameters: [("slug", String(describing: slug)), ("resellStars", String(describing: resellStars))]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in + return (FunctionDescription(name: "payments.updateStarGiftPrice", parameters: [("stargift", String(describing: stargift)), ("resellStars", String(describing: resellStars))]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in let reader = BufferReader(buffer) var result: Api.Updates? if let signature = reader.readInt32() { @@ -11139,15 +11155,15 @@ public extension Api.functions.stories { } } public extension Api.functions.stories { - static func canSendStory(peer: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { + static func canSendStory(peer: Api.InputPeer) -> (FunctionDescription, Buffer, DeserializeFunctionResponse) { let buffer = Buffer() - buffer.appendInt32(-941629475) + buffer.appendInt32(820732912) peer.serialize(buffer, true) - return (FunctionDescription(name: "stories.canSendStory", parameters: [("peer", String(describing: peer))]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in + return (FunctionDescription(name: "stories.canSendStory", parameters: [("peer", String(describing: peer))]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.stories.CanSendStoryCount? in let reader = BufferReader(buffer) - var result: Api.Bool? + var result: Api.stories.CanSendStoryCount? if let signature = reader.readInt32() { - result = Api.parse(reader, signature: signature) as? Api.Bool + result = Api.parse(reader, signature: signature) as? Api.stories.CanSendStoryCount } return result }) diff --git a/submodules/TelegramCore/FlatBuffers/BUILD b/submodules/TelegramCore/FlatBuffers/BUILD index e2d518aa50..f08cd30bfa 100644 --- a/submodules/TelegramCore/FlatBuffers/BUILD +++ b/submodules/TelegramCore/FlatBuffers/BUILD @@ -7,6 +7,7 @@ swift_library( "Sources/**/*.swift", ]), copts = [ + "-suppress-warnings", ], deps = [ ], diff --git a/submodules/TgVoipWebrtc/BUILD b/submodules/TgVoipWebrtc/BUILD index 2b8805cbce..2b0e2106f8 100644 --- a/submodules/TgVoipWebrtc/BUILD +++ b/submodules/TgVoipWebrtc/BUILD @@ -163,7 +163,7 @@ objc_library( "PublicHeaders", ], deps = [ - "//third-party/webrtc:webrtc_lib", + "//third-party/webrtc:webrtc", "//submodules/MtProtoKit:MtProtoKit", "//third-party/boringssl:crypto", "//third-party/boringssl:ssl", diff --git a/submodules/ffmpeg/BUILD b/submodules/ffmpeg/BUILD index 97338b0b4f..f17be250cb 100644 --- a/submodules/ffmpeg/BUILD +++ b/submodules/ffmpeg/BUILD @@ -2,7 +2,6 @@ ffmpeg_header_paths = [ "libavutil/hwcontext.h", "libavutil/time.h", - "libavutil/hwcontext_cuda.h", "libavutil/iamf.h", "libavutil/intfloat.h", "libavutil/error.h", @@ -10,7 +9,6 @@ ffmpeg_header_paths = [ "libavutil/ambient_viewing_environment.h", "libavutil/fifo.h", "libavutil/blowfish.h", - "libavutil/hwcontext_mediacodec.h", "libavutil/replaygain.h", "libavutil/version.h", "libavutil/murmur3.h", @@ -25,38 +23,30 @@ ffmpeg_header_paths = [ "libavutil/avconfig.h", "libavutil/lfg.h", "libavutil/avutil.h", - "libavutil/hwcontext_vulkan.h", "libavutil/xtea.h", "libavutil/crc.h", - "libavutil/hwcontext_vdpau.h", "libavutil/frame.h", "libavutil/file.h", "libavutil/md5.h", "libavutil/cast5.h", - "libavutil/hwcontext_vaapi.h", "libavutil/spherical.h", "libavutil/ffversion.h", - "libavutil/hwcontext_opencl.h", "libavutil/audio_fifo.h", "libavutil/tree.h", "libavutil/threadmessage.h", "libavutil/attributes.h", "libavutil/hdr_dynamic_vivid_metadata.h", "libavutil/adler32.h", - "libavutil/hwcontext_d3d11va.h", "libavutil/timecode.h", "libavutil/dovi_meta.h", - "libavutil/hwcontext_d3d12va.h", "libavutil/tx.h", "libavutil/sha512.h", - "libavutil/hwcontext_dxva2.h", "libavutil/display.h", "libavutil/buffer.h", "libavutil/camellia.h", "libavutil/csp.h", "libavutil/video_hint.h", "libavutil/pixelutils.h", - "libavutil/hwcontext_drm.h", "libavutil/common.h", "libavutil/hmac.h", "libavutil/eval.h", @@ -85,7 +75,6 @@ ffmpeg_header_paths = [ "libavutil/ripemd.h", "libavutil/bprint.h", "libavutil/hdr_dynamic_metadata.h", - "libavutil/hwcontext_qsv.h", "libavutil/pixfmt.h", "libavutil/aes_ctr.h", "libavutil/timestamp.h", @@ -104,16 +93,11 @@ ffmpeg_header_paths = [ "libavcodec/avcodec.h", "libavcodec/defs.h", "libavcodec/version.h", - "libavcodec/vdpau.h", "libavcodec/codec_par.h", - "libavcodec/qsv.h", "libavcodec/codec_desc.h", "libavcodec/videotoolbox.h", - "libavcodec/mediacodec.h", - "libavcodec/d3d11va.h", "libavcodec/avfft.h", "libavcodec/codec.h", - "libavcodec/jni.h", "libavcodec/packet.h", "libavcodec/version_major.h", "libavcodec/bsf.h", @@ -122,7 +106,6 @@ ffmpeg_header_paths = [ "libavcodec/avdct.h", "libavcodec/ac3_parser.h", "libavcodec/vorbis_parser.h", - "libavcodec/dxva2.h", "libavcodec/dv_profile.h", "libswresample/version.h", "libswresample/version_major.h", diff --git a/submodules/ffmpeg/PublicHeaders/ffmpeg/ffmpeg.h b/submodules/ffmpeg/PublicHeaders/ffmpeg/ffmpeg.h deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/third-party/mozjpeg/BUILD b/third-party/mozjpeg/BUILD index faeca31222..27d92cd0ae 100644 --- a/third-party/mozjpeg/BUILD +++ b/third-party/mozjpeg/BUILD @@ -87,7 +87,6 @@ objc_library( hdrs = [":Public/mozjpeg/" + x for x in headers] + [":Public/mozjpeg/jconfig.h"], includes = [ "Public", - "Public/mozjpeg", ], deps = [ ":mozjpeg_lib", diff --git a/third-party/opus/BUILD b/third-party/opus/BUILD index 915d9e8f46..5ea4abdd86 100644 --- a/third-party/opus/BUILD +++ b/third-party/opus/BUILD @@ -70,7 +70,6 @@ objc_library( hdrs = [":Public/opus/" + x for x in headers], includes = [ "Public", - "Public/opus", ], deps = [ ":opus_lib", diff --git a/third-party/opusfile/include/opusfile/opusfile.h b/third-party/opusfile/include/opusfile/opusfile.h index 7c1c89e05a..296d8d9a77 100644 --- a/third-party/opusfile/include/opusfile/opusfile.h +++ b/third-party/opusfile/include/opusfile/opusfile.h @@ -107,7 +107,7 @@ extern "C" { # include # include # include -# include +# include /**@cond PRIVATE*/ diff --git a/third-party/td/BUILD b/third-party/td/BUILD index 302d844635..a11c47625b 100644 --- a/third-party/td/BUILD +++ b/third-party/td/BUILD @@ -109,7 +109,6 @@ objc_library( enable_modules = True, hdrs = [":Public/td/" + x for x in headers], includes = [ - "Public", "Public/td", ], deps = [ diff --git a/third-party/webp/BUILD b/third-party/webp/BUILD index b6ef3be99f..796f360164 100644 --- a/third-party/webp/BUILD +++ b/third-party/webp/BUILD @@ -84,7 +84,6 @@ objc_library( hdrs = [":Public/webp/" + x for x in headers], includes = [ "Public", - "Public/webp", ], deps = [ ":webp_lib", diff --git a/third-party/webrtc/BUILD b/third-party/webrtc/BUILD index 6e03fe41ec..91498518d5 100644 --- a/third-party/webrtc/BUILD +++ b/third-party/webrtc/BUILD @@ -3563,7 +3563,7 @@ cc_library( ) objc_library( - name = "webrtc_lib", + name = "webrtc", enable_modules = True, module_name = "webrtc", srcs = combined_sources,