From 2dd07ef8cc7962b71120bf3b04403491c55ca0bb Mon Sep 17 00:00:00 2001 From: isaac <> Date: Tue, 21 Apr 2026 23:44:35 +0400 Subject: [PATCH] TelegramApi: regenerate Api*/SecretApiLayer*.swift with safe flag unwrap Mechanical regeneration after the SwiftTL fix. Every 'if Int(_N!) & Int(1 << K) != 0 {...}' gate and matching '_cM = (Int(_N!) & ...) == 0) || ...' validation in parse_ now reads 'Int(_N ?? 0)' instead of force-unwrapping. ~2168 sites changed across the 41 flat Api*.swift files plus the 11 layered SecretApiLayer*.swift files. No other content change. Full Bazel build verified green with the regenerated sources. Co-Authored-By: Claude Opus 4.7 (1M context) --- submodules/TelegramApi/Sources/Api1.swift | 72 ++-- submodules/TelegramApi/Sources/Api10.swift | 28 +- submodules/TelegramApi/Sources/Api11.swift | 124 +++--- submodules/TelegramApi/Sources/Api12.swift | 28 +- submodules/TelegramApi/Sources/Api13.swift | 108 ++--- submodules/TelegramApi/Sources/Api14.swift | 132 +++--- submodules/TelegramApi/Sources/Api15.swift | 404 ++++++++--------- submodules/TelegramApi/Sources/Api16.swift | 156 +++---- submodules/TelegramApi/Sources/Api17.swift | 88 ++-- submodules/TelegramApi/Sources/Api18.swift | 32 +- submodules/TelegramApi/Sources/Api19.swift | 176 ++++---- submodules/TelegramApi/Sources/Api2.swift | 160 +++---- submodules/TelegramApi/Sources/Api20.swift | 80 ++-- submodules/TelegramApi/Sources/Api21.swift | 16 +- submodules/TelegramApi/Sources/Api22.swift | 92 ++-- submodules/TelegramApi/Sources/Api23.swift | 72 ++-- submodules/TelegramApi/Sources/Api24.swift | 28 +- submodules/TelegramApi/Sources/Api25.swift | 224 +++++----- submodules/TelegramApi/Sources/Api26.swift | 136 +++--- submodules/TelegramApi/Sources/Api27.swift | 124 +++--- submodules/TelegramApi/Sources/Api28.swift | 220 +++++----- submodules/TelegramApi/Sources/Api29.swift | 408 +++++++++--------- submodules/TelegramApi/Sources/Api3.swift | 36 +- submodules/TelegramApi/Sources/Api30.swift | 84 ++-- submodules/TelegramApi/Sources/Api31.swift | 32 +- submodules/TelegramApi/Sources/Api32.swift | 48 +-- submodules/TelegramApi/Sources/Api33.swift | 60 +-- submodules/TelegramApi/Sources/Api34.swift | 28 +- submodules/TelegramApi/Sources/Api35.swift | 48 +-- submodules/TelegramApi/Sources/Api36.swift | 24 +- submodules/TelegramApi/Sources/Api37.swift | 120 +++--- submodules/TelegramApi/Sources/Api38.swift | 96 ++--- submodules/TelegramApi/Sources/Api39.swift | 28 +- submodules/TelegramApi/Sources/Api4.swift | 340 +++++++-------- submodules/TelegramApi/Sources/Api5.swift | 124 +++--- submodules/TelegramApi/Sources/Api6.swift | 72 ++-- submodules/TelegramApi/Sources/Api7.swift | 124 +++--- submodules/TelegramApi/Sources/Api8.swift | 120 +++--- submodules/TelegramApi/Sources/Api9.swift | 44 +- .../Sources/SecretApiLayer101.swift | 32 +- .../Sources/SecretApiLayer143.swift | 32 +- .../Sources/SecretApiLayer144.swift | 32 +- .../Sources/SecretApiLayer45.swift | 16 +- .../Sources/SecretApiLayer46.swift | 28 +- .../Sources/SecretApiLayer66.swift | 28 +- .../Sources/SecretApiLayer73.swift | 32 +- 46 files changed, 2268 insertions(+), 2268 deletions(-) diff --git a/submodules/TelegramApi/Sources/Api1.swift b/submodules/TelegramApi/Sources/Api1.swift index bc34df8e33..aac4ebc52e 100644 --- a/submodules/TelegramApi/Sources/Api1.swift +++ b/submodules/TelegramApi/Sources/Api1.swift @@ -146,23 +146,23 @@ public extension Api { var _5: String? _5 = parseString(reader) var _6: Int64? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _6 = reader.readInt64() } var _7: String? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _7 = parseString(reader) } var _8: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _8 = reader.readInt32() } var _9: Int64? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _9 = reader.readInt64() } var _10: Api.AiComposeToneExample? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { if let signature = reader.readInt32() { _10 = Api.parse(reader, signature: signature) as? Api.AiComposeToneExample } @@ -172,11 +172,11 @@ public extension Api { 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 << 4) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 3) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 5) == 0) || _10 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _10 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 { return Api.AiComposeTone.aiComposeTone(Cons_aiComposeTone(flags: _1!, id: _2!, accessHash: _3!, slug: _4!, title: _5!, emojiId: _6, prompt: _7, installsCount: _8, authorId: _9, exampleEnglish: _10)) } @@ -318,7 +318,7 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: [Api.AttachMenuPeerType]? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let _ = reader.readInt32() { _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.AttachMenuPeerType.self) } @@ -330,7 +330,7 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _4 != nil let _c5 = _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.AttachMenuBot.attachMenuBot(Cons_attachMenuBot(flags: _1!, botId: _2!, shortName: _3!, peerTypes: _4, icons: _5!)) @@ -397,7 +397,7 @@ public extension Api { _3 = Api.parse(reader, signature: signature) as? Api.Document } var _4: [Api.AttachMenuBotIconColor]? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.AttachMenuBotIconColor.self) } @@ -405,7 +405,7 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.AttachMenuBotIcon.attachMenuBotIcon(Cons_attachMenuBotIcon(flags: _1!, name: _2!, icon: _3!, colors: _4)) } @@ -1018,11 +1018,11 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int64? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _2 = reader.readInt64() } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 2) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _2 != nil if _c1 && _c2 { return Api.AutoSaveSettings.autoSaveSettings(Cons_autoSaveSettings(flags: _1!, videoMaxSize: _2)) } @@ -1090,21 +1090,21 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: Int64? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = reader.readInt64() } var _5: Int64? _5 = reader.readInt64() var _6: Int64? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _6 = reader.readInt64() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.AvailableEffect.availableEffect(Cons_availableEffect(flags: _1!, id: _2!, emoticon: _3!, staticIconId: _4, effectStickerId: _5!, effectAnimationId: _6)) } @@ -1204,13 +1204,13 @@ public extension Api { _8 = Api.parse(reader, signature: signature) as? Api.Document } var _9: Api.Document? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _9 = Api.parse(reader, signature: signature) as? Api.Document } } var _10: Api.Document? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _10 = Api.parse(reader, signature: signature) as? Api.Document } @@ -1223,8 +1223,8 @@ public extension Api { let _c6 = _6 != nil let _c7 = _7 != nil let _c8 = _8 != nil - let _c9 = (Int(_1!) & Int(1 << 1) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 1) == 0) || _10 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _10 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 { return Api.AvailableReaction.availableReaction(Cons_availableReaction(flags: _1!, reaction: _2!, title: _3!, staticIcon: _4!, appearAnimation: _5!, selectAnimation: _6!, activateAnimation: _7!, effectAnimation: _8!, aroundAnimation: _9, centerIcon: _10)) } @@ -1404,13 +1404,13 @@ public extension Api { var _3: Int32? _3 = reader.readInt32() var _4: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.Birthday.birthday(Cons_birthday(flags: _1!, day: _2!, month: _3!, year: _4)) } @@ -1528,11 +1528,11 @@ public extension Api { var _2: String? _2 = parseString(reader) var _3: Int64? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt64() } var _4: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _4 = reader.readInt32() } var _5: Int32? @@ -1540,26 +1540,26 @@ public extension Api { var _6: Int32? _6 = reader.readInt32() var _7: String? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _7 = parseString(reader) } var _8: Int32? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _8 = reader.readInt32() } var _9: Int64? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { _9 = reader.readInt64() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 5) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 6) == 0) || _9 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _9 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { return Api.Boost.boost(Cons_boost(flags: _1!, id: _2!, userId: _3, giveawayMsgId: _4, date: _5!, expires: _6!, usedGiftSlug: _7, multiplier: _8, stars: _9)) } diff --git a/submodules/TelegramApi/Sources/Api10.swift b/submodules/TelegramApi/Sources/Api10.swift index 1aa0f1f987..f9dbfbe0e0 100644 --- a/submodules/TelegramApi/Sources/Api10.swift +++ b/submodules/TelegramApi/Sources/Api10.swift @@ -323,19 +323,19 @@ public extension Api { var _4: Int32? _4 = reader.readInt32() var _5: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _5 = reader.readInt32() } var _6: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _6 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.InputFileLocation.inputGroupCallStream(Cons_inputGroupCallStream(flags: _1!, call: _2!, timeMs: _3!, scale: _4!, videoChannel: _5, videoQuality: _6)) } @@ -640,13 +640,13 @@ public extension Api { var _3: Double? _3 = reader.readDouble() var _4: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.InputGeoPoint.inputGeoPoint(Cons_inputGeoPoint(flags: _1!, lat: _2!, long: _3!, accuracyRadius: _4)) } @@ -1196,7 +1196,7 @@ public extension Api { var _3: Int32? _3 = reader.readInt32() var _4: Api.TextWithEntities? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.TextWithEntities } @@ -1204,7 +1204,7 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.InputInvoice.inputInvoicePremiumGiftStars(Cons_inputInvoicePremiumGiftStars(flags: _1!, userId: _2!, months: _3!, message: _4)) } @@ -1233,7 +1233,7 @@ public extension Api { var _3: Int64? _3 = reader.readInt64() var _4: Api.TextWithEntities? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.TextWithEntities } @@ -1241,7 +1241,7 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.InputInvoice.inputInvoiceStarGift(Cons_inputInvoiceStarGift(flags: _1!, peer: _2!, giftId: _3!, message: _4)) } @@ -1253,7 +1253,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.InputPeer? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.InputPeer } @@ -1263,16 +1263,16 @@ public extension Api { var _4: Int64? _4 = reader.readInt64() var _5: Api.TextWithEntities? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.TextWithEntities } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 3) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.InputInvoice.inputInvoiceStarGiftAuctionBid(Cons_inputInvoiceStarGiftAuctionBid(flags: _1!, peer: _2, giftId: _3!, bidAmount: _4!, message: _5)) } diff --git a/submodules/TelegramApi/Sources/Api11.swift b/submodules/TelegramApi/Sources/Api11.swift index 5c9e6d7e3d..dc425a13f2 100644 --- a/submodules/TelegramApi/Sources/Api11.swift +++ b/submodules/TelegramApi/Sources/Api11.swift @@ -666,29 +666,29 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.InputDocument } var _3: Api.InputPhoto? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.InputPhoto } } var _4: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _4 = reader.readInt32() } var _5: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _5 = reader.readInt32() } var _6: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _6 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 3) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 4) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.InputMedia.inputMediaDocument(Cons_inputMediaDocument(flags: _1!, id: _2!, videoCover: _3, videoTimestamp: _4, ttlSeconds: _5, query: _6)) } @@ -702,24 +702,24 @@ public extension Api { var _2: String? _2 = parseString(reader) var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } var _4: Api.InputPhoto? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.InputPhoto } } var _5: Int32? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _5 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.InputMedia.inputMediaDocumentExternal(Cons_inputMediaDocumentExternal(flags: _1!, url: _2!, ttlSeconds: _3, videoCover: _4, videoTimestamp: _5)) } @@ -751,22 +751,22 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.InputGeoPoint } var _3: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _3 = reader.readInt32() } var _4: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = reader.readInt32() } var _5: Int32? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _5 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.InputMedia.inputMediaGeoLive(Cons_inputMediaGeoLive(flags: _1!, geoPoint: _2!, heading: _3, period: _4, proximityNotificationRadius: _5)) } @@ -795,7 +795,7 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: Api.InputWebDocument? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.InputWebDocument } @@ -807,7 +807,7 @@ public extension Api { var _6: Buffer? _6 = parseBytes(reader) var _7: String? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _7 = parseString(reader) } var _8: Api.DataJSON? @@ -815,11 +815,11 @@ public extension Api { _8 = Api.parse(reader, signature: signature) as? Api.DataJSON } var _9: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _9 = parseString(reader) } var _10: Api.InputMedia? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _10 = Api.parse(reader, signature: signature) as? Api.InputMedia } @@ -827,13 +827,13 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _7 != nil let _c8 = _8 != nil - let _c9 = (Int(_1!) & Int(1 << 1) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 2) == 0) || _10 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _10 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 { return Api.InputMedia.inputMediaInvoice(Cons_inputMediaInvoice(flags: _1!, title: _2!, description: _3!, photo: _4, invoice: _5!, payload: _6!, provider: _7, providerData: _8!, startParam: _9, extendedMedia: _10)) } @@ -851,13 +851,13 @@ public extension Api { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputMedia.self) } var _4: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.InputMedia.inputMediaPaidMedia(Cons_inputMediaPaidMedia(flags: _1!, starsAmount: _2!, extendedMedia: _3!, payload: _4)) } @@ -873,19 +873,19 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.InputPhoto } var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } var _4: Api.InputDocument? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.InputDocument } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.InputMedia.inputMediaPhoto(Cons_inputMediaPhoto(flags: _1!, id: _2!, ttlSeconds: _3, video: _4)) } @@ -899,12 +899,12 @@ public extension Api { var _2: String? _2 = parseString(reader) var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.InputMedia.inputMediaPhotoExternal(Cons_inputMediaPhotoExternal(flags: _1!, url: _2!, ttlSeconds: _3)) } @@ -920,40 +920,40 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.Poll } var _3: [Int32]? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) } } var _4: Api.InputMedia? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.InputMedia } } var _5: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _5 = parseString(reader) } var _6: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } } var _7: Api.InputMedia? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.InputMedia } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 2) == 0) || _7 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { return Api.InputMedia.inputMediaPoll(Cons_inputMediaPoll(flags: _1!, poll: _2!, correctAnswers: _3, attachedMedia: _4, solution: _5, solutionEntities: _6, solutionMedia: _7)) } @@ -1015,7 +1015,7 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.InputFile } var _3: Api.InputFile? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.InputFile } @@ -1027,34 +1027,34 @@ public extension Api { _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DocumentAttribute.self) } var _6: [Api.InputDocument]? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputDocument.self) } } var _7: Api.InputPhoto? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.InputPhoto } } var _8: Int32? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { _8 = reader.readInt32() } var _9: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _9 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 6) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 7) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 1) == 0) || _9 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _9 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { return Api.InputMedia.inputMediaUploadedDocument(Cons_inputMediaUploadedDocument(flags: _1!, file: _2!, thumb: _3, mimeType: _4!, attributes: _5!, stickers: _6, videoCover: _7, videoTimestamp: _8, ttlSeconds: _9)) } @@ -1070,26 +1070,26 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.InputFile } var _3: [Api.InputDocument]? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputDocument.self) } } var _4: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = reader.readInt32() } var _5: Api.InputDocument? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.InputDocument } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.InputMedia.inputMediaUploadedPhoto(Cons_inputMediaUploadedPhoto(flags: _1!, file: _2!, stickers: _3, ttlSeconds: _4, video: _5)) } diff --git a/submodules/TelegramApi/Sources/Api12.swift b/submodules/TelegramApi/Sources/Api12.swift index 0fd5371719..89a9c99847 100644 --- a/submodules/TelegramApi/Sources/Api12.swift +++ b/submodules/TelegramApi/Sources/Api12.swift @@ -540,53 +540,53 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.Bool? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.Bool } } var _3: Api.Bool? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.Bool } } var _4: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _4 = reader.readInt32() } var _5: Api.NotificationSound? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.NotificationSound } } var _6: Api.Bool? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.Bool } } var _7: Api.Bool? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.Bool } } var _8: Api.NotificationSound? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.NotificationSound } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 6) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 7) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 8) == 0) || _8 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.InputPeerNotifySettings.inputPeerNotifySettings(Cons_inputPeerNotifySettings(flags: _1!, showPreviews: _2, silent: _3, muteUntil: _4, sound: _5, storiesMuted: _6, storiesHideSender: _7, storiesSound: _8)) } diff --git a/submodules/TelegramApi/Sources/Api13.swift b/submodules/TelegramApi/Sources/Api13.swift index 1501d492d3..1a0cc1b88c 100644 --- a/submodules/TelegramApi/Sources/Api13.swift +++ b/submodules/TelegramApi/Sources/Api13.swift @@ -194,53 +194,53 @@ public extension Api { var _2: Int32? _2 = reader.readInt32() var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } var _4: Api.InputPeer? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.InputPeer } } var _5: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = parseString(reader) } var _6: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let _ = reader.readInt32() { _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } } var _7: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _7 = reader.readInt32() } var _8: Api.InputPeer? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.InputPeer } } var _9: Int32? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { _9 = reader.readInt32() } var _10: Buffer? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { _10 = parseBytes(reader) } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 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 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 5) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 6) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 7) == 0) || _10 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _10 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 { return Api.InputReplyTo.inputReplyToMessage(Cons_inputReplyToMessage(flags: _1!, replyToMsgId: _2!, topMsgId: _3, replyToPeerId: _4, quoteText: _5, quoteEntities: _6, quoteOffset: _7, monoforumPeerId: _8, todoItemId: _9, pollOption: _10)) } @@ -577,56 +577,56 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.SecureValueType } var _3: Api.SecureData? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.SecureData } } var _4: Api.InputSecureFile? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.InputSecureFile } } var _5: Api.InputSecureFile? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.InputSecureFile } } var _6: Api.InputSecureFile? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.InputSecureFile } } var _7: [Api.InputSecureFile]? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { if let _ = reader.readInt32() { _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputSecureFile.self) } } var _8: [Api.InputSecureFile]? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let _ = reader.readInt32() { _8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputSecureFile.self) } } var _9: Api.SecurePlainData? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { if let signature = reader.readInt32() { _9 = Api.parse(reader, signature: signature) as? Api.SecurePlainData } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 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 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 6) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 4) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 5) == 0) || _9 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _9 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { return Api.InputSecureValue.inputSecureValue(Cons_inputSecureValue(flags: _1!, type: _2!, data: _3, frontSide: _4, reverseSide: _5, selfie: _6, translation: _7, files: _8, plainData: _9)) } @@ -697,7 +697,7 @@ public extension Api { var _4: String? _4 = parseString(reader) var _5: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } @@ -706,7 +706,7 @@ public extension Api { let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.InputSingleMedia.inputSingleMedia(Cons_inputSingleMedia(flags: _1!, media: _2!, randomId: _3!, message: _4!, entities: _5)) } @@ -1103,20 +1103,20 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: Api.MaskCoords? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.MaskCoords } } var _5: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _5 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.InputStickerSetItem.inputStickerSetItem(Cons_inputStickerSetItem(flags: _1!, document: _2!, emoji: _3!, maskCoords: _4, keywords: _5)) } @@ -1556,7 +1556,7 @@ public extension Api { _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputUser.self) } var _3: Api.InputPeer? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.InputPeer } @@ -1566,17 +1566,17 @@ public extension Api { var _5: Int64? _5 = reader.readInt64() var _6: Api.TextWithEntities? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.TextWithEntities } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.InputStorePaymentPurpose.inputStorePaymentPremiumGiftCode(Cons_inputStorePaymentPremiumGiftCode(flags: _1!, users: _2!, boostPeer: _3, currency: _4!, amount: _5!, message: _6)) } @@ -1592,19 +1592,19 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.InputPeer } var _3: [Api.InputPeer]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputPeer.self) } } var _4: [String]? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let _ = reader.readInt32() { _4 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self) } } var _5: String? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _5 = parseString(reader) } var _6: Int64? @@ -1617,9 +1617,9 @@ public extension Api { _9 = reader.readInt64() let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 4) == 0) || _5 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil let _c8 = _8 != nil @@ -1674,19 +1674,19 @@ public extension Api { _3 = Api.parse(reader, signature: signature) as? Api.InputPeer } var _4: [Api.InputPeer]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputPeer.self) } } var _5: [String]? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let _ = reader.readInt32() { _5 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self) } } var _6: String? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _6 = parseString(reader) } var _7: Int64? @@ -1702,9 +1702,9 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 4) == 0) || _6 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _6 != nil let _c7 = _7 != nil let _c8 = _8 != nil let _c9 = _9 != nil @@ -1727,7 +1727,7 @@ public extension Api { var _4: Int64? _4 = reader.readInt64() var _5: Api.InputPeer? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.InputPeer } @@ -1736,7 +1736,7 @@ public extension Api { let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.InputStorePaymentPurpose.inputStorePaymentStarsTopup(Cons_inputStorePaymentStarsTopup(flags: _1!, stars: _2!, currency: _3!, amount: _4!, spendPurposePeer: _5)) } diff --git a/submodules/TelegramApi/Sources/Api14.swift b/submodules/TelegramApi/Sources/Api14.swift index 3d3e270c25..732969a330 100644 --- a/submodules/TelegramApi/Sources/Api14.swift +++ b/submodules/TelegramApi/Sources/Api14.swift @@ -148,23 +148,23 @@ public extension Api { var _3: Int32? _3 = reader.readInt32() var _4: Int32? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _4 = reader.readInt32() } var _5: [Int32]? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _5 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) } } var _6: Api.InputWallPaper? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.InputWallPaper } } var _7: Api.WallPaperSettings? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.WallPaperSettings } @@ -172,10 +172,10 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { return Api.InputThemeSettings.inputThemeSettings(Cons_inputThemeSettings(flags: _1!, baseTheme: _2!, accentColor: _3!, outboxAccentColor: _4, messageColors: _5, wallpaper: _6, wallpaperSettings: _7)) } @@ -580,23 +580,23 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.InputDocument? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.InputDocument } } var _3: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _3 = parseString(reader) } var _4: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = parseString(reader) } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.InputWebFileLocation.inputWebFileAudioAlbumThumbLocation(Cons_inputWebFileAudioAlbumThumbLocation(flags: _1!, document: _2, title: _3, performer: _4)) } @@ -723,30 +723,30 @@ public extension Api { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.LabeledPrice.self) } var _4: Int64? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { _4 = reader.readInt64() } var _5: [Int64]? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { if let _ = reader.readInt32() { _5 = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self) } } var _6: String? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { _6 = parseString(reader) } var _7: Int32? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { _7 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 8) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 8) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 10) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 11) == 0) || _7 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { return Api.Invoice.invoice(Cons_invoice(flags: _1!, currency: _2!, prices: _3!, maxTipAmount: _4, suggestedTipAmounts: _5, termsUrl: _6, subscriptionPeriod: _7)) } @@ -1556,7 +1556,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.KeyboardButtonStyle? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.KeyboardButtonStyle } @@ -1572,7 +1572,7 @@ public extension Api { var _6: Int32? _6 = reader.readInt32() let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 10) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil @@ -1588,7 +1588,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.KeyboardButtonStyle? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.KeyboardButtonStyle } @@ -1596,7 +1596,7 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = parseString(reader) } var _5: String? @@ -1606,9 +1606,9 @@ public extension Api { _6 = Api.parse(reader, signature: signature) as? Api.InputUser } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 10) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { @@ -1622,7 +1622,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.KeyboardButtonStyle? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.KeyboardButtonStyle } @@ -1634,7 +1634,7 @@ public extension Api { _4 = Api.parse(reader, signature: signature) as? Api.InputUser } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 10) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil if _c1 && _c2 && _c3 && _c4 { @@ -1648,7 +1648,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.KeyboardButtonStyle? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.KeyboardButtonStyle } @@ -1656,7 +1656,7 @@ public extension Api { var _3: String? _3 = parseString(reader) let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 10) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _2 != nil let _c3 = _3 != nil if _c1 && _c2 && _c3 { return Api.KeyboardButton.keyboardButton(Cons_keyboardButton(flags: _1!, style: _2, text: _3!)) @@ -1669,7 +1669,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.KeyboardButtonStyle? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.KeyboardButtonStyle } @@ -1677,7 +1677,7 @@ public extension Api { var _3: String? _3 = parseString(reader) let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 10) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _2 != nil let _c3 = _3 != nil if _c1 && _c2 && _c3 { return Api.KeyboardButton.keyboardButtonBuy(Cons_keyboardButtonBuy(flags: _1!, style: _2, text: _3!)) @@ -1690,7 +1690,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.KeyboardButtonStyle? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.KeyboardButtonStyle } @@ -1700,7 +1700,7 @@ public extension Api { var _4: Buffer? _4 = parseBytes(reader) let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 10) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil if _c1 && _c2 && _c3 && _c4 { @@ -1714,7 +1714,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.KeyboardButtonStyle? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.KeyboardButtonStyle } @@ -1724,7 +1724,7 @@ public extension Api { var _4: String? _4 = parseString(reader) let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 10) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil if _c1 && _c2 && _c3 && _c4 { @@ -1738,7 +1738,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.KeyboardButtonStyle? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.KeyboardButtonStyle } @@ -1746,7 +1746,7 @@ public extension Api { var _3: String? _3 = parseString(reader) let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 10) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _2 != nil let _c3 = _3 != nil if _c1 && _c2 && _c3 { return Api.KeyboardButton.keyboardButtonGame(Cons_keyboardButtonGame(flags: _1!, style: _2, text: _3!)) @@ -1759,7 +1759,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.KeyboardButtonStyle? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.KeyboardButtonStyle } @@ -1767,7 +1767,7 @@ public extension Api { var _3: String? _3 = parseString(reader) let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 10) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _2 != nil let _c3 = _3 != nil if _c1 && _c2 && _c3 { return Api.KeyboardButton.keyboardButtonRequestGeoLocation(Cons_keyboardButtonRequestGeoLocation(flags: _1!, style: _2, text: _3!)) @@ -1780,7 +1780,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.KeyboardButtonStyle? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.KeyboardButtonStyle } @@ -1796,7 +1796,7 @@ public extension Api { var _6: Int32? _6 = reader.readInt32() let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 10) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil @@ -1812,7 +1812,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.KeyboardButtonStyle? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.KeyboardButtonStyle } @@ -1820,7 +1820,7 @@ public extension Api { var _3: String? _3 = parseString(reader) let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 10) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _2 != nil let _c3 = _3 != nil if _c1 && _c2 && _c3 { return Api.KeyboardButton.keyboardButtonRequestPhone(Cons_keyboardButtonRequestPhone(flags: _1!, style: _2, text: _3!)) @@ -1833,13 +1833,13 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.KeyboardButtonStyle? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.KeyboardButtonStyle } } var _3: Api.Bool? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.Bool } @@ -1847,8 +1847,8 @@ public extension Api { var _4: String? _4 = parseString(reader) let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 10) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil let _c4 = _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.KeyboardButton.keyboardButtonRequestPoll(Cons_keyboardButtonRequestPoll(flags: _1!, style: _2, quiz: _3, text: _4!)) @@ -1861,7 +1861,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.KeyboardButtonStyle? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.KeyboardButtonStyle } @@ -1871,7 +1871,7 @@ public extension Api { var _4: String? _4 = parseString(reader) let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 10) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil if _c1 && _c2 && _c3 && _c4 { @@ -1885,7 +1885,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.KeyboardButtonStyle? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.KeyboardButtonStyle } @@ -1895,16 +1895,16 @@ public extension Api { var _4: String? _4 = parseString(reader) var _5: [Api.InlineQueryPeerType]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InlineQueryPeerType.self) } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 10) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.KeyboardButton.keyboardButtonSwitchInline(Cons_keyboardButtonSwitchInline(flags: _1!, style: _2, text: _3!, query: _4!, peerTypes: _5)) } @@ -1916,7 +1916,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.KeyboardButtonStyle? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.KeyboardButtonStyle } @@ -1926,7 +1926,7 @@ public extension Api { var _4: String? _4 = parseString(reader) let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 10) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil if _c1 && _c2 && _c3 && _c4 { @@ -1940,7 +1940,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.KeyboardButtonStyle? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.KeyboardButtonStyle } @@ -1948,7 +1948,7 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = parseString(reader) } var _5: String? @@ -1956,9 +1956,9 @@ public extension Api { var _6: Int32? _6 = reader.readInt32() let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 10) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { @@ -1972,7 +1972,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.KeyboardButtonStyle? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.KeyboardButtonStyle } @@ -1982,7 +1982,7 @@ public extension Api { var _4: Int64? _4 = reader.readInt64() let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 10) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil if _c1 && _c2 && _c3 && _c4 { @@ -1996,7 +1996,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.KeyboardButtonStyle? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.KeyboardButtonStyle } @@ -2006,7 +2006,7 @@ public extension Api { var _4: String? _4 = parseString(reader) let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 10) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil if _c1 && _c2 && _c3 && _c4 { diff --git a/submodules/TelegramApi/Sources/Api15.swift b/submodules/TelegramApi/Sources/Api15.swift index 9e96c0ae9a..6e05447f93 100644 --- a/submodules/TelegramApi/Sources/Api15.swift +++ b/submodules/TelegramApi/Sources/Api15.swift @@ -88,11 +88,11 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int64? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _2 = reader.readInt64() } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 3) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _2 != nil if _c1 && _c2 { return Api.KeyboardButtonStyle.keyboardButtonStyle(Cons_keyboardButtonStyle(flags: _1!, icon: _2)) } @@ -287,7 +287,7 @@ public extension Api { var _4: String? _4 = parseString(reader) var _5: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _5 = parseString(reader) } var _6: String? @@ -302,7 +302,7 @@ public extension Api { let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil let _c8 = _8 != nil @@ -448,34 +448,34 @@ public extension Api { var _2: String? _2 = parseString(reader) var _3: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = parseString(reader) } var _4: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = parseString(reader) } var _5: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = parseString(reader) } var _6: String? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _6 = parseString(reader) } var _7: String? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _7 = parseString(reader) } var _8: String? _8 = parseString(reader) let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 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 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _7 != nil let _c8 = _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.LangPackString.langPackStringPluralized(Cons_langPackStringPluralized(flags: _1!, key: _2!, zeroValue: _3, oneValue: _4, twoValue: _5, fewValue: _6, manyValue: _7, otherValue: _8!)) @@ -862,7 +862,7 @@ public extension Api { _3 = Api.parse(reader, signature: signature) as? Api.GeoPoint } var _4: Api.GeoPointAddress? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.GeoPointAddress } @@ -870,7 +870,7 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.MediaArea.mediaAreaGeoPoint(Cons_mediaAreaGeoPoint(flags: _1!, coordinates: _2!, geo: _3!, address: _4)) } @@ -1053,7 +1053,7 @@ public extension Api { var _6: Double? _6 = reader.readDouble() var _7: Double? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _7 = reader.readDouble() } let _c1 = _1 != nil @@ -1062,7 +1062,7 @@ public extension Api { let _c4 = _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 0) == 0) || _7 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { return Api.MediaAreaCoordinates.mediaAreaCoordinates(Cons_mediaAreaCoordinates(flags: _1!, x: _2!, y: _3!, w: _4!, h: _5!, rotation: _6!, radius: _7)) } @@ -1360,17 +1360,17 @@ public extension Api { var _3: Int32? _3 = reader.readInt32() var _4: Api.Peer? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.Peer } } var _5: Int32? - if Int(_1!) & Int(1 << 29) != 0 { + if Int(_1 ?? 0) & Int(1 << 29) != 0 { _5 = reader.readInt32() } var _6: String? - if Int(_2!) & Int(1 << 12) != 0 { + if Int(_2 ?? 0) & Int(1 << 12) != 0 { _6 = parseString(reader) } var _7: Api.Peer? @@ -1378,33 +1378,33 @@ public extension Api { _7 = Api.parse(reader, signature: signature) as? Api.Peer } var _8: Api.Peer? - if Int(_1!) & Int(1 << 28) != 0 { + if Int(_1 ?? 0) & Int(1 << 28) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.Peer } } var _9: Api.MessageFwdHeader? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _9 = Api.parse(reader, signature: signature) as? Api.MessageFwdHeader } } var _10: Int64? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { _10 = reader.readInt64() } var _11: Int64? - if Int(_2!) & Int(1 << 0) != 0 { + if Int(_2 ?? 0) & Int(1 << 0) != 0 { _11 = reader.readInt64() } var _12: Api.Peer? - if Int(_2!) & Int(1 << 19) != 0 { + if Int(_2 ?? 0) & Int(1 << 19) != 0 { if let signature = reader.readInt32() { _12 = Api.parse(reader, signature: signature) as? Api.Peer } } var _13: Api.MessageReplyHeader? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _13 = Api.parse(reader, signature: signature) as? Api.MessageReplyHeader } @@ -1414,136 +1414,136 @@ public extension Api { var _15: String? _15 = parseString(reader) var _16: Api.MessageMedia? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { if let signature = reader.readInt32() { _16 = Api.parse(reader, signature: signature) as? Api.MessageMedia } } var _17: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { if let signature = reader.readInt32() { _17 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup } } var _18: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { if let _ = reader.readInt32() { _18 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } } var _19: Int32? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { _19 = reader.readInt32() } var _20: Int32? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { _20 = reader.readInt32() } var _21: Api.MessageReplies? - if Int(_1!) & Int(1 << 23) != 0 { + if Int(_1 ?? 0) & Int(1 << 23) != 0 { if let signature = reader.readInt32() { _21 = Api.parse(reader, signature: signature) as? Api.MessageReplies } } var _22: Int32? - if Int(_1!) & Int(1 << 15) != 0 { + if Int(_1 ?? 0) & Int(1 << 15) != 0 { _22 = reader.readInt32() } var _23: String? - if Int(_1!) & Int(1 << 16) != 0 { + if Int(_1 ?? 0) & Int(1 << 16) != 0 { _23 = parseString(reader) } var _24: Int64? - if Int(_1!) & Int(1 << 17) != 0 { + if Int(_1 ?? 0) & Int(1 << 17) != 0 { _24 = reader.readInt64() } var _25: Api.MessageReactions? - if Int(_1!) & Int(1 << 20) != 0 { + if Int(_1 ?? 0) & Int(1 << 20) != 0 { if let signature = reader.readInt32() { _25 = Api.parse(reader, signature: signature) as? Api.MessageReactions } } var _26: [Api.RestrictionReason]? - if Int(_1!) & Int(1 << 22) != 0 { + if Int(_1 ?? 0) & Int(1 << 22) != 0 { if let _ = reader.readInt32() { _26 = Api.parseVector(reader, elementSignature: 0, elementType: Api.RestrictionReason.self) } } var _27: Int32? - if Int(_1!) & Int(1 << 25) != 0 { + if Int(_1 ?? 0) & Int(1 << 25) != 0 { _27 = reader.readInt32() } var _28: Int32? - if Int(_1!) & Int(1 << 30) != 0 { + if Int(_1 ?? 0) & Int(1 << 30) != 0 { _28 = reader.readInt32() } var _29: Int64? - if Int(_2!) & Int(1 << 2) != 0 { + if Int(_2 ?? 0) & Int(1 << 2) != 0 { _29 = reader.readInt64() } var _30: Api.FactCheck? - if Int(_2!) & Int(1 << 3) != 0 { + if Int(_2 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _30 = Api.parse(reader, signature: signature) as? Api.FactCheck } } var _31: Int32? - if Int(_2!) & Int(1 << 5) != 0 { + if Int(_2 ?? 0) & Int(1 << 5) != 0 { _31 = reader.readInt32() } var _32: Int64? - if Int(_2!) & Int(1 << 6) != 0 { + if Int(_2 ?? 0) & Int(1 << 6) != 0 { _32 = reader.readInt64() } var _33: Api.SuggestedPost? - if Int(_2!) & Int(1 << 7) != 0 { + if Int(_2 ?? 0) & Int(1 << 7) != 0 { if let signature = reader.readInt32() { _33 = Api.parse(reader, signature: signature) as? Api.SuggestedPost } } var _34: Int32? - if Int(_2!) & Int(1 << 10) != 0 { + if Int(_2 ?? 0) & Int(1 << 10) != 0 { _34 = reader.readInt32() } var _35: String? - if Int(_2!) & Int(1 << 11) != 0 { + if Int(_2 ?? 0) & Int(1 << 11) != 0 { _35 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 8) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 29) == 0) || _5 != nil - let _c6 = (Int(_2!) & Int(1 << 12) == 0) || _6 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 29) == 0) || _5 != nil + let _c6 = (Int(_2 ?? 0) & Int(1 << 12) == 0) || _6 != nil let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 28) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 2) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 11) == 0) || _10 != nil - let _c11 = (Int(_2!) & Int(1 << 0) == 0) || _11 != nil - let _c12 = (Int(_2!) & Int(1 << 19) == 0) || _12 != nil - let _c13 = (Int(_1!) & Int(1 << 3) == 0) || _13 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 28) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _10 != nil + let _c11 = (Int(_2 ?? 0) & Int(1 << 0) == 0) || _11 != nil + let _c12 = (Int(_2 ?? 0) & Int(1 << 19) == 0) || _12 != nil + let _c13 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _13 != nil let _c14 = _14 != nil let _c15 = _15 != nil - let _c16 = (Int(_1!) & Int(1 << 9) == 0) || _16 != nil - let _c17 = (Int(_1!) & Int(1 << 6) == 0) || _17 != nil - let _c18 = (Int(_1!) & Int(1 << 7) == 0) || _18 != nil - let _c19 = (Int(_1!) & Int(1 << 10) == 0) || _19 != nil - let _c20 = (Int(_1!) & Int(1 << 10) == 0) || _20 != nil - let _c21 = (Int(_1!) & Int(1 << 23) == 0) || _21 != nil - let _c22 = (Int(_1!) & Int(1 << 15) == 0) || _22 != nil - let _c23 = (Int(_1!) & Int(1 << 16) == 0) || _23 != nil - let _c24 = (Int(_1!) & Int(1 << 17) == 0) || _24 != nil - let _c25 = (Int(_1!) & Int(1 << 20) == 0) || _25 != nil - let _c26 = (Int(_1!) & Int(1 << 22) == 0) || _26 != nil - let _c27 = (Int(_1!) & Int(1 << 25) == 0) || _27 != nil - let _c28 = (Int(_1!) & Int(1 << 30) == 0) || _28 != nil - let _c29 = (Int(_2!) & Int(1 << 2) == 0) || _29 != nil - let _c30 = (Int(_2!) & Int(1 << 3) == 0) || _30 != nil - let _c31 = (Int(_2!) & Int(1 << 5) == 0) || _31 != nil - let _c32 = (Int(_2!) & Int(1 << 6) == 0) || _32 != nil - let _c33 = (Int(_2!) & Int(1 << 7) == 0) || _33 != nil - let _c34 = (Int(_2!) & Int(1 << 10) == 0) || _34 != nil - let _c35 = (Int(_2!) & Int(1 << 11) == 0) || _35 != nil + let _c16 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _16 != nil + let _c17 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _17 != nil + let _c18 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _18 != nil + let _c19 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _19 != nil + let _c20 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _20 != nil + let _c21 = (Int(_1 ?? 0) & Int(1 << 23) == 0) || _21 != nil + let _c22 = (Int(_1 ?? 0) & Int(1 << 15) == 0) || _22 != nil + let _c23 = (Int(_1 ?? 0) & Int(1 << 16) == 0) || _23 != nil + let _c24 = (Int(_1 ?? 0) & Int(1 << 17) == 0) || _24 != nil + let _c25 = (Int(_1 ?? 0) & Int(1 << 20) == 0) || _25 != nil + let _c26 = (Int(_1 ?? 0) & Int(1 << 22) == 0) || _26 != nil + let _c27 = (Int(_1 ?? 0) & Int(1 << 25) == 0) || _27 != nil + let _c28 = (Int(_1 ?? 0) & Int(1 << 30) == 0) || _28 != nil + let _c29 = (Int(_2 ?? 0) & Int(1 << 2) == 0) || _29 != nil + let _c30 = (Int(_2 ?? 0) & Int(1 << 3) == 0) || _30 != nil + let _c31 = (Int(_2 ?? 0) & Int(1 << 5) == 0) || _31 != nil + let _c32 = (Int(_2 ?? 0) & Int(1 << 6) == 0) || _32 != nil + let _c33 = (Int(_2 ?? 0) & Int(1 << 7) == 0) || _33 != nil + let _c34 = (Int(_2 ?? 0) & Int(1 << 10) == 0) || _34 != nil + let _c35 = (Int(_2 ?? 0) & Int(1 << 11) == 0) || _35 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 && _c20 && _c21 && _c22 && _c23 && _c24 && _c25 && _c26 && _c27 && _c28 && _c29 && _c30 && _c31 && _c32 && _c33 && _c34 && _c35 { return Api.Message.message(Cons_message(flags: _1!, flags2: _2!, id: _3!, fromId: _4, fromBoostsApplied: _5, fromRank: _6, peerId: _7!, savedPeerId: _8, fwdFrom: _9, viaBotId: _10, viaBusinessBotId: _11, guestchatViaFrom: _12, replyTo: _13, date: _14!, message: _15!, media: _16, replyMarkup: _17, entities: _18, views: _19, forwards: _20, replies: _21, editDate: _22, postAuthor: _23, groupedId: _24, reactions: _25, restrictionReason: _26, ttlPeriod: _27, quickReplyShortcutId: _28, effect: _29, factcheck: _30, reportDeliveryUntilDate: _31, paidMessageStars: _32, suggestedPost: _33, scheduleRepeatPeriod: _34, summaryFromLanguage: _35)) } @@ -1557,14 +1557,14 @@ public extension Api { var _2: Int32? _2 = reader.readInt32() var _3: Api.Peer? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.Peer } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.Message.messageEmpty(Cons_messageEmpty(flags: _1!, id: _2!, peerId: _3)) } @@ -1578,7 +1578,7 @@ public extension Api { var _2: Int32? _2 = reader.readInt32() var _3: Api.Peer? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.Peer } @@ -1588,13 +1588,13 @@ public extension Api { _4 = Api.parse(reader, signature: signature) as? Api.Peer } var _5: Api.Peer? - if Int(_1!) & Int(1 << 28) != 0 { + if Int(_1 ?? 0) & Int(1 << 28) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.Peer } } var _6: Api.MessageReplyHeader? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.MessageReplyHeader } @@ -1606,25 +1606,25 @@ public extension Api { _8 = Api.parse(reader, signature: signature) as? Api.MessageAction } var _9: Api.MessageReactions? - if Int(_1!) & Int(1 << 20) != 0 { + if Int(_1 ?? 0) & Int(1 << 20) != 0 { if let signature = reader.readInt32() { _9 = Api.parse(reader, signature: signature) as? Api.MessageReactions } } var _10: Int32? - if Int(_1!) & Int(1 << 25) != 0 { + if Int(_1 ?? 0) & Int(1 << 25) != 0 { _10 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 8) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 28) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 28) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _6 != nil let _c7 = _7 != nil let _c8 = _8 != nil - let _c9 = (Int(_1!) & Int(1 << 20) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 25) == 0) || _10 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 20) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 25) == 0) || _10 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 { return Api.Message.messageService(Cons_messageService(flags: _1!, id: _2!, fromId: _3, peerId: _4!, savedPeerId: _5, replyTo: _6, date: _7!, action: _8!, reactions: _9, ttlPeriod: _10)) } @@ -3304,18 +3304,18 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = parseString(reader) } var _3: Api.BotApp? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.BotApp } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.MessageAction.messageActionBotAllowed(Cons_messageActionBotAllowed(flags: _1!, domain: _2, app: _3)) } @@ -3457,19 +3457,19 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _3 = reader.readInt32() } var _4: [Api.Peer]? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let _ = reader.readInt32() { _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Peer.self) } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.MessageAction.messageActionConferenceCall(Cons_messageActionConferenceCall(flags: _1!, callId: _2!, duration: _3, otherParticipants: _4)) } @@ -3533,7 +3533,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.Peer? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.Peer } @@ -3543,36 +3543,36 @@ public extension Api { var _4: String? _4 = parseString(reader) var _5: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = parseString(reader) } var _6: Int64? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _6 = reader.readInt64() } var _7: String? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _7 = parseString(reader) } var _8: Int64? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _8 = reader.readInt64() } var _9: Api.TextWithEntities? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let signature = reader.readInt32() { _9 = Api.parse(reader, signature: signature) as? Api.TextWithEntities } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 3) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 4) == 0) || _9 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _9 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { return Api.MessageAction.messageActionGiftCode(Cons_messageActionGiftCode(flags: _1!, boostPeer: _2, days: _3!, slug: _4!, currency: _5, amount: _6, cryptoCurrency: _7, cryptoAmount: _8, message: _9)) } @@ -3590,15 +3590,15 @@ public extension Api { var _4: Int32? _4 = reader.readInt32() var _5: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _5 = parseString(reader) } var _6: Int64? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _6 = reader.readInt64() } var _7: Api.TextWithEntities? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.TextWithEntities } @@ -3607,9 +3607,9 @@ public extension Api { let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { return Api.MessageAction.messageActionGiftPremium(Cons_messageActionGiftPremium(flags: _1!, currency: _2!, amount: _3!, days: _4!, cryptoCurrency: _5, cryptoAmount: _6, message: _7)) } @@ -3627,24 +3627,24 @@ public extension Api { var _4: Int64? _4 = reader.readInt64() var _5: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _5 = parseString(reader) } var _6: Int64? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _6 = reader.readInt64() } var _7: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _7 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { return Api.MessageAction.messageActionGiftStars(Cons_messageActionGiftStars(flags: _1!, currency: _2!, amount: _3!, stars: _4!, cryptoCurrency: _5, cryptoAmount: _6, transactionId: _7)) } @@ -3664,7 +3664,7 @@ public extension Api { var _5: Int64? _5 = reader.readInt64() var _6: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _6 = parseString(reader) } let _c1 = _1 != nil @@ -3672,7 +3672,7 @@ public extension Api { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.MessageAction.messageActionGiftTon(Cons_messageActionGiftTon(flags: _1!, currency: _2!, amount: _3!, cryptoCurrency: _4!, cryptoAmount: _5!, transactionId: _6)) } @@ -3684,11 +3684,11 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int64? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = reader.readInt64() } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil if _c1 && _c2 { return Api.MessageAction.messageActionGiveawayLaunch(Cons_messageActionGiveawayLaunch(flags: _1!, stars: _2)) } @@ -3721,12 +3721,12 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.InputGroupCall } var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.MessageAction.messageActionGroupCall(Cons_messageActionGroupCall(flags: _1!, call: _2!, duration: _3)) } @@ -3872,7 +3872,7 @@ public extension Api { var _4: Int64? _4 = reader.readInt64() var _5: Buffer? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _5 = parseBytes(reader) } var _6: Api.PaymentCharge? @@ -3883,7 +3883,7 @@ public extension Api { let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil let _c6 = _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.MessageAction.messageActionPaymentRefunded(Cons_messageActionPaymentRefunded(flags: _1!, peer: _2!, currency: _3!, totalAmount: _4!, payload: _5, charge: _6!)) @@ -3900,18 +3900,18 @@ public extension Api { var _3: Int64? _3 = reader.readInt64() var _4: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = parseString(reader) } var _5: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _5 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 4) == 0) || _5 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.MessageAction.messageActionPaymentSent(Cons_messageActionPaymentSent(flags: _1!, currency: _2!, totalAmount: _3!, invoiceSlug: _4, subscriptionUntilDate: _5)) } @@ -3929,13 +3929,13 @@ public extension Api { var _4: Buffer? _4 = parseBytes(reader) var _5: Api.PaymentRequestedInfo? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.PaymentRequestedInfo } } var _6: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _6 = parseString(reader) } var _7: Api.PaymentCharge? @@ -3943,17 +3943,17 @@ public extension Api { _7 = Api.parse(reader, signature: signature) as? Api.PaymentCharge } var _8: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _8 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 4) == 0) || _8 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.MessageAction.messageActionPaymentSentMe(Cons_messageActionPaymentSentMe(flags: _1!, currency: _2!, totalAmount: _3!, payload: _4!, info: _5, shippingOptionId: _6, charge: _7!, subscriptionUntilDate: _8)) } @@ -3967,19 +3967,19 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: Api.PhoneCallDiscardReason? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.PhoneCallDiscardReason } } var _4: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.MessageAction.messageActionPhoneCall(Cons_messageActionPhoneCall(flags: _1!, callId: _2!, reason: _3, duration: _4)) } @@ -4142,12 +4142,12 @@ public extension Api { var _2: Int32? _2 = reader.readInt32() var _3: Int64? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt64() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.MessageAction.messageActionSetMessagesTTL(Cons_messageActionSetMessagesTTL(flags: _1!, period: _2!, autoSettingFrom: _3)) } @@ -4163,70 +4163,70 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.StarGift } var _3: Api.TextWithEntities? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.TextWithEntities } } var _4: Int64? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _4 = reader.readInt64() } var _5: Int32? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _5 = reader.readInt32() } var _6: Int64? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { _6 = reader.readInt64() } var _7: Api.Peer? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.Peer } } var _8: Api.Peer? - if Int(_1!) & Int(1 << 12) != 0 { + if Int(_1 ?? 0) & Int(1 << 12) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.Peer } } var _9: Int64? - if Int(_1!) & Int(1 << 12) != 0 { + if Int(_1 ?? 0) & Int(1 << 12) != 0 { _9 = reader.readInt64() } var _10: String? - if Int(_1!) & Int(1 << 14) != 0 { + if Int(_1 ?? 0) & Int(1 << 14) != 0 { _10 = parseString(reader) } var _11: Int32? - if Int(_1!) & Int(1 << 15) != 0 { + if Int(_1 ?? 0) & Int(1 << 15) != 0 { _11 = reader.readInt32() } var _12: Api.Peer? - if Int(_1!) & Int(1 << 18) != 0 { + if Int(_1 ?? 0) & Int(1 << 18) != 0 { if let signature = reader.readInt32() { _12 = Api.parse(reader, signature: signature) as? Api.Peer } } var _13: Int32? - if Int(_1!) & Int(1 << 19) != 0 { + if Int(_1 ?? 0) & Int(1 << 19) != 0 { _13 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 4) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 5) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 8) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 11) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 12) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 12) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 14) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 15) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 18) == 0) || _12 != nil - let _c13 = (Int(_1!) & Int(1 << 19) == 0) || _13 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 12) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 12) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 14) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 15) == 0) || _11 != nil + let _c12 = (Int(_1 ?? 0) & Int(1 << 18) == 0) || _12 != nil + let _c13 = (Int(_1 ?? 0) & Int(1 << 19) == 0) || _13 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 { return Api.MessageAction.messageActionStarGift(Cons_messageActionStarGift(flags: _1!, gift: _2!, message: _3, convertStars: _4, upgradeMsgId: _5, upgradeStars: _6, fromId: _7, peer: _8, savedId: _9, prepaidUpgradeHash: _10, giftMsgId: _11, toId: _12, giftNum: _13)) } @@ -4287,63 +4287,63 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.StarGift } var _3: Int32? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _3 = reader.readInt32() } var _4: Int64? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _4 = reader.readInt64() } var _5: Api.Peer? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.Peer } } var _6: Api.Peer? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.Peer } } var _7: Int64? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { _7 = reader.readInt64() } var _8: Api.StarsAmount? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.StarsAmount } } var _9: Int32? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { _9 = reader.readInt32() } var _10: Int32? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { _10 = reader.readInt32() } var _11: Int64? - if Int(_1!) & Int(1 << 12) != 0 { + if Int(_1 ?? 0) & Int(1 << 12) != 0 { _11 = reader.readInt64() } var _12: Int32? - if Int(_1!) & Int(1 << 15) != 0 { + if Int(_1 ?? 0) & Int(1 << 15) != 0 { _12 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 3) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 4) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 6) == 0) || _5 != nil - 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 - let _c9 = (Int(_1!) & Int(1 << 9) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 10) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 12) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 15) == 0) || _12 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 12) == 0) || _11 != nil + let _c12 = (Int(_1 ?? 0) & Int(1 << 15) == 0) || _12 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 { return Api.MessageAction.messageActionStarGiftUnique(Cons_messageActionStarGiftUnique(flags: _1!, gift: _2!, canExportAt: _3, transferStars: _4, fromId: _5, peer: _6, savedId: _7, resaleAmount: _8, canTransferAt: _9, canResellAt: _10, dropOriginalDetailsStars: _11, canCraftAt: _12)) } @@ -4381,23 +4381,23 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _2 = parseString(reader) } var _3: Int32? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _3 = reader.readInt32() } var _4: Api.StarsAmount? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.StarsAmount } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 2) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 3) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 4) == 0) || _4 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.MessageAction.messageActionSuggestedPostApproval(Cons_messageActionSuggestedPostApproval(flags: _1!, rejectComment: _2, scheduleDate: _3, price: _4)) } @@ -4468,13 +4468,13 @@ public extension Api { var _3: Int32? _3 = reader.readInt32() var _4: Int64? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = reader.readInt64() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.MessageAction.messageActionTopicCreate(Cons_messageActionTopicCreate(flags: _1!, title: _2!, iconColor: _3!, iconEmojiId: _4)) } @@ -4486,30 +4486,30 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = parseString(reader) } var _3: Int64? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _3 = reader.readInt64() } var _4: Api.Bool? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.Bool } } var _5: Api.Bool? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.Bool } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.MessageAction.messageActionTopicEdit(Cons_messageActionTopicEdit(flags: _1!, title: _2, iconEmojiId: _3, closed: _4, hidden: _5)) } diff --git a/submodules/TelegramApi/Sources/Api16.swift b/submodules/TelegramApi/Sources/Api16.swift index c774f8f008..bf75b3d074 100644 --- a/submodules/TelegramApi/Sources/Api16.swift +++ b/submodules/TelegramApi/Sources/Api16.swift @@ -1030,28 +1030,28 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = reader.readInt32() } var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } var _4: Api.PhotoSize? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.PhotoSize } } var _5: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = reader.readInt32() } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.MessageExtendedMedia.messageExtendedMediaPreview(Cons_messageExtendedMediaPreview(flags: _1!, w: _2, h: _3, thumb: _4, videoDuration: _5)) } @@ -1149,65 +1149,65 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.Peer? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.Peer } } var _3: String? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _3 = parseString(reader) } var _4: Int32? _4 = reader.readInt32() var _5: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = reader.readInt32() } var _6: String? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _6 = parseString(reader) } var _7: Api.Peer? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.Peer } } var _8: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _8 = reader.readInt32() } var _9: Api.Peer? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { if let signature = reader.readInt32() { _9 = Api.parse(reader, signature: signature) as? Api.Peer } } var _10: String? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { _10 = parseString(reader) } var _11: Int32? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { _11 = reader.readInt32() } var _12: String? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { _12 = parseString(reader) } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 5) == 0) || _3 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 4) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 8) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 9) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 10) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 6) == 0) || _12 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _11 != nil + let _c12 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _12 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 { return Api.MessageFwdHeader.messageFwdHeader(Cons_messageFwdHeader(flags: _1!, fromId: _2, fromName: _3, date: _4!, channelPost: _5, postAuthor: _6, savedFromPeer: _7, savedFromMsgId: _8, savedFromId: _9, savedFromName: _10, savedDate: _11, psaType: _12)) } @@ -1837,7 +1837,7 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: Api.messages.EmojiGameOutcome? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.messages.EmojiGameOutcome } @@ -1845,7 +1845,7 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.MessageMedia.messageMediaDice(Cons_messageMediaDice(flags: _1!, value: _2!, emoticon: _3!, gameOutcome: _4)) } @@ -1857,37 +1857,37 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.Document? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.Document } } var _3: [Api.Document]? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Document.self) } } var _4: Api.Photo? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.Photo } } var _5: Int32? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { _5 = reader.readInt32() } var _6: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _6 = reader.readInt32() } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 5) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 9) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 10) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.MessageMedia.messageMediaDocument(Cons_messageMediaDocument(flags: _1!, document: _2, altDocuments: _3, videoCover: _4, videoTimestamp: _5, ttlSeconds: _6)) } @@ -1932,20 +1932,20 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.GeoPoint } var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } var _4: Int32? _4 = reader.readInt32() var _5: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _5 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.MessageMedia.messageMediaGeoLive(Cons_messageMediaGeoLive(flags: _1!, geo: _2!, heading: _3, period: _4!, proximityNotificationRadius: _5)) } @@ -1961,34 +1961,34 @@ public extension Api { _2 = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self) } var _3: [String]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self) } } var _4: String? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _4 = parseString(reader) } var _5: Int32? _5 = reader.readInt32() var _6: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _6 = reader.readInt32() } var _7: Int64? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _7 = reader.readInt64() } var _8: Int32? _8 = reader.readInt32() let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 4) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 5) == 0) || _7 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _7 != nil let _c8 = _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.MessageMedia.messageMediaGiveaway(Cons_messageMediaGiveaway(flags: _1!, channels: _2!, countriesIso2: _3, prizeDescription: _4, quantity: _5!, months: _6, stars: _7, untilDate: _8!)) @@ -2003,7 +2003,7 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: Int32? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _3 = reader.readInt32() } var _4: Int32? @@ -2017,29 +2017,29 @@ public extension Api { _7 = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self) } var _8: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _8 = reader.readInt32() } var _9: Int64? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _9 = reader.readInt64() } var _10: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _10 = parseString(reader) } var _11: Int32? _11 = reader.readInt32() let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 3) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 4) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 5) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 1) == 0) || _10 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _10 != nil let _c11 = _11 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { return Api.MessageMedia.messageMediaGiveawayResults(Cons_messageMediaGiveawayResults(flags: _1!, channelId: _2!, additionalPeersCount: _3, launchMsgId: _4!, winnersCount: _5!, unclaimedCount: _6!, winners: _7!, months: _8, stars: _9, prizeDescription: _10, untilDate: _11!)) @@ -2056,13 +2056,13 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: Api.WebDocument? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.WebDocument } } var _5: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = reader.readInt32() } var _6: String? @@ -2072,7 +2072,7 @@ public extension Api { var _8: String? _8 = parseString(reader) var _9: Api.MessageExtendedMedia? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let signature = reader.readInt32() { _9 = Api.parse(reader, signature: signature) as? Api.MessageExtendedMedia } @@ -2080,12 +2080,12 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil let _c8 = _8 != nil - let _c9 = (Int(_1!) & Int(1 << 4) == 0) || _9 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _9 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { return Api.MessageMedia.messageMediaInvoice(Cons_messageMediaInvoice(flags: _1!, title: _2!, description: _3!, photo: _4, receiptMsgId: _5, currency: _6!, totalAmount: _7!, startParam: _8!, extendedMedia: _9)) } @@ -2113,25 +2113,25 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.Photo? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.Photo } } var _3: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _3 = reader.readInt32() } var _4: Api.Document? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.Document } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 4) == 0) || _4 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.MessageMedia.messageMediaPhoto(Cons_messageMediaPhoto(flags: _1!, photo: _2, ttlSeconds: _3, video: _4)) } @@ -2151,7 +2151,7 @@ public extension Api { _3 = Api.parse(reader, signature: signature) as? Api.PollResults } var _4: Api.MessageMedia? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.MessageMedia } @@ -2159,7 +2159,7 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.MessageMedia.messageMediaPoll(Cons_messageMediaPoll(flags: _1!, poll: _2!, results: _3!, attachedMedia: _4)) } @@ -2177,7 +2177,7 @@ public extension Api { var _3: Int32? _3 = reader.readInt32() var _4: Api.StoryItem? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.StoryItem } @@ -2185,7 +2185,7 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.MessageMedia.messageMediaStory(Cons_messageMediaStory(flags: _1!, peer: _2!, id: _3!, story: _4)) } @@ -2201,14 +2201,14 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.TodoList } var _3: [Api.TodoCompletion]? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.TodoCompletion.self) } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.MessageMedia.messageMediaToDo(Cons_messageMediaToDo(flags: _1!, todo: _2!, completions: _3)) } diff --git a/submodules/TelegramApi/Sources/Api17.swift b/submodules/TelegramApi/Sources/Api17.swift index cde9dbb53c..f371ca3819 100644 --- a/submodules/TelegramApi/Sources/Api17.swift +++ b/submodules/TelegramApi/Sources/Api17.swift @@ -322,21 +322,21 @@ public extension Api { _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ReactionCount.self) } var _3: [Api.MessagePeerReaction]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessagePeerReaction.self) } } var _4: [Api.MessageReactor]? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let _ = reader.readInt32() { _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageReactor.self) } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 4) == 0) || _4 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.MessageReactions.messageReactions(Cons_messageReactions(flags: _1!, results: _2!, recentReactions: _3, topReactors: _4)) } @@ -389,7 +389,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.Peer? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.Peer } @@ -397,7 +397,7 @@ public extension Api { var _3: Int32? _3 = reader.readInt32() let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 3) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _2 != nil let _c3 = _3 != nil if _c1 && _c2 && _c3 { return Api.MessageReactor.messageReactor(Cons_messageReactor(flags: _1!, peerId: _2, count: _3!)) @@ -477,30 +477,30 @@ public extension Api { var _3: Int32? _3 = reader.readInt32() var _4: [Api.Peer]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Peer.self) } } var _5: Int64? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _5 = reader.readInt64() } var _6: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _6 = reader.readInt32() } var _7: Int32? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _7 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { return Api.MessageReplies.messageReplies(Cons_messageReplies(flags: _1!, replies: _2!, repliesPts: _3!, recentRepliers: _4, channelId: _5, maxId: _6, readMaxId: _7)) } @@ -620,64 +620,64 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _2 = reader.readInt32() } var _3: Api.Peer? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.Peer } } var _4: Api.MessageFwdHeader? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.MessageFwdHeader } } var _5: Api.MessageMedia? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.MessageMedia } } var _6: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _6 = reader.readInt32() } var _7: String? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { _7 = parseString(reader) } var _8: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { if let _ = reader.readInt32() { _8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } } var _9: Int32? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { _9 = reader.readInt32() } var _10: Int32? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { _10 = reader.readInt32() } var _11: Buffer? - if Int(_1!) & Int(1 << 12) != 0 { + if Int(_1 ?? 0) & Int(1 << 12) != 0 { _11 = parseBytes(reader) } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 4) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 5) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 8) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 6) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 7) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 10) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 11) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 12) == 0) || _11 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 12) == 0) || _11 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { return Api.MessageReplyHeader.messageReplyHeader(Cons_messageReplyHeader(flags: _1!, replyToMsgId: _2, replyToPeerId: _3, replyFrom: _4, replyMedia: _5, replyToTopId: _6, quoteText: _7, quoteEntities: _8, quoteOffset: _9, todoItemId: _10, pollOption: _11)) } @@ -803,23 +803,23 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = reader.readInt32() } var _3: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _3 = reader.readInt32() } var _4: Api.MessageReplies? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.MessageReplies } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.MessageViews.messageViews(Cons_messageViews(flags: _1!, views: _2, forwards: _3, replies: _4)) } @@ -1166,7 +1166,7 @@ public extension Api { var _2: Int32? _2 = reader.readInt32() var _3: Api.Peer? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.Peer } @@ -1176,15 +1176,15 @@ public extension Api { var _5: Int32? _5 = reader.readInt32() var _6: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _6 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.MyBoost.myBoost(Cons_myBoost(flags: _1!, slot: _2!, peer: _3, date: _4!, expires: _5!, cooldownUntilDate: _6)) } diff --git a/submodules/TelegramApi/Sources/Api18.swift b/submodules/TelegramApi/Sources/Api18.swift index 4cdba8c6d6..c4b43cfef0 100644 --- a/submodules/TelegramApi/Sources/Api18.swift +++ b/submodules/TelegramApi/Sources/Api18.swift @@ -393,7 +393,7 @@ public extension Api { _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Document.self) } var _6: Int32? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _6 = reader.readInt32() } let _c1 = _1 != nil @@ -401,7 +401,7 @@ public extension Api { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.Page.page(Cons_page(flags: _1!, url: _2!, blocks: _3!, photos: _4!, documents: _5!, views: _6)) } @@ -1207,23 +1207,23 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _2 = parseString(reader) } var _3: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _3 = parseString(reader) } var _4: Int64? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _4 = reader.readInt64() } var _5: Int32? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _5 = reader.readInt32() } var _6: Int32? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _6 = reader.readInt32() } var _7: Api.PageCaption? @@ -1231,11 +1231,11 @@ public extension Api { _7 = Api.parse(reader, signature: signature) as? Api.PageCaption } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 4) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 5) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 5) == 0) || _6 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _6 != nil let _c7 = _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { return Api.PageBlock.pageBlockEmbed(Cons_pageBlockEmbed(flags: _1!, url: _2, html: _3, posterPhotoId: _4, w: _5, h: _6, caption: _7!)) @@ -1392,18 +1392,18 @@ public extension Api { _3 = Api.parse(reader, signature: signature) as? Api.PageCaption } var _4: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = parseString(reader) } var _5: Int64? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _5 = reader.readInt64() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.PageBlock.pageBlockPhoto(Cons_pageBlockPhoto(flags: _1!, photoId: _2!, caption: _3!, url: _4, webpageId: _5)) } diff --git a/submodules/TelegramApi/Sources/Api19.swift b/submodules/TelegramApi/Sources/Api19.swift index dad55093d8..586573d025 100644 --- a/submodules/TelegramApi/Sources/Api19.swift +++ b/submodules/TelegramApi/Sources/Api19.swift @@ -296,33 +296,33 @@ public extension Api { var _3: Int64? _3 = reader.readInt64() var _4: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = parseString(reader) } var _5: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _5 = parseString(reader) } var _6: Int64? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _6 = reader.readInt64() } var _7: String? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _7 = parseString(reader) } var _8: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _8 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 4) == 0) || _8 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.PageRelatedArticle.pageRelatedArticle(Cons_pageRelatedArticle(flags: _1!, url: _2!, webpageId: _3!, title: _4, description: _5, photoId: _6, author: _7, publishedDate: _8)) } @@ -382,23 +382,23 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.RichText? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.RichText } } var _3: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _3 = reader.readInt32() } var _4: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _4 = reader.readInt32() } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 7) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.PageTableCell.pageTableCell(Cons_pageTableCell(flags: _1!, text: _2, colspan: _3, rowspan: _4)) } @@ -586,19 +586,19 @@ public extension Api { var _4: Int32? _4 = reader.readInt32() var _5: Int64? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _5 = reader.readInt64() } var _6: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _6 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.Passkey.passkey(Cons_passkey(flags: _1!, id: _2!, name: _3!, date: _4!, softwareEmojiId: _5, lastUsageDate: _6)) } @@ -836,28 +836,28 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = parseString(reader) } var _3: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _3 = parseString(reader) } var _4: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _4 = parseString(reader) } var _5: Api.PostAddress? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.PostAddress } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.PaymentRequestedInfo.paymentRequestedInfo(Cons_paymentRequestedInfo(flags: _1!, name: _2, phone: _3, email: _4, shippingAddress: _5)) } @@ -1196,16 +1196,16 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = reader.readInt32() } var _3: Int64? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _3 = reader.readInt64() } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.PeerColor.peerColor(Cons_peerColor(flags: _1!, color: _2, backgroundEmojiId: _3)) } @@ -1229,11 +1229,11 @@ public extension Api { _6 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) } var _7: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _7 = reader.readInt32() } var _8: [Int32]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _8 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) } @@ -1244,8 +1244,8 @@ public extension Api { let _c4 = _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 0) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 1) == 0) || _8 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.PeerColor.peerColorCollectible(Cons_peerColorCollectible(flags: _1!, collectibleId: _2!, giftEmojiId: _3!, backgroundEmojiId: _4!, accentColor: _5!, colors: _6!, darkAccentColor: _7, darkColors: _8)) } @@ -1432,81 +1432,81 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.Bool? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.Bool } } var _3: Api.Bool? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.Bool } } var _4: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _4 = reader.readInt32() } var _5: Api.NotificationSound? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.NotificationSound } } var _6: Api.NotificationSound? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.NotificationSound } } var _7: Api.NotificationSound? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.NotificationSound } } var _8: Api.Bool? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.Bool } } var _9: Api.Bool? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { if let signature = reader.readInt32() { _9 = Api.parse(reader, signature: signature) as? Api.Bool } } var _10: Api.NotificationSound? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { if let signature = reader.readInt32() { _10 = Api.parse(reader, signature: signature) as? Api.NotificationSound } } var _11: Api.NotificationSound? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { if let signature = reader.readInt32() { _11 = Api.parse(reader, signature: signature) as? Api.NotificationSound } } var _12: Api.NotificationSound? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _12 = Api.parse(reader, signature: signature) as? Api.NotificationSound } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 4) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 5) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 6) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 7) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 8) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 9) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 10) == 0) || _12 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _11 != nil + let _c12 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _12 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 { return Api.PeerNotifySettings.peerNotifySettings(Cons_peerNotifySettings(flags: _1!, showPreviews: _2, silent: _3, muteUntil: _4, iosSound: _5, androidSound: _6, otherSound: _7, storiesMuted: _8, storiesHideSender: _9, storiesIosSound: _10, storiesAndroidSound: _11, storiesOtherSound: _12)) } @@ -1601,56 +1601,56 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { _2 = reader.readInt32() } var _3: String? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { _3 = parseString(reader) } var _4: Int32? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { _4 = reader.readInt32() } var _5: Int64? - if Int(_1!) & Int(1 << 13) != 0 { + if Int(_1 ?? 0) & Int(1 << 13) != 0 { _5 = reader.readInt64() } var _6: String? - if Int(_1!) & Int(1 << 13) != 0 { + if Int(_1 ?? 0) & Int(1 << 13) != 0 { _6 = parseString(reader) } var _7: Int64? - if Int(_1!) & Int(1 << 14) != 0 { + if Int(_1 ?? 0) & Int(1 << 14) != 0 { _7 = reader.readInt64() } var _8: String? - if Int(_1!) & Int(1 << 15) != 0 { + if Int(_1 ?? 0) & Int(1 << 15) != 0 { _8 = parseString(reader) } var _9: String? - if Int(_1!) & Int(1 << 16) != 0 { + if Int(_1 ?? 0) & Int(1 << 16) != 0 { _9 = parseString(reader) } var _10: Int32? - if Int(_1!) & Int(1 << 17) != 0 { + if Int(_1 ?? 0) & Int(1 << 17) != 0 { _10 = reader.readInt32() } var _11: Int32? - if Int(_1!) & Int(1 << 18) != 0 { + if Int(_1 ?? 0) & Int(1 << 18) != 0 { _11 = reader.readInt32() } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 6) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 9) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 9) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 13) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 13) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 14) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 15) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 16) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 17) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 18) == 0) || _11 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 13) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 13) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 14) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 15) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 16) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 17) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 18) == 0) || _11 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { return Api.PeerSettings.peerSettings(Cons_peerSettings(flags: _1!, geoDistance: _2, requestChatTitle: _3, requestChatDate: _4, businessBotId: _5, businessBotManageUrl: _6, chargePaidMessageStars: _7, registrationMonth: _8, phoneCountry: _9, nameChangeDate: _10, photoChangeDate: _11)) } @@ -1714,7 +1714,7 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.Peer } var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } var _4: [Api.StoryItem]? @@ -1723,7 +1723,7 @@ public extension Api { } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil let _c4 = _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.PeerStories.peerStories(Cons_peerStories(flags: _1!, peer: _2!, maxReadId: _3, stories: _4!)) @@ -2066,7 +2066,7 @@ public extension Api { var _11: Int32? _11 = reader.readInt32() var _12: Api.DataJSON? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { if let signature = reader.readInt32() { _12 = Api.parse(reader, signature: signature) as? Api.DataJSON } @@ -2082,7 +2082,7 @@ public extension Api { let _c9 = _9 != nil let _c10 = _10 != nil let _c11 = _11 != nil - let _c12 = (Int(_1!) & Int(1 << 7) == 0) || _12 != nil + let _c12 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _12 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 { return Api.PhoneCall.phoneCall(Cons_phoneCall(flags: _1!, id: _2!, accessHash: _3!, date: _4!, adminId: _5!, participantId: _6!, gAOrB: _7!, keyFingerprint: _8!, protocol: _9!, connections: _10!, startDate: _11!, customParameters: _12)) } @@ -2130,19 +2130,19 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: Api.PhoneCallDiscardReason? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.PhoneCallDiscardReason } } var _4: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.PhoneCall.phoneCallDiscarded(Cons_phoneCallDiscarded(flags: _1!, id: _2!, reason: _3, duration: _4)) } @@ -2213,7 +2213,7 @@ public extension Api { _7 = Api.parse(reader, signature: signature) as? Api.PhoneCallProtocol } var _8: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _8 = reader.readInt32() } let _c1 = _1 != nil @@ -2223,7 +2223,7 @@ public extension Api { let _c5 = _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 0) == 0) || _8 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.PhoneCall.phoneCallWaiting(Cons_phoneCallWaiting(flags: _1!, id: _2!, accessHash: _3!, date: _4!, adminId: _5!, participantId: _6!, protocol: _7!, receiveDate: _8)) } diff --git a/submodules/TelegramApi/Sources/Api2.swift b/submodules/TelegramApi/Sources/Api2.swift index 2465a4d5af..d6f92cf706 100644 --- a/submodules/TelegramApi/Sources/Api2.swift +++ b/submodules/TelegramApi/Sources/Api2.swift @@ -81,7 +81,7 @@ public extension Api { _7 = Api.parse(reader, signature: signature) as? Api.Photo } var _8: Api.Document? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.Document } @@ -95,7 +95,7 @@ public extension Api { let _c5 = _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 0) == 0) || _8 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _8 != nil let _c9 = _9 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { return Api.BotApp.botApp(Cons_botApp(flags: _1!, id: _2!, accessHash: _3!, shortName: _4!, title: _5!, description: _6!, photo: _7!, document: _8, hash: _9!)) @@ -169,31 +169,31 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Buffer? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = parseBytes(reader) } var _3: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _3 = reader.readInt32() } var _4: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _4 = reader.readInt32() } var _5: Int32? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _5 = reader.readInt32() } var _6: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _6 = reader.readInt32() } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 4) == 0) || _6 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.BotAppSettings.botAppSettings(Cons_botAppSettings(flags: _1!, placeholderPath: _2, backgroundColor: _3, backgroundDarkColor: _4, headerColor: _5, headerDarkColor: _6)) } @@ -263,7 +263,7 @@ public extension Api { var _5: Int32? _5 = reader.readInt32() var _6: Api.BusinessBotRights? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.BusinessBotRights } @@ -273,7 +273,7 @@ public extension Api { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.BotBusinessConnection.botBusinessConnection(Cons_botBusinessConnection(flags: _1!, connectionId: _2!, userId: _3!, dcId: _4!, date: _5!, rights: _6)) } @@ -577,63 +577,63 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int64? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = reader.readInt64() } var _3: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _3 = parseString(reader) } var _4: Api.Photo? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.Photo } } var _5: Api.Document? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.Document } } var _6: [Api.BotCommand]? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let _ = reader.readInt32() { _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.BotCommand.self) } } var _7: Api.BotMenuButton? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.BotMenuButton } } var _8: String? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { _8 = parseString(reader) } var _9: Api.BotAppSettings? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { if let signature = reader.readInt32() { _9 = Api.parse(reader, signature: signature) as? Api.BotAppSettings } } var _10: Api.BotVerifierSettings? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { if let signature = reader.readInt32() { _10 = Api.parse(reader, signature: signature) as? Api.BotVerifierSettings } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 4) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 5) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 7) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 8) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 9) == 0) || _10 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _10 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 { return Api.BotInfo.botInfo(Cons_botInfo(flags: _1!, userId: _2, description: _3, descriptionPhoto: _4, descriptionDocument: _5, commands: _6, menuButton: _7, privacyPolicyUrl: _8, appSettings: _9, verifierSettings: _10)) } @@ -927,21 +927,21 @@ public extension Api { var _2: String? _2 = parseString(reader) var _3: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } } var _4: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.BotInlineMessage.botInlineMessageMediaAuto(Cons_botInlineMessageMediaAuto(flags: _1!, message: _2!, entities: _3, replyMarkup: _4)) } @@ -961,7 +961,7 @@ public extension Api { var _5: String? _5 = parseString(reader) var _6: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup } @@ -971,7 +971,7 @@ public extension Api { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.BotInlineMessage.botInlineMessageMediaContact(Cons_botInlineMessageMediaContact(flags: _1!, phoneNumber: _2!, firstName: _3!, lastName: _4!, vcard: _5!, replyMarkup: _6)) } @@ -987,29 +987,29 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.GeoPoint } var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } var _4: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = reader.readInt32() } var _5: Int32? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _5 = reader.readInt32() } var _6: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.BotInlineMessage.botInlineMessageMediaGeo(Cons_botInlineMessageMediaGeo(flags: _1!, geo: _2!, heading: _3, period: _4, proximityNotificationRadius: _5, replyMarkup: _6)) } @@ -1025,7 +1025,7 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: Api.WebDocument? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.WebDocument } @@ -1035,7 +1035,7 @@ public extension Api { var _6: Int64? _6 = reader.readInt64() var _7: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup } @@ -1043,10 +1043,10 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 2) == 0) || _7 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { return Api.BotInlineMessage.botInlineMessageMediaInvoice(Cons_botInlineMessageMediaInvoice(flags: _1!, title: _2!, description: _3!, photo: _4, currency: _5!, totalAmount: _6!, replyMarkup: _7)) } @@ -1072,7 +1072,7 @@ public extension Api { var _7: String? _7 = parseString(reader) var _8: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup } @@ -1084,7 +1084,7 @@ public extension Api { let _c5 = _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.BotInlineMessage.botInlineMessageMediaVenue(Cons_botInlineMessageMediaVenue(flags: _1!, geo: _2!, title: _3!, address: _4!, provider: _5!, venueId: _6!, venueType: _7!, replyMarkup: _8)) } @@ -1098,7 +1098,7 @@ public extension Api { var _2: String? _2 = parseString(reader) var _3: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } @@ -1106,16 +1106,16 @@ public extension Api { var _4: String? _4 = parseString(reader) var _5: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.BotInlineMessage.botInlineMessageMediaWebPage(Cons_botInlineMessageMediaWebPage(flags: _1!, message: _2!, entities: _3, url: _4!, replyMarkup: _5)) } @@ -1129,21 +1129,21 @@ public extension Api { var _2: String? _2 = parseString(reader) var _3: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } } var _4: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.BotInlineMessage.botInlineMessageText(Cons_botInlineMessageText(flags: _1!, message: _2!, entities: _3, replyMarkup: _4)) } @@ -1273,23 +1273,23 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: Api.Photo? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.Photo } } var _5: Api.Document? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.Document } } var _6: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _6 = parseString(reader) } var _7: String? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _7 = parseString(reader) } var _8: Api.BotInlineMessage? @@ -1299,10 +1299,10 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _7 != nil let _c8 = _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.BotInlineResult.botInlineMediaResult(Cons_botInlineMediaResult(flags: _1!, id: _2!, type: _3!, photo: _4, document: _5, title: _6, description: _7, sendMessage: _8!)) @@ -1319,25 +1319,25 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = parseString(reader) } var _5: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = parseString(reader) } var _6: String? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _6 = parseString(reader) } var _7: Api.WebDocument? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.WebDocument } } var _8: Api.WebDocument? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.WebDocument } @@ -1349,11 +1349,11 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 5) == 0) || _8 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _8 != nil let _c9 = _9 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { return Api.BotInlineResult.botInlineResult(Cons_botInlineResult(flags: _1!, id: _2!, type: _3!, title: _4, description: _5, url: _6, thumb: _7, content: _8, sendMessage: _9!)) @@ -1594,13 +1594,13 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.BotVerifierSettings.botVerifierSettings(Cons_botVerifierSettings(flags: _1!, icon: _2!, company: _3!, customDescription: _4)) } diff --git a/submodules/TelegramApi/Sources/Api20.swift b/submodules/TelegramApi/Sources/Api20.swift index ea283b9a7d..a630173cb1 100644 --- a/submodules/TelegramApi/Sources/Api20.swift +++ b/submodules/TelegramApi/Sources/Api20.swift @@ -389,7 +389,7 @@ public extension Api { _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PhotoSize.self) } var _7: [Api.VideoSize]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.VideoSize.self) } @@ -402,7 +402,7 @@ public extension Api { let _c4 = _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _7 != nil let _c8 = _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.Photo.photo(Cons_photo(flags: _1!, id: _2!, accessHash: _3!, fileReference: _4!, date: _5!, sizes: _6!, videoSizes: _7, dcId: _8!)) @@ -765,15 +765,15 @@ public extension Api { _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PollAnswer.self) } var _5: Int32? - if Int(_2!) & Int(1 << 4) != 0 { + if Int(_2 ?? 0) & Int(1 << 4) != 0 { _5 = reader.readInt32() } var _6: Int32? - if Int(_2!) & Int(1 << 5) != 0 { + if Int(_2 ?? 0) & Int(1 << 5) != 0 { _6 = reader.readInt32() } var _7: [String]? - if Int(_2!) & Int(1 << 12) != 0 { + if Int(_2 ?? 0) & Int(1 << 12) != 0 { if let _ = reader.readInt32() { _7 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self) } @@ -784,9 +784,9 @@ public extension Api { let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_2!) & Int(1 << 4) == 0) || _5 != nil - let _c6 = (Int(_2!) & Int(1 << 5) == 0) || _6 != nil - let _c7 = (Int(_2!) & Int(1 << 12) == 0) || _7 != nil + let _c5 = (Int(_2 ?? 0) & Int(1 << 4) == 0) || _5 != nil + let _c6 = (Int(_2 ?? 0) & Int(1 << 5) == 0) || _6 != nil + let _c7 = (Int(_2 ?? 0) & Int(1 << 12) == 0) || _7 != nil let _c8 = _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.Poll.poll(Cons_poll(id: _1!, flags: _2!, question: _3!, answers: _4!, closePeriod: _5, closeDate: _6, countriesIso2: _7, hash: _8!)) @@ -883,14 +883,14 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.TextWithEntities } var _3: Api.InputMedia? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.InputMedia } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.PollAnswer.inputPollAnswer(Cons_inputPollAnswer(flags: _1!, text: _2!, media: _3)) } @@ -908,27 +908,27 @@ public extension Api { var _3: Buffer? _3 = parseBytes(reader) var _4: Api.MessageMedia? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.MessageMedia } } var _5: Api.Peer? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.Peer } } var _6: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _6 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.PollAnswer.pollAnswer(Cons_pollAnswer(flags: _1!, text: _2!, option: _3!, media: _4, addedBy: _5, date: _6)) } @@ -992,19 +992,19 @@ public extension Api { var _2: Buffer? _2 = parseBytes(reader) var _3: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _3 = reader.readInt32() } var _4: [Api.Peer]? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let _ = reader.readInt32() { _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Peer.self) } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.PollAnswerVoters.pollAnswerVoters(Cons_pollAnswerVoters(flags: _1!, option: _2!, voters: _3, recentVoters: _4)) } @@ -1091,44 +1091,44 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: [Api.PollAnswerVoters]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PollAnswerVoters.self) } } var _3: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _3 = reader.readInt32() } var _4: [Api.Peer]? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let _ = reader.readInt32() { _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Peer.self) } } var _5: String? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _5 = parseString(reader) } var _6: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let _ = reader.readInt32() { _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } } var _7: Api.MessageMedia? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.MessageMedia } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 4) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 4) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 5) == 0) || _7 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { return Api.PollResults.pollResults(Cons_pollResults(flags: _1!, results: _2, totalVoters: _3, recentVoters: _4, solution: _5, solutionEntities: _6, solutionMedia: _7)) } @@ -1432,11 +1432,11 @@ public extension Api { var _3: Int32? _3 = reader.readInt32() var _4: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = parseString(reader) } var _5: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _5 = reader.readInt32() } var _6: String? @@ -1446,8 +1446,8 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { @@ -1516,7 +1516,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: String? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _2 = parseString(reader) } var _3: Int32? @@ -1528,16 +1528,16 @@ public extension Api { var _6: String? _6 = parseString(reader) var _7: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _7 = parseString(reader) } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 3) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 0) == 0) || _7 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { return Api.PremiumSubscriptionOption.premiumSubscriptionOption(Cons_premiumSubscriptionOption(flags: _1!, transaction: _2, months: _3!, currency: _4!, amount: _5!, botUrl: _6!, storeProduct: _7)) } diff --git a/submodules/TelegramApi/Sources/Api21.swift b/submodules/TelegramApi/Sources/Api21.swift index a14d943b32..102550071d 100644 --- a/submodules/TelegramApi/Sources/Api21.swift +++ b/submodules/TelegramApi/Sources/Api21.swift @@ -632,7 +632,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = reader.readInt32() } var _3: Api.Reaction? @@ -642,7 +642,7 @@ public extension Api { var _4: Int32? _4 = reader.readInt32() let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil if _c1 && _c2 && _c3 && _c4 { @@ -747,19 +747,19 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.ReactionNotificationsFrom? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.ReactionNotificationsFrom } } var _3: Api.ReactionNotificationsFrom? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.ReactionNotificationsFrom } } var _4: Api.ReactionNotificationsFrom? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.ReactionNotificationsFrom } @@ -773,9 +773,9 @@ public extension Api { _6 = Api.parse(reader, signature: signature) as? Api.Bool } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { diff --git a/submodules/TelegramApi/Sources/Api22.swift b/submodules/TelegramApi/Sources/Api22.swift index 200a882362..798549678a 100644 --- a/submodules/TelegramApi/Sources/Api22.swift +++ b/submodules/TelegramApi/Sources/Api22.swift @@ -276,11 +276,11 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _2 = reader.readInt32() } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _2 != nil if _c1 && _c2 { return Api.RecentStory.recentStory(Cons_recentStory(flags: _1!, maxId: _2)) } @@ -413,11 +413,11 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: String? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _2 = parseString(reader) } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 3) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _2 != nil if _c1 && _c2 { return Api.ReplyMarkup.replyKeyboardForceReply(Cons_replyKeyboardForceReply(flags: _1!, placeholder: _2)) } @@ -444,12 +444,12 @@ public extension Api { _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.KeyboardButtonRow.self) } var _3: String? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _3 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 3) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.ReplyMarkup.replyKeyboardMarkup(Cons_replyKeyboardMarkup(flags: _1!, rows: _2!, placeholder: _3)) } @@ -830,27 +830,27 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.Bool? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.Bool } } var _3: Api.ChatAdminRights? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.ChatAdminRights } } var _4: Api.ChatAdminRights? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.ChatAdminRights } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 3) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.RequestPeerType.requestPeerTypeBroadcast(Cons_requestPeerTypeBroadcast(flags: _1!, hasUsername: _2, userAdminRights: _3, botAdminRights: _4)) } @@ -862,34 +862,34 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.Bool? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.Bool } } var _3: Api.Bool? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.Bool } } var _4: Api.ChatAdminRights? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.ChatAdminRights } } var _5: Api.ChatAdminRights? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.ChatAdminRights } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 3) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 4) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.RequestPeerType.requestPeerTypeChat(Cons_requestPeerTypeChat(flags: _1!, hasUsername: _2, forum: _3, userAdminRights: _4, botAdminRights: _5)) } @@ -901,16 +901,16 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _2 = parseString(reader) } var _3: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _3 = parseString(reader) } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.RequestPeerType.requestPeerTypeCreateBot(Cons_requestPeerTypeCreateBot(flags: _1!, suggestedName: _2, suggestedUsername: _3)) } @@ -922,20 +922,20 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.Bool? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.Bool } } var _3: Api.Bool? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.Bool } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.RequestPeerType.requestPeerTypeUser(Cons_requestPeerTypeUser(flags: _1!, bot: _2, premium: _3)) } @@ -1072,24 +1072,24 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = parseString(reader) } var _4: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = parseString(reader) } var _5: Api.Photo? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.Photo } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.RequestedPeer.requestedPeerChannel(Cons_requestedPeerChannel(flags: _1!, channelId: _2!, title: _3, username: _4, photo: _5)) } @@ -1103,19 +1103,19 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = parseString(reader) } var _4: Api.Photo? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.Photo } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.RequestedPeer.requestedPeerChat(Cons_requestedPeerChat(flags: _1!, chatId: _2!, title: _3, photo: _4)) } @@ -1129,29 +1129,29 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = parseString(reader) } var _4: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = parseString(reader) } var _5: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _5 = parseString(reader) } var _6: Api.Photo? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.Photo } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.RequestedPeer.requestedPeerUser(Cons_requestedPeerUser(flags: _1!, userId: _2!, firstName: _3, lastName: _4, username: _5, photo: _6)) } diff --git a/submodules/TelegramApi/Sources/Api23.swift b/submodules/TelegramApi/Sources/Api23.swift index 9e9f2b2b5c..7d816e2222 100644 --- a/submodules/TelegramApi/Sources/Api23.swift +++ b/submodules/TelegramApi/Sources/Api23.swift @@ -745,7 +745,7 @@ public extension Api { var _7: Int32? _7 = reader.readInt32() var _8: Api.DraftMessage? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.DraftMessage } @@ -757,7 +757,7 @@ public extension Api { let _c5 = _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 1) == 0) || _8 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.SavedDialog.monoForumDialog(Cons_monoForumDialog(flags: _1!, peer: _2!, topMessage: _3!, readInboxMaxId: _4!, readOutboxMaxId: _5!, unreadCount: _6!, unreadReactionsCount: _7!, draft: _8)) } @@ -836,14 +836,14 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.Reaction } var _3: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = parseString(reader) } var _4: Int32? _4 = reader.readInt32() let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil let _c4 = _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.SavedReactionTag.savedReactionTag(Cons_savedReactionTag(flags: _1!, reaction: _2!, title: _3, count: _4!)) @@ -974,7 +974,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.Peer? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.Peer } @@ -986,83 +986,83 @@ public extension Api { _4 = Api.parse(reader, signature: signature) as? Api.StarGift } var _5: Api.TextWithEntities? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.TextWithEntities } } var _6: Int32? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _6 = reader.readInt32() } var _7: Int64? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { _7 = reader.readInt64() } var _8: Int64? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _8 = reader.readInt64() } var _9: Int64? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { _9 = reader.readInt64() } var _10: Int32? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { _10 = reader.readInt32() } var _11: Int64? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { _11 = reader.readInt64() } var _12: Int32? - if Int(_1!) & Int(1 << 13) != 0 { + if Int(_1 ?? 0) & Int(1 << 13) != 0 { _12 = reader.readInt32() } var _13: Int32? - if Int(_1!) & Int(1 << 14) != 0 { + if Int(_1 ?? 0) & Int(1 << 14) != 0 { _13 = reader.readInt32() } var _14: [Int32]? - if Int(_1!) & Int(1 << 15) != 0 { + if Int(_1 ?? 0) & Int(1 << 15) != 0 { if let _ = reader.readInt32() { _14 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) } } var _15: String? - if Int(_1!) & Int(1 << 16) != 0 { + if Int(_1 ?? 0) & Int(1 << 16) != 0 { _15 = parseString(reader) } var _16: Int64? - if Int(_1!) & Int(1 << 18) != 0 { + if Int(_1 ?? 0) & Int(1 << 18) != 0 { _16 = reader.readInt64() } var _17: Int32? - if Int(_1!) & Int(1 << 19) != 0 { + if Int(_1 ?? 0) & Int(1 << 19) != 0 { _17 = reader.readInt32() } var _18: Int32? - if Int(_1!) & Int(1 << 20) != 0 { + if Int(_1 ?? 0) & Int(1 << 20) != 0 { _18 = reader.readInt32() } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 11) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 4) == 0) || _8 != nil - 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 - let _c12 = (Int(_1!) & Int(1 << 13) == 0) || _12 != nil - let _c13 = (Int(_1!) & Int(1 << 14) == 0) || _13 != nil - let _c14 = (Int(_1!) & Int(1 << 15) == 0) || _14 != nil - let _c15 = (Int(_1!) & Int(1 << 16) == 0) || _15 != nil - let _c16 = (Int(_1!) & Int(1 << 18) == 0) || _16 != nil - let _c17 = (Int(_1!) & Int(1 << 19) == 0) || _17 != nil - let _c18 = (Int(_1!) & Int(1 << 20) == 0) || _18 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _11 != nil + let _c12 = (Int(_1 ?? 0) & Int(1 << 13) == 0) || _12 != nil + let _c13 = (Int(_1 ?? 0) & Int(1 << 14) == 0) || _13 != nil + let _c14 = (Int(_1 ?? 0) & Int(1 << 15) == 0) || _14 != nil + let _c15 = (Int(_1 ?? 0) & Int(1 << 16) == 0) || _15 != nil + let _c16 = (Int(_1 ?? 0) & Int(1 << 18) == 0) || _16 != nil + let _c17 = (Int(_1 ?? 0) & Int(1 << 19) == 0) || _17 != nil + let _c18 = (Int(_1 ?? 0) & Int(1 << 20) == 0) || _18 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 { return Api.SavedStarGift.savedStarGift(Cons_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, collectionId: _14, prepaidUpgradeHash: _15, dropOriginalDetailsStars: _16, giftNum: _17, canCraftAt: _18)) } @@ -1125,7 +1125,7 @@ public extension Api { var _3: Int32? _3 = reader.readInt32() var _4: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = reader.readInt32() } var _5: Int64? @@ -1133,7 +1133,7 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil let _c5 = _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.SearchPostsFlood.searchPostsFlood(Cons_searchPostsFlood(flags: _1!, totalDaily: _2!, remains: _3!, waitTill: _4, starsAmount: _5!)) diff --git a/submodules/TelegramApi/Sources/Api24.swift b/submodules/TelegramApi/Sources/Api24.swift index a72b6cde79..cf8473ccd7 100644 --- a/submodules/TelegramApi/Sources/Api24.swift +++ b/submodules/TelegramApi/Sources/Api24.swift @@ -304,43 +304,43 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.SecureValueType } var _3: Api.SecureData? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.SecureData } } var _4: Api.SecureFile? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.SecureFile } } var _5: Api.SecureFile? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.SecureFile } } var _6: Api.SecureFile? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.SecureFile } } var _7: [Api.SecureFile]? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { if let _ = reader.readInt32() { _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureFile.self) } } var _8: [Api.SecureFile]? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let _ = reader.readInt32() { _8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SecureFile.self) } } var _9: Api.SecurePlainData? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { if let signature = reader.readInt32() { _9 = Api.parse(reader, signature: signature) as? Api.SecurePlainData } @@ -349,13 +349,13 @@ public extension Api { _10 = parseBytes(reader) let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 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 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 6) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 4) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 5) == 0) || _9 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _9 != nil let _c10 = _10 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 { return Api.SecureValue.secureValue(Cons_secureValue(flags: _1!, type: _2!, data: _3, frontSide: _4, reverseSide: _5, selfie: _6, translation: _7, files: _8, plainData: _9, hash: _10!)) diff --git a/submodules/TelegramApi/Sources/Api25.swift b/submodules/TelegramApi/Sources/Api25.swift index 36ee647b44..0c487ab302 100644 --- a/submodules/TelegramApi/Sources/Api25.swift +++ b/submodules/TelegramApi/Sources/Api25.swift @@ -218,25 +218,25 @@ public extension Api { var _5: String? _5 = parseString(reader) var _6: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } } var _7: Api.Photo? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.Photo } } var _8: Api.MessageMedia? - if Int(_1!) & Int(1 << 14) != 0 { + if Int(_1 ?? 0) & Int(1 << 14) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.MessageMedia } } var _9: Api.PeerColor? - if Int(_1!) & Int(1 << 13) != 0 { + if Int(_1 ?? 0) & Int(1 << 13) != 0 { if let signature = reader.readInt32() { _9 = Api.parse(reader, signature: signature) as? Api.PeerColor } @@ -244,19 +244,19 @@ public extension Api { var _10: String? _10 = parseString(reader) var _11: String? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { _11 = parseString(reader) } var _12: String? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { _12 = parseString(reader) } var _13: Int32? - if Int(_1!) & Int(1 << 15) != 0 { + if Int(_1 ?? 0) & Int(1 << 15) != 0 { _13 = reader.readInt32() } var _14: Int32? - if Int(_1!) & Int(1 << 15) != 0 { + if Int(_1 ?? 0) & Int(1 << 15) != 0 { _14 = reader.readInt32() } let _c1 = _1 != nil @@ -264,15 +264,15 @@ public extension Api { 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 << 6) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 14) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 13) == 0) || _9 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 14) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 13) == 0) || _9 != nil let _c10 = _10 != nil - let _c11 = (Int(_1!) & Int(1 << 7) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 8) == 0) || _12 != nil - let _c13 = (Int(_1!) & Int(1 << 15) == 0) || _13 != nil - let _c14 = (Int(_1!) & Int(1 << 15) == 0) || _14 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _11 != nil + let _c12 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _12 != nil + let _c13 = (Int(_1 ?? 0) & Int(1 << 15) == 0) || _13 != nil + let _c14 = (Int(_1 ?? 0) & Int(1 << 15) == 0) || _14 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 { return Api.SponsoredMessage.sponsoredMessage(Cons_sponsoredMessage(flags: _1!, randomId: _2!, url: _3!, title: _4!, message: _5!, entities: _6, photo: _7, media: _8, color: _9, buttonText: _10!, sponsorInfo: _11, additionalInfo: _12, minDisplayDuration: _13, maxDisplayDuration: _14)) } @@ -389,18 +389,18 @@ public extension Api { _3 = Api.parse(reader, signature: signature) as? Api.Peer } var _4: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = parseString(reader) } var _5: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _5 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.SponsoredPeer.sponsoredPeer(Cons_sponsoredPeer(flags: _1!, randomId: _2!, peer: _3!, sponsorInfo: _4, additionalInfo: _5)) } @@ -670,75 +670,75 @@ public extension Api { var _4: Int64? _4 = reader.readInt64() var _5: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _5 = reader.readInt32() } var _6: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _6 = reader.readInt32() } var _7: Int64? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _7 = reader.readInt64() } var _8: Int64? _8 = reader.readInt64() var _9: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _9 = reader.readInt32() } var _10: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _10 = reader.readInt32() } var _11: Int64? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _11 = reader.readInt64() } var _12: Int64? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _12 = reader.readInt64() } var _13: String? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _13 = parseString(reader) } var _14: Api.Peer? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { if let signature = reader.readInt32() { _14 = Api.parse(reader, signature: signature) as? Api.Peer } } var _15: Int32? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { _15 = reader.readInt32() } var _16: Int32? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { _16 = reader.readInt32() } var _17: Int32? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { _17 = reader.readInt32() } var _18: String? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { _18 = parseString(reader) } var _19: Int32? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { _19 = reader.readInt32() } var _20: Int32? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { _20 = reader.readInt32() } var _21: Int32? - if Int(_1!) & Int(1 << 12) != 0 { + if Int(_1 ?? 0) & Int(1 << 12) != 0 { _21 = reader.readInt32() } var _22: Api.StarGiftBackground? - if Int(_1!) & Int(1 << 13) != 0 { + if Int(_1 ?? 0) & Int(1 << 13) != 0 { if let signature = reader.readInt32() { _22 = Api.parse(reader, signature: signature) as? Api.StarGiftBackground } @@ -747,24 +747,24 @@ public extension Api { let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _7 != nil let _c8 = _8 != nil - let _c9 = (Int(_1!) & Int(1 << 1) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 1) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 3) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 4) == 0) || _12 != nil - let _c13 = (Int(_1!) & Int(1 << 5) == 0) || _13 != nil - let _c14 = (Int(_1!) & Int(1 << 6) == 0) || _14 != nil - let _c15 = (Int(_1!) & Int(1 << 8) == 0) || _15 != nil - let _c16 = (Int(_1!) & Int(1 << 8) == 0) || _16 != nil - let _c17 = (Int(_1!) & Int(1 << 9) == 0) || _17 != nil - let _c18 = (Int(_1!) & Int(1 << 11) == 0) || _18 != nil - let _c19 = (Int(_1!) & Int(1 << 11) == 0) || _19 != nil - let _c20 = (Int(_1!) & Int(1 << 11) == 0) || _20 != nil - let _c21 = (Int(_1!) & Int(1 << 12) == 0) || _21 != nil - let _c22 = (Int(_1!) & Int(1 << 13) == 0) || _22 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _11 != nil + let _c12 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _12 != nil + let _c13 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _13 != nil + let _c14 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _14 != nil + let _c15 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _15 != nil + let _c16 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _16 != nil + let _c17 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _17 != nil + let _c18 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _18 != nil + let _c19 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _19 != nil + let _c20 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _20 != nil + let _c21 = (Int(_1 ?? 0) & Int(1 << 12) == 0) || _21 != nil + let _c22 = (Int(_1 ?? 0) & Int(1 << 13) == 0) || _22 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 && _c20 && _c21 && _c22 { return Api.StarGift.starGift(Cons_starGift(flags: _1!, id: _2!, sticker: _3!, stars: _4!, availabilityRemains: _5, availabilityTotal: _6, availabilityResale: _7, convertStars: _8!, firstSaleDate: _9, lastSaleDate: _10, upgradeStars: _11, resellMinStars: _12, title: _13, releasedBy: _14, perUserTotal: _15, perUserRemains: _16, lockedUntilDate: _17, auctionSlug: _18, giftsPerRound: _19, auctionStartDate: _20, upgradeVariants: _21, background: _22)) } @@ -786,17 +786,17 @@ public extension Api { var _6: Int32? _6 = reader.readInt32() var _7: Api.Peer? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.Peer } } var _8: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _8 = parseString(reader) } var _9: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _9 = parseString(reader) } var _10: [Api.StarGiftAttribute]? @@ -808,57 +808,57 @@ public extension Api { var _12: Int32? _12 = reader.readInt32() var _13: String? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _13 = parseString(reader) } var _14: [Api.StarsAmount]? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let _ = reader.readInt32() { _14 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StarsAmount.self) } } var _15: Api.Peer? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { if let signature = reader.readInt32() { _15 = Api.parse(reader, signature: signature) as? Api.Peer } } var _16: Int64? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { _16 = reader.readInt64() } var _17: String? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { _17 = parseString(reader) } var _18: Int64? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { _18 = reader.readInt64() } var _19: Api.Peer? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _19 = Api.parse(reader, signature: signature) as? Api.Peer } } var _20: Api.PeerColor? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { if let signature = reader.readInt32() { _20 = Api.parse(reader, signature: signature) as? Api.PeerColor } } var _21: Api.Peer? - if Int(_1!) & Int(1 << 12) != 0 { + if Int(_1 ?? 0) & Int(1 << 12) != 0 { if let signature = reader.readInt32() { _21 = Api.parse(reader, signature: signature) as? Api.Peer } } var _22: Int32? - if Int(_1!) & Int(1 << 13) != 0 { + if Int(_1 ?? 0) & Int(1 << 13) != 0 { _22 = reader.readInt32() } var _23: Int32? - if Int(_1!) & Int(1 << 16) != 0 { + if Int(_1 ?? 0) & Int(1 << 16) != 0 { _23 = reader.readInt32() } let _c1 = _1 != nil @@ -867,23 +867,23 @@ public extension Api { let _c4 = _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 0) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 1) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 2) == 0) || _9 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _9 != nil let _c10 = _10 != nil let _c11 = _11 != nil let _c12 = _12 != nil - let _c13 = (Int(_1!) & Int(1 << 3) == 0) || _13 != nil - let _c14 = (Int(_1!) & Int(1 << 4) == 0) || _14 != nil - let _c15 = (Int(_1!) & Int(1 << 5) == 0) || _15 != nil - let _c16 = (Int(_1!) & Int(1 << 8) == 0) || _16 != nil - let _c17 = (Int(_1!) & Int(1 << 8) == 0) || _17 != nil - let _c18 = (Int(_1!) & Int(1 << 8) == 0) || _18 != nil - let _c19 = (Int(_1!) & Int(1 << 10) == 0) || _19 != nil - let _c20 = (Int(_1!) & Int(1 << 11) == 0) || _20 != nil - let _c21 = (Int(_1!) & Int(1 << 12) == 0) || _21 != nil - let _c22 = (Int(_1!) & Int(1 << 13) == 0) || _22 != nil - let _c23 = (Int(_1!) & Int(1 << 16) == 0) || _23 != nil + let _c13 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _13 != nil + let _c14 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _14 != nil + let _c15 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _15 != nil + let _c16 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _16 != nil + let _c17 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _17 != nil + let _c18 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _18 != nil + let _c19 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _19 != nil + let _c20 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _20 != nil + let _c21 = (Int(_1 ?? 0) & Int(1 << 12) == 0) || _21 != nil + let _c22 = (Int(_1 ?? 0) & Int(1 << 13) == 0) || _22 != nil + let _c23 = (Int(_1 ?? 0) & Int(1 << 16) == 0) || _23 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 && _c20 && _c21 && _c22 && _c23 { return Api.StarGift.starGiftUnique(Cons_starGiftUnique(flags: _1!, id: _2!, giftId: _3!, title: _4!, slug: _5!, num: _6!, ownerId: _7, ownerName: _8, ownerAddress: _9, attributes: _10!, availabilityIssued: _11!, availabilityTotal: _12!, giftAddress: _13, resellAmount: _14, releasedBy: _15, valueAmount: _16, valueCurrency: _17, valueUsdAmount: _18, themePeer: _19, peerColor: _20, hostId: _21, offerMinStars: _22, craftChancePermille: _23)) } @@ -1148,7 +1148,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.Peer? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.Peer } @@ -1160,16 +1160,16 @@ public extension Api { var _4: Int32? _4 = reader.readInt32() var _5: Api.TextWithEntities? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.TextWithEntities } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.StarGiftAttribute.starGiftAttributeOriginalDetails(Cons_starGiftAttributeOriginalDetails(flags: _1!, senderId: _2, recipientId: _3!, date: _4!, message: _5)) } @@ -1514,13 +1514,13 @@ public extension Api { var _6: Int32? _6 = reader.readInt32() var _7: Api.TextWithEntities? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.TextWithEntities } } var _8: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _8 = reader.readInt32() } let _c1 = _1 != nil @@ -1529,8 +1529,8 @@ public extension Api { let _c4 = _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.StarGiftAuctionAcquiredGift.starGiftAuctionAcquiredGift(Cons_starGiftAuctionAcquiredGift(flags: _1!, peer: _2!, date: _3!, bidAmount: _4!, round: _5!, pos: _6!, message: _7, giftNum: _8)) } @@ -1823,24 +1823,24 @@ public extension Api { var _4: Int64? _4 = reader.readInt64() var _5: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _5 = reader.readInt32() } var _6: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _6 = reader.readInt32() } var _7: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _7 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { return Api.StarGiftAuctionState.starGiftAuctionStateFinished(Cons_starGiftAuctionStateFinished(flags: _1!, startDate: _2!, endDate: _3!, averagePrice: _4!, listedCount: _5, fragmentListedCount: _6, fragmentListedUrl: _7)) } @@ -1911,19 +1911,19 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int64? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = reader.readInt64() } var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } var _4: Int64? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = reader.readInt64() } var _5: Api.Peer? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.Peer } @@ -1931,10 +1931,10 @@ public extension Api { var _6: Int32? _6 = reader.readInt32() let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil let _c6 = _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.StarGiftAuctionUserState.starGiftAuctionUserState(Cons_starGiftAuctionUserState(flags: _1!, bidAmount: _2, bidDate: _3, minBidAmount: _4, bidPeer: _5, acquiredCount: _6!)) @@ -2057,7 +2057,7 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: Api.Document? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.Document } @@ -2069,7 +2069,7 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { @@ -2191,15 +2191,15 @@ public extension Api { var _3: Int32? _3 = reader.readInt32() var _4: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = reader.readInt32() } var _5: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _5 = reader.readInt32() } var _6: Api.StarsAmount? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.StarsAmount } @@ -2207,9 +2207,9 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.StarRefProgram.starRefProgram(Cons_starRefProgram(flags: _1!, botId: _2!, commissionPermille: _3!, durationMonths: _4, endDate: _5, dailyRevenuePerUser: _6)) } diff --git a/submodules/TelegramApi/Sources/Api26.swift b/submodules/TelegramApi/Sources/Api26.swift index 8bc5c73f45..0fa1dcfe1c 100644 --- a/submodules/TelegramApi/Sources/Api26.swift +++ b/submodules/TelegramApi/Sources/Api26.swift @@ -128,7 +128,7 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = parseString(reader) } var _4: String? @@ -137,7 +137,7 @@ public extension Api { _5 = reader.readInt64() let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { @@ -212,7 +212,7 @@ public extension Api { var _3: Int32? _3 = reader.readInt32() var _4: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _4 = parseString(reader) } var _5: String? @@ -226,7 +226,7 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil @@ -350,14 +350,14 @@ public extension Api { var _4: Int64? _4 = reader.readInt64() var _5: Int64? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _5 = reader.readInt64() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.StarsRating.starsRating(Cons_starsRating(flags: _1!, level: _2!, currentLevelStars: _3!, stars: _4!, nextLevelStars: _5)) } @@ -428,14 +428,14 @@ public extension Api { _4 = Api.parse(reader, signature: signature) as? Api.StarsAmount } var _5: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _5 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.StarsRevenueStatus.starsRevenueStatus(Cons_starsRevenueStatus(flags: _1!, currentBalance: _2!, availableBalance: _3!, overallRevenue: _4!, nextWithdrawalAt: _5)) } @@ -524,21 +524,21 @@ public extension Api { _5 = Api.parse(reader, signature: signature) as? Api.StarsSubscriptionPricing } var _6: String? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _6 = parseString(reader) } var _7: String? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _7 = parseString(reader) } var _8: Api.WebDocument? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.WebDocument } } var _9: String? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { _9 = parseString(reader) } let _c1 = _1 != nil @@ -546,10 +546,10 @@ public extension Api { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 5) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 6) == 0) || _9 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _9 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { return Api.StarsSubscription.starsSubscription(Cons_starsSubscription(flags: _1!, id: _2!, peer: _3!, untilDate: _4!, pricing: _5!, chatInviteHash: _6, title: _7, photo: _8, invoiceSlug: _9)) } @@ -660,7 +660,7 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = parseString(reader) } var _4: String? @@ -669,7 +669,7 @@ public extension Api { _5 = reader.readInt64() let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { @@ -839,89 +839,89 @@ public extension Api { _5 = Api.parse(reader, signature: signature) as? Api.StarsTransactionPeer } var _6: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _6 = parseString(reader) } var _7: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _7 = parseString(reader) } var _8: Api.WebDocument? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.WebDocument } } var _9: Int32? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _9 = reader.readInt32() } var _10: String? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _10 = parseString(reader) } var _11: Buffer? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { _11 = parseBytes(reader) } var _12: Int32? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { _12 = reader.readInt32() } var _13: [Api.MessageMedia]? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { if let _ = reader.readInt32() { _13 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageMedia.self) } } var _14: Int32? - if Int(_1!) & Int(1 << 12) != 0 { + if Int(_1 ?? 0) & Int(1 << 12) != 0 { _14 = reader.readInt32() } var _15: Int32? - if Int(_1!) & Int(1 << 13) != 0 { + if Int(_1 ?? 0) & Int(1 << 13) != 0 { _15 = reader.readInt32() } var _16: Api.StarGift? - if Int(_1!) & Int(1 << 14) != 0 { + if Int(_1 ?? 0) & Int(1 << 14) != 0 { if let signature = reader.readInt32() { _16 = Api.parse(reader, signature: signature) as? Api.StarGift } } var _17: Int32? - if Int(_1!) & Int(1 << 15) != 0 { + if Int(_1 ?? 0) & Int(1 << 15) != 0 { _17 = reader.readInt32() } var _18: Int32? - if Int(_1!) & Int(1 << 16) != 0 { + if Int(_1 ?? 0) & Int(1 << 16) != 0 { _18 = reader.readInt32() } var _19: Api.Peer? - if Int(_1!) & Int(1 << 17) != 0 { + if Int(_1 ?? 0) & Int(1 << 17) != 0 { if let signature = reader.readInt32() { _19 = Api.parse(reader, signature: signature) as? Api.Peer } } var _20: Api.StarsAmount? - if Int(_1!) & Int(1 << 17) != 0 { + if Int(_1 ?? 0) & Int(1 << 17) != 0 { if let signature = reader.readInt32() { _20 = Api.parse(reader, signature: signature) as? Api.StarsAmount } } var _21: Int32? - if Int(_1!) & Int(1 << 19) != 0 { + if Int(_1 ?? 0) & Int(1 << 19) != 0 { _21 = reader.readInt32() } var _22: Int32? - if Int(_1!) & Int(1 << 20) != 0 { + if Int(_1 ?? 0) & Int(1 << 20) != 0 { _22 = reader.readInt32() } var _23: Int32? - if Int(_1!) & Int(1 << 23) != 0 { + if Int(_1 ?? 0) & Int(1 << 23) != 0 { _23 = reader.readInt32() } var _24: Int32? - if Int(_1!) & Int(1 << 23) != 0 { + if Int(_1 ?? 0) & Int(1 << 23) != 0 { _24 = reader.readInt32() } let _c1 = _1 != nil @@ -929,25 +929,25 @@ public extension Api { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 5) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 5) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 7) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 8) == 0) || _12 != nil - let _c13 = (Int(_1!) & Int(1 << 9) == 0) || _13 != nil - let _c14 = (Int(_1!) & Int(1 << 12) == 0) || _14 != nil - let _c15 = (Int(_1!) & Int(1 << 13) == 0) || _15 != nil - let _c16 = (Int(_1!) & Int(1 << 14) == 0) || _16 != nil - let _c17 = (Int(_1!) & Int(1 << 15) == 0) || _17 != nil - let _c18 = (Int(_1!) & Int(1 << 16) == 0) || _18 != nil - let _c19 = (Int(_1!) & Int(1 << 17) == 0) || _19 != nil - let _c20 = (Int(_1!) & Int(1 << 17) == 0) || _20 != nil - let _c21 = (Int(_1!) & Int(1 << 19) == 0) || _21 != nil - let _c22 = (Int(_1!) & Int(1 << 20) == 0) || _22 != nil - let _c23 = (Int(_1!) & Int(1 << 23) == 0) || _23 != nil - let _c24 = (Int(_1!) & Int(1 << 23) == 0) || _24 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _11 != nil + let _c12 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _12 != nil + let _c13 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _13 != nil + let _c14 = (Int(_1 ?? 0) & Int(1 << 12) == 0) || _14 != nil + let _c15 = (Int(_1 ?? 0) & Int(1 << 13) == 0) || _15 != nil + let _c16 = (Int(_1 ?? 0) & Int(1 << 14) == 0) || _16 != nil + let _c17 = (Int(_1 ?? 0) & Int(1 << 15) == 0) || _17 != nil + let _c18 = (Int(_1 ?? 0) & Int(1 << 16) == 0) || _18 != nil + let _c19 = (Int(_1 ?? 0) & Int(1 << 17) == 0) || _19 != nil + let _c20 = (Int(_1 ?? 0) & Int(1 << 17) == 0) || _20 != nil + let _c21 = (Int(_1 ?? 0) & Int(1 << 19) == 0) || _21 != nil + let _c22 = (Int(_1 ?? 0) & Int(1 << 20) == 0) || _22 != nil + let _c23 = (Int(_1 ?? 0) & Int(1 << 23) == 0) || _23 != nil + let _c24 = (Int(_1 ?? 0) & Int(1 << 23) == 0) || _24 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 && _c20 && _c21 && _c22 && _c23 && _c24 { return Api.StarsTransaction.starsTransaction(Cons_starsTransaction(flags: _1!, id: _2!, amount: _3!, date: _4!, peer: _5!, title: _6, description: _7, photo: _8, transactionDate: _9, transactionUrl: _10, botPayload: _11, msgId: _12, extendedMedia: _13, subscriptionPeriod: _14, giveawayPostId: _15, stargift: _16, floodskipNumber: _17, starrefCommissionPermille: _18, starrefPeer: _19, starrefAmount: _20, paidMessages: _21, premiumGiftMonths: _22, adsProceedsFromDate: _23, adsProceedsToDate: _24)) } @@ -1263,12 +1263,12 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.DataJSON } var _3: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.StatsGraph.statsGraph(Cons_statsGraph(flags: _1!, json: _2!, zoomToken: _3)) } @@ -1756,7 +1756,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = reader.readInt32() } var _3: Int64? @@ -1768,21 +1768,21 @@ public extension Api { var _6: String? _6 = parseString(reader) var _7: [Api.PhotoSize]? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let _ = reader.readInt32() { _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PhotoSize.self) } } var _8: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _8 = reader.readInt32() } var _9: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _9 = reader.readInt32() } var _10: Int64? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { _10 = reader.readInt64() } var _11: Int32? @@ -1790,15 +1790,15 @@ public extension Api { var _12: Int32? _12 = reader.readInt32() let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 4) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 4) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 8) == 0) || _10 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _10 != nil let _c11 = _11 != nil let _c12 = _12 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 { diff --git a/submodules/TelegramApi/Sources/Api27.swift b/submodules/TelegramApi/Sources/Api27.swift index eb5b139182..f4538147e6 100644 --- a/submodules/TelegramApi/Sources/Api27.swift +++ b/submodules/TelegramApi/Sources/Api27.swift @@ -238,16 +238,16 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = reader.readInt32() } var _3: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _3 = reader.readInt32() } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.StoriesStealthMode.storiesStealthMode(Cons_storiesStealthMode(flags: _1!, activeUntilDate: _2, cooldownUntilDate: _3)) } @@ -312,13 +312,13 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: Api.Photo? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.Photo } } var _5: Api.Document? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.Document } @@ -326,8 +326,8 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.StoryAlbum.storyAlbum(Cons_storyAlbum(flags: _1!, albumId: _2!, title: _3!, iconPhoto: _4, iconVideo: _5)) } @@ -387,23 +387,23 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.Peer? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.Peer } } var _3: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _3 = parseString(reader) } var _4: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _4 = reader.readInt32() } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.StoryFwdHeader.storyFwdHeader(Cons_storyFwdHeader(flags: _1!, from: _2, fromName: _3, storyId: _4)) } @@ -575,13 +575,13 @@ public extension Api { var _3: Int32? _3 = reader.readInt32() var _4: Api.Peer? - if Int(_1!) & Int(1 << 18) != 0 { + if Int(_1 ?? 0) & Int(1 << 18) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.Peer } } var _5: Api.StoryFwdHeader? - if Int(_1!) & Int(1 << 17) != 0 { + if Int(_1 ?? 0) & Int(1 << 17) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.StoryFwdHeader } @@ -589,11 +589,11 @@ public extension Api { var _6: Int32? _6 = reader.readInt32() var _7: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _7 = parseString(reader) } var _8: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } @@ -603,37 +603,37 @@ public extension Api { _9 = Api.parse(reader, signature: signature) as? Api.MessageMedia } var _10: [Api.MediaArea]? - if Int(_1!) & Int(1 << 14) != 0 { + if Int(_1 ?? 0) & Int(1 << 14) != 0 { if let _ = reader.readInt32() { _10 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MediaArea.self) } } var _11: [Api.PrivacyRule]? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let _ = reader.readInt32() { _11 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PrivacyRule.self) } } var _12: Api.StoryViews? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _12 = Api.parse(reader, signature: signature) as? Api.StoryViews } } var _13: Api.Reaction? - if Int(_1!) & Int(1 << 15) != 0 { + if Int(_1 ?? 0) & Int(1 << 15) != 0 { if let signature = reader.readInt32() { _13 = Api.parse(reader, signature: signature) as? Api.Reaction } } var _14: [Int32]? - if Int(_1!) & Int(1 << 19) != 0 { + if Int(_1 ?? 0) & Int(1 << 19) != 0 { if let _ = reader.readInt32() { _14 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) } } var _15: Api.Document? - if Int(_1!) & Int(1 << 20) != 0 { + if Int(_1 ?? 0) & Int(1 << 20) != 0 { if let signature = reader.readInt32() { _15 = Api.parse(reader, signature: signature) as? Api.Document } @@ -641,18 +641,18 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 18) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 17) == 0) || _5 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 18) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 17) == 0) || _5 != nil let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 0) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 1) == 0) || _8 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _8 != nil let _c9 = _9 != nil - let _c10 = (Int(_1!) & Int(1 << 14) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 2) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 3) == 0) || _12 != nil - let _c13 = (Int(_1!) & Int(1 << 15) == 0) || _13 != nil - let _c14 = (Int(_1!) & Int(1 << 19) == 0) || _14 != nil - let _c15 = (Int(_1!) & Int(1 << 20) == 0) || _15 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 14) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _11 != nil + let _c12 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _12 != nil + let _c13 = (Int(_1 ?? 0) & Int(1 << 15) == 0) || _13 != nil + let _c14 = (Int(_1 ?? 0) & Int(1 << 19) == 0) || _14 != nil + let _c15 = (Int(_1 ?? 0) & Int(1 << 20) == 0) || _15 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 { return Api.StoryItem.storyItem(Cons_storyItem(flags: _1!, id: _2!, date: _3!, fromId: _4, fwdFrom: _5, expireDate: _6!, caption: _7, entities: _8, media: _9!, mediaAreas: _10, privacy: _11, views: _12, sentReaction: _13, albums: _14, music: _15)) } @@ -918,7 +918,7 @@ public extension Api { var _3: Int32? _3 = reader.readInt32() var _4: Api.Reaction? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.Reaction } @@ -926,7 +926,7 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.StoryView.storyView(Cons_storyView(flags: _1!, userId: _2!, date: _3!, reaction: _4)) } @@ -1041,31 +1041,31 @@ public extension Api { var _2: Int32? _2 = reader.readInt32() var _3: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _3 = reader.readInt32() } var _4: [Api.ReactionCount]? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let _ = reader.readInt32() { _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ReactionCount.self) } } var _5: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _5 = reader.readInt32() } var _6: [Int64]? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _6 = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self) } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 4) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.StoryViews.storyViews(Cons_storyViews(flags: _1!, viewsCount: _2!, forwardsCount: _3, reactions: _4, reactionsCount: _5, recentViewers: _6)) } @@ -1120,18 +1120,18 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.StarsAmount? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.StarsAmount } } var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 3) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.SuggestedPost.suggestedPost(Cons_suggestedPost(flags: _1!, price: _2, scheduleDate: _3)) } @@ -1276,23 +1276,23 @@ public extension Api { var _5: String? _5 = parseString(reader) var _6: Api.Document? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.Document } } var _7: [Api.ThemeSettings]? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let _ = reader.readInt32() { _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ThemeSettings.self) } } var _8: String? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { _8 = parseString(reader) } var _9: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _9 = reader.readInt32() } let _c1 = _1 != nil @@ -1300,10 +1300,10 @@ public extension Api { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 6) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 4) == 0) || _9 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _9 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { return Api.Theme.theme(Cons_theme(flags: _1!, id: _2!, accessHash: _3!, slug: _4!, title: _5!, document: _6, settings: _7, emoticon: _8, installsCount: _9)) } @@ -1379,17 +1379,17 @@ public extension Api { var _3: Int32? _3 = reader.readInt32() var _4: Int32? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _4 = reader.readInt32() } var _5: [Int32]? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _5 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) } } var _6: Api.WallPaper? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.WallPaper } @@ -1397,9 +1397,9 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.ThemeSettings.themeSettings(Cons_themeSettings(flags: _1!, baseTheme: _2!, accentColor: _3!, outboxAccentColor: _4, messageColors: _5, wallpaper: _6)) } diff --git a/submodules/TelegramApi/Sources/Api28.swift b/submodules/TelegramApi/Sources/Api28.swift index d578be6491..9412289751 100644 --- a/submodules/TelegramApi/Sources/Api28.swift +++ b/submodules/TelegramApi/Sources/Api28.swift @@ -3881,11 +3881,11 @@ public extension Api { var _6: Int64? _6 = reader.readInt64() var _7: Buffer? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _7 = parseBytes(reader) } var _8: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _8 = parseString(reader) } let _c1 = _1 != nil @@ -3894,8 +3894,8 @@ public extension Api { let _c4 = _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 0) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 1) == 0) || _8 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.Update.updateBotCallbackQuery(Cons_updateBotCallbackQuery(flags: _1!, queryId: _2!, userId: _3!, peer: _4!, msgId: _5!, chatInstance: _6!, data: _7, gameShortName: _8)) } @@ -4009,7 +4009,7 @@ public extension Api { _3 = Api.parse(reader, signature: signature) as? Api.Message } var _4: Api.Message? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.Message } @@ -4019,7 +4019,7 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil let _c5 = _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.Update.updateBotEditBusinessMessage(Cons_updateBotEditBusinessMessage(flags: _1!, connectionId: _2!, message: _3!, replyToMessage: _4, qts: _5!)) @@ -4038,7 +4038,7 @@ public extension Api { _3 = Api.parse(reader, signature: signature) as? Api.Message } var _4: [Api.Message]? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Message.self) } @@ -4048,7 +4048,7 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil let _c5 = _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.Update.updateBotGuestChatQuery(Cons_updateBotGuestChatQuery(flags: _1!, queryId: _2!, message: _3!, referenceMessages: _4, qts: _5!)) @@ -4067,13 +4067,13 @@ public extension Api { var _4: String? _4 = parseString(reader) var _5: Api.GeoPoint? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.GeoPoint } } var _6: Api.InlineQueryPeerType? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.InlineQueryPeerType } @@ -4084,8 +4084,8 @@ public extension Api { let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil let _c7 = _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { return Api.Update.updateBotInlineQuery(Cons_updateBotInlineQuery(flags: _1!, queryId: _2!, userId: _3!, query: _4!, geo: _5, peerType: _6, offset: _7!)) @@ -4102,7 +4102,7 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: Api.GeoPoint? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.GeoPoint } @@ -4110,7 +4110,7 @@ public extension Api { var _5: String? _5 = parseString(reader) var _6: Api.InputBotInlineMessageID? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.InputBotInlineMessageID } @@ -4118,9 +4118,9 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.Update.updateBotInlineSend(Cons_updateBotInlineSend(flags: _1!, userId: _2!, query: _3!, geo: _4, id: _5!, msgId: _6)) } @@ -4218,7 +4218,7 @@ public extension Api { _3 = Api.parse(reader, signature: signature) as? Api.Message } var _4: Api.Message? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.Message } @@ -4228,7 +4228,7 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil let _c5 = _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.Update.updateBotNewBusinessMessage(Cons_updateBotNewBusinessMessage(flags: _1!, connectionId: _2!, message: _3!, replyToMessage: _4, qts: _5!)) @@ -4247,13 +4247,13 @@ public extension Api { var _4: Buffer? _4 = parseBytes(reader) var _5: Api.PaymentRequestedInfo? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.PaymentRequestedInfo } } var _6: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _6 = parseString(reader) } var _7: String? @@ -4264,8 +4264,8 @@ public extension Api { let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil let _c7 = _7 != nil let _c8 = _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { @@ -4382,7 +4382,7 @@ public extension Api { _5 = Api.parse(reader, signature: signature) as? Api.Message } var _6: Api.Message? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.Message } @@ -4390,7 +4390,7 @@ public extension Api { var _7: Int64? _7 = reader.readInt64() var _8: Buffer? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _8 = parseBytes(reader) } let _c1 = _1 != nil @@ -4398,9 +4398,9 @@ public extension Api { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _6 != nil let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 0) == 0) || _8 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.Update.updateBusinessBotCallbackQuery(Cons_updateBusinessBotCallbackQuery(flags: _1!, queryId: _2!, userId: _3!, connectionId: _4!, message: _5!, replyToMessage: _6, chatInstance: _7!, data: _8)) } @@ -4479,19 +4479,19 @@ public extension Api { var _5: Int64? _5 = reader.readInt64() var _6: Api.ChannelParticipant? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.ChannelParticipant } } var _7: Api.ChannelParticipant? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.ChannelParticipant } } var _8: Api.ExportedChatInvite? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite } @@ -4503,9 +4503,9 @@ public extension Api { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _8 != nil let _c9 = _9 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { return Api.Update.updateChannelParticipant(Cons_updateChannelParticipant(flags: _1!, channelId: _2!, date: _3!, actorId: _4!, userId: _5!, prevParticipant: _6, newParticipant: _7, invite: _8, qts: _9!)) @@ -4520,11 +4520,11 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } var _4: Api.Peer? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.Peer } @@ -4535,8 +4535,8 @@ public extension Api { } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil let _c5 = _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.Update.updateChannelReadMessagesContents(Cons_updateChannelReadMessagesContents(flags: _1!, channelId: _2!, topMsgId: _3, savedPeerId: _4, messages: _5!)) @@ -4551,12 +4551,12 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.Update.updateChannelTooLong(Cons_updateChannelTooLong(flags: _1!, channelId: _2!, pts: _3)) } @@ -4570,7 +4570,7 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } var _4: Api.Peer? @@ -4583,7 +4583,7 @@ public extension Api { } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { @@ -4675,19 +4675,19 @@ public extension Api { var _5: Int64? _5 = reader.readInt64() var _6: Api.ChatParticipant? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.ChatParticipant } } var _7: Api.ChatParticipant? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.ChatParticipant } } var _8: Api.ExportedChatInvite? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite } @@ -4699,9 +4699,9 @@ public extension Api { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _8 != nil let _c9 = _9 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { return Api.Update.updateChatParticipant(Cons_updateChatParticipant(flags: _1!, chatId: _2!, date: _3!, actorId: _4!, userId: _5!, prevParticipant: _6, newParticipant: _7, invite: _8, qts: _9!)) @@ -4943,7 +4943,7 @@ public extension Api { _3 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) } var _4: [Int32]? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _4 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) } @@ -4951,7 +4951,7 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.Update.updateDeleteScheduledMessages(Cons_updateDeleteScheduledMessages(flags: _1!, peer: _2!, messages: _3!, sentMessages: _4)) } @@ -4965,14 +4965,14 @@ public extension Api { var _2: Int32? _2 = reader.readInt32() var _3: Api.DialogFilter? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.DialogFilter } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.Update.updateDialogFilter(Cons_updateDialogFilter(flags: _1!, id: _2!, filter: _3)) } @@ -5000,7 +5000,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _2 = reader.readInt32() } var _3: Api.DialogPeer? @@ -5008,7 +5008,7 @@ public extension Api { _3 = Api.parse(reader, signature: signature) as? Api.DialogPeer } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _2 != nil let _c3 = _3 != nil if _c1 && _c2 && _c3 { return Api.Update.updateDialogPinned(Cons_updateDialogPinned(flags: _1!, folderId: _2, peer: _3!)) @@ -5025,14 +5025,14 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.DialogPeer } var _3: Api.Peer? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.Peer } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.Update.updateDialogUnreadMark(Cons_updateDialogUnreadMark(flags: _1!, peer: _2!, savedPeerId: _3)) } @@ -5048,11 +5048,11 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.Peer } var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } var _4: Api.Peer? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.Peer } @@ -5063,8 +5063,8 @@ public extension Api { } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil let _c5 = _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.Update.updateDraftMessage(Cons_updateDraftMessage(flags: _1!, peer: _2!, topMsgId: _3, savedPeerId: _4, draft: _5!)) @@ -5210,7 +5210,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.Peer? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.Peer } @@ -5220,7 +5220,7 @@ public extension Api { _3 = Api.parse(reader, signature: signature) as? Api.GroupCall } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _2 != nil let _c3 = _3 != nil if _c1 && _c2 && _c3 { return Api.Update.updateGroupCall(Cons_updateGroupCall(flags: _1!, peer: _2, call: _3!)) @@ -5343,11 +5343,11 @@ public extension Api { var _5: Int64? _5 = reader.readInt64() var _6: Buffer? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _6 = parseBytes(reader) } var _7: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _7 = parseString(reader) } let _c1 = _1 != nil @@ -5355,8 +5355,8 @@ public extension Api { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { return Api.Update.updateInlineBotCallbackQuery(Cons_updateInlineBotCallbackQuery(flags: _1!, queryId: _2!, userId: _3!, msgId: _4!, chatInstance: _5!, data: _6, gameShortName: _7)) } @@ -5447,23 +5447,23 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.Peer? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.Peer } } var _3: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _3 = reader.readInt32() } var _4: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _4 = reader.readInt32() } var _5: Int64? _5 = reader.readInt64() var _6: Api.Poll? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.Poll } @@ -5473,11 +5473,11 @@ public extension Api { _7 = Api.parse(reader, signature: signature) as? Api.PollResults } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil let _c7 = _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { return Api.Update.updateMessagePoll(Cons_updateMessagePoll(flags: _1!, peer: _2, msgId: _3, topMsgId: _4, pollId: _5!, poll: _6, results: _7!)) @@ -5525,11 +5525,11 @@ public extension Api { var _3: Int32? _3 = reader.readInt32() var _4: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = reader.readInt32() } var _5: Api.Peer? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.Peer } @@ -5541,8 +5541,8 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil let _c6 = _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.Update.updateMessageReactions(Cons_updateMessageReactions(flags: _1!, peer: _2!, msgId: _3!, topMsgId: _4, savedPeerId: _5, reactions: _6!)) @@ -5590,22 +5590,22 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } var _4: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = parseString(reader) } var _5: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _5 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.Update.updateNewAuthorization(Cons_updateNewAuthorization(flags: _1!, hash: _2!, date: _3, device: _4, location: _5)) } @@ -5782,12 +5782,12 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.Peer } var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.Update.updatePeerHistoryTTL(Cons_updatePeerHistoryTTL(flags: _1!, peer: _2!, ttlPeriod: _3)) } @@ -5834,14 +5834,14 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.Peer } var _3: Api.WallPaper? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.WallPaper } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.Update.updatePeerWallpaper(Cons_updatePeerWallpaper(flags: _1!, peer: _2!, wallpaper: _3)) } @@ -5926,18 +5926,18 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _2 = reader.readInt32() } var _3: [Api.DialogPeer]? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DialogPeer.self) } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.Update.updatePinnedDialogs(Cons_updatePinnedDialogs(flags: _1!, folderId: _2, order: _3)) } @@ -5972,14 +5972,14 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.Peer } var _3: [Int32]? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.Update.updatePinnedForumTopics(Cons_updatePinnedForumTopics(flags: _1!, peer: _2!, order: _3)) } @@ -6018,13 +6018,13 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: [Api.DialogPeer]? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.DialogPeer.self) } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil if _c1 && _c2 { return Api.Update.updatePinnedSavedDialogs(Cons_updatePinnedSavedDialogs(flags: _1!, order: _2)) } @@ -6089,19 +6089,19 @@ public extension Api { var _4: Int32? _4 = reader.readInt32() var _5: Int64? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _5 = reader.readInt64() } var _6: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _6 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.Update.updateReadChannelDiscussionInbox(Cons_updateReadChannelDiscussionInbox(flags: _1!, channelId: _2!, topMsgId: _3!, readMaxId: _4!, broadcastId: _5, broadcastPost: _6)) } @@ -6130,7 +6130,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = reader.readInt32() } var _3: Int64? @@ -6142,7 +6142,7 @@ public extension Api { var _6: Int32? _6 = reader.readInt32() let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil @@ -6178,7 +6178,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = reader.readInt32() } var _3: Api.Peer? @@ -6186,7 +6186,7 @@ public extension Api { _3 = Api.parse(reader, signature: signature) as? Api.Peer } var _4: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = reader.readInt32() } var _5: Int32? @@ -6198,9 +6198,9 @@ public extension Api { var _8: Int32? _8 = reader.readInt32() let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil @@ -6246,14 +6246,14 @@ public extension Api { var _4: Int32? _4 = reader.readInt32() var _5: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _5 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.Update.updateReadMessagesContents(Cons_updateReadMessagesContents(flags: _1!, messages: _2!, pts: _3!, ptsCount: _4!, date: _5)) } @@ -6387,7 +6387,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _2 = reader.readInt32() } var _3: String? @@ -6403,7 +6403,7 @@ public extension Api { _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil @@ -6687,7 +6687,7 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } var _4: Api.SendMessageAction? @@ -6696,7 +6696,7 @@ public extension Api { } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil let _c4 = _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.Update.updateUserTyping(Cons_updateUserTyping(flags: _1!, userId: _2!, topMsgId: _3, action: _4!)) diff --git a/submodules/TelegramApi/Sources/Api29.swift b/submodules/TelegramApi/Sources/Api29.swift index c9cb55d312..6943418b04 100644 --- a/submodules/TelegramApi/Sources/Api29.swift +++ b/submodules/TelegramApi/Sources/Api29.swift @@ -343,29 +343,29 @@ public extension Api { var _8: Int32? _8 = reader.readInt32() var _9: Api.MessageFwdHeader? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _9 = Api.parse(reader, signature: signature) as? Api.MessageFwdHeader } } var _10: Int64? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { _10 = reader.readInt64() } var _11: Api.MessageReplyHeader? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _11 = Api.parse(reader, signature: signature) as? Api.MessageReplyHeader } } var _12: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { if let _ = reader.readInt32() { _12 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } } var _13: Int32? - if Int(_1!) & Int(1 << 25) != 0 { + if Int(_1 ?? 0) & Int(1 << 25) != 0 { _13 = reader.readInt32() } let _c1 = _1 != nil @@ -376,11 +376,11 @@ public extension Api { let _c6 = _6 != nil let _c7 = _7 != nil let _c8 = _8 != nil - let _c9 = (Int(_1!) & Int(1 << 2) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 11) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 3) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 7) == 0) || _12 != nil - let _c13 = (Int(_1!) & Int(1 << 25) == 0) || _13 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _11 != nil + let _c12 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _12 != nil + let _c13 = (Int(_1 ?? 0) & Int(1 << 25) == 0) || _13 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 { return Api.Updates.updateShortChatMessage(Cons_updateShortChatMessage(flags: _1!, id: _2!, fromId: _3!, chatId: _4!, message: _5!, pts: _6!, ptsCount: _7!, date: _8!, fwdFrom: _9, viaBotId: _10, replyTo: _11, entities: _12, ttlPeriod: _13)) } @@ -404,29 +404,29 @@ public extension Api { var _7: Int32? _7 = reader.readInt32() var _8: Api.MessageFwdHeader? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.MessageFwdHeader } } var _9: Int64? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { _9 = reader.readInt64() } var _10: Api.MessageReplyHeader? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _10 = Api.parse(reader, signature: signature) as? Api.MessageReplyHeader } } var _11: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { if let _ = reader.readInt32() { _11 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } } var _12: Int32? - if Int(_1!) & Int(1 << 25) != 0 { + if Int(_1 ?? 0) & Int(1 << 25) != 0 { _12 = reader.readInt32() } let _c1 = _1 != nil @@ -436,11 +436,11 @@ public extension Api { let _c5 = _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 11) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 3) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 7) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 25) == 0) || _12 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _11 != nil + let _c12 = (Int(_1 ?? 0) & Int(1 << 25) == 0) || _12 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 { return Api.Updates.updateShortMessage(Cons_updateShortMessage(flags: _1!, id: _2!, userId: _3!, message: _4!, pts: _5!, ptsCount: _6!, date: _7!, fwdFrom: _8, viaBotId: _9, replyTo: _10, entities: _11, ttlPeriod: _12)) } @@ -460,19 +460,19 @@ public extension Api { var _5: Int32? _5 = reader.readInt32() var _6: Api.MessageMedia? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.MessageMedia } } var _7: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { if let _ = reader.readInt32() { _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } } var _8: Int32? - if Int(_1!) & Int(1 << 25) != 0 { + if Int(_1 ?? 0) & Int(1 << 25) != 0 { _8 = reader.readInt32() } let _c1 = _1 != nil @@ -480,9 +480,9 @@ public extension Api { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 9) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 7) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 25) == 0) || _8 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 25) == 0) || _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.Updates.updateShortSentMessage(Cons_updateShortSentMessage(flags: _1!, id: _2!, pts: _3!, ptsCount: _4!, date: _5!, media: _6, entities: _7, ttlPeriod: _8)) } @@ -667,11 +667,11 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = parseString(reader) } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil if _c1 && _c2 { return Api.UrlAuthResult.urlAuthResultAccepted(Cons_urlAuthResultAccepted(flags: _1!, url: _2)) } @@ -692,45 +692,45 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _4 = parseString(reader) } var _5: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = parseString(reader) } var _6: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _6 = parseString(reader) } var _7: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _7 = parseString(reader) } var _8: [String]? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let _ = reader.readInt32() { _8 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self) } } var _9: Int64? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _9 = reader.readInt64() } var _10: String? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { _10 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 2) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 3) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 4) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 7) == 0) || _10 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _10 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 { return Api.UrlAuthResult.urlAuthResultRequest(Cons_urlAuthResultRequest(flags: _1!, bot: _2!, domain: _3!, browser: _4, platform: _5, ip: _6, region: _7, matchCodes: _8, userIdHint: _9, verifiedAppName: _10)) } @@ -906,119 +906,119 @@ public extension Api { var _3: Int64? _3 = reader.readInt64() var _4: Int64? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = reader.readInt64() } var _5: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _5 = parseString(reader) } var _6: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _6 = parseString(reader) } var _7: String? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _7 = parseString(reader) } var _8: String? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _8 = parseString(reader) } var _9: Api.UserProfilePhoto? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { if let signature = reader.readInt32() { _9 = Api.parse(reader, signature: signature) as? Api.UserProfilePhoto } } var _10: Api.UserStatus? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { if let signature = reader.readInt32() { _10 = Api.parse(reader, signature: signature) as? Api.UserStatus } } var _11: Int32? - if Int(_1!) & Int(1 << 14) != 0 { + if Int(_1 ?? 0) & Int(1 << 14) != 0 { _11 = reader.readInt32() } var _12: [Api.RestrictionReason]? - if Int(_1!) & Int(1 << 18) != 0 { + if Int(_1 ?? 0) & Int(1 << 18) != 0 { if let _ = reader.readInt32() { _12 = Api.parseVector(reader, elementSignature: 0, elementType: Api.RestrictionReason.self) } } var _13: String? - if Int(_1!) & Int(1 << 19) != 0 { + if Int(_1 ?? 0) & Int(1 << 19) != 0 { _13 = parseString(reader) } var _14: String? - if Int(_1!) & Int(1 << 22) != 0 { + if Int(_1 ?? 0) & Int(1 << 22) != 0 { _14 = parseString(reader) } var _15: Api.EmojiStatus? - if Int(_1!) & Int(1 << 30) != 0 { + if Int(_1 ?? 0) & Int(1 << 30) != 0 { if let signature = reader.readInt32() { _15 = Api.parse(reader, signature: signature) as? Api.EmojiStatus } } var _16: [Api.Username]? - if Int(_2!) & Int(1 << 0) != 0 { + if Int(_2 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _16 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Username.self) } } var _17: Api.RecentStory? - if Int(_2!) & Int(1 << 5) != 0 { + if Int(_2 ?? 0) & Int(1 << 5) != 0 { if let signature = reader.readInt32() { _17 = Api.parse(reader, signature: signature) as? Api.RecentStory } } var _18: Api.PeerColor? - if Int(_2!) & Int(1 << 8) != 0 { + if Int(_2 ?? 0) & Int(1 << 8) != 0 { if let signature = reader.readInt32() { _18 = Api.parse(reader, signature: signature) as? Api.PeerColor } } var _19: Api.PeerColor? - if Int(_2!) & Int(1 << 9) != 0 { + if Int(_2 ?? 0) & Int(1 << 9) != 0 { if let signature = reader.readInt32() { _19 = Api.parse(reader, signature: signature) as? Api.PeerColor } } var _20: Int32? - if Int(_2!) & Int(1 << 12) != 0 { + if Int(_2 ?? 0) & Int(1 << 12) != 0 { _20 = reader.readInt32() } var _21: Int64? - if Int(_2!) & Int(1 << 14) != 0 { + if Int(_2 ?? 0) & Int(1 << 14) != 0 { _21 = reader.readInt64() } var _22: Int64? - if Int(_2!) & Int(1 << 15) != 0 { + if Int(_2 ?? 0) & Int(1 << 15) != 0 { _22 = reader.readInt64() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 4) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 5) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 6) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 14) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 18) == 0) || _12 != nil - let _c13 = (Int(_1!) & Int(1 << 19) == 0) || _13 != nil - let _c14 = (Int(_1!) & Int(1 << 22) == 0) || _14 != nil - let _c15 = (Int(_1!) & Int(1 << 30) == 0) || _15 != nil - let _c16 = (Int(_2!) & Int(1 << 0) == 0) || _16 != nil - let _c17 = (Int(_2!) & Int(1 << 5) == 0) || _17 != nil - let _c18 = (Int(_2!) & Int(1 << 8) == 0) || _18 != nil - let _c19 = (Int(_2!) & Int(1 << 9) == 0) || _19 != nil - let _c20 = (Int(_2!) & Int(1 << 12) == 0) || _20 != nil - let _c21 = (Int(_2!) & Int(1 << 14) == 0) || _21 != nil - let _c22 = (Int(_2!) & Int(1 << 15) == 0) || _22 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 14) == 0) || _11 != nil + let _c12 = (Int(_1 ?? 0) & Int(1 << 18) == 0) || _12 != nil + let _c13 = (Int(_1 ?? 0) & Int(1 << 19) == 0) || _13 != nil + let _c14 = (Int(_1 ?? 0) & Int(1 << 22) == 0) || _14 != nil + let _c15 = (Int(_1 ?? 0) & Int(1 << 30) == 0) || _15 != nil + let _c16 = (Int(_2 ?? 0) & Int(1 << 0) == 0) || _16 != nil + let _c17 = (Int(_2 ?? 0) & Int(1 << 5) == 0) || _17 != nil + let _c18 = (Int(_2 ?? 0) & Int(1 << 8) == 0) || _18 != nil + let _c19 = (Int(_2 ?? 0) & Int(1 << 9) == 0) || _19 != nil + let _c20 = (Int(_2 ?? 0) & Int(1 << 12) == 0) || _20 != nil + let _c21 = (Int(_2 ?? 0) & Int(1 << 14) == 0) || _21 != nil + let _c22 = (Int(_2 ?? 0) & Int(1 << 15) == 0) || _22 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 && _c20 && _c21 && _c22 { return Api.User.user(Cons_user(flags: _1!, flags2: _2!, id: _3!, accessHash: _4, firstName: _5, lastName: _6, username: _7, phone: _8, photo: _9, status: _10, botInfoVersion: _11, restrictionReason: _12, botInlinePlaceholder: _13, langCode: _14, emojiStatus: _15, usernames: _16, storiesMaxId: _17, color: _18, profileColor: _19, botActiveUsers: _20, botVerificationIcon: _21, sendPaidMessagesStars: _22)) } @@ -1263,7 +1263,7 @@ public extension Api { var _3: Int64? _3 = reader.readInt64() var _4: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = parseString(reader) } var _5: Api.PeerSettings? @@ -1271,19 +1271,19 @@ public extension Api { _5 = Api.parse(reader, signature: signature) as? Api.PeerSettings } var _6: Api.Photo? - if Int(_1!) & Int(1 << 21) != 0 { + if Int(_1 ?? 0) & Int(1 << 21) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.Photo } } var _7: Api.Photo? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.Photo } } var _8: Api.Photo? - if Int(_1!) & Int(1 << 22) != 0 { + if Int(_1 ?? 0) & Int(1 << 22) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.Photo } @@ -1293,207 +1293,207 @@ public extension Api { _9 = Api.parse(reader, signature: signature) as? Api.PeerNotifySettings } var _10: Api.BotInfo? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _10 = Api.parse(reader, signature: signature) as? Api.BotInfo } } var _11: Int32? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { _11 = reader.readInt32() } var _12: Int32? _12 = reader.readInt32() var _13: Int32? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { _13 = reader.readInt32() } var _14: Int32? - if Int(_1!) & Int(1 << 14) != 0 { + if Int(_1 ?? 0) & Int(1 << 14) != 0 { _14 = reader.readInt32() } var _15: Api.ChatTheme? - if Int(_1!) & Int(1 << 15) != 0 { + if Int(_1 ?? 0) & Int(1 << 15) != 0 { if let signature = reader.readInt32() { _15 = Api.parse(reader, signature: signature) as? Api.ChatTheme } } var _16: String? - if Int(_1!) & Int(1 << 16) != 0 { + if Int(_1 ?? 0) & Int(1 << 16) != 0 { _16 = parseString(reader) } var _17: Api.ChatAdminRights? - if Int(_1!) & Int(1 << 17) != 0 { + if Int(_1 ?? 0) & Int(1 << 17) != 0 { if let signature = reader.readInt32() { _17 = Api.parse(reader, signature: signature) as? Api.ChatAdminRights } } var _18: Api.ChatAdminRights? - if Int(_1!) & Int(1 << 18) != 0 { + if Int(_1 ?? 0) & Int(1 << 18) != 0 { if let signature = reader.readInt32() { _18 = Api.parse(reader, signature: signature) as? Api.ChatAdminRights } } var _19: Api.WallPaper? - if Int(_1!) & Int(1 << 24) != 0 { + if Int(_1 ?? 0) & Int(1 << 24) != 0 { if let signature = reader.readInt32() { _19 = Api.parse(reader, signature: signature) as? Api.WallPaper } } var _20: Api.PeerStories? - if Int(_1!) & Int(1 << 25) != 0 { + if Int(_1 ?? 0) & Int(1 << 25) != 0 { if let signature = reader.readInt32() { _20 = Api.parse(reader, signature: signature) as? Api.PeerStories } } var _21: Api.BusinessWorkHours? - if Int(_2!) & Int(1 << 0) != 0 { + if Int(_2 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _21 = Api.parse(reader, signature: signature) as? Api.BusinessWorkHours } } var _22: Api.BusinessLocation? - if Int(_2!) & Int(1 << 1) != 0 { + if Int(_2 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _22 = Api.parse(reader, signature: signature) as? Api.BusinessLocation } } var _23: Api.BusinessGreetingMessage? - if Int(_2!) & Int(1 << 2) != 0 { + if Int(_2 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _23 = Api.parse(reader, signature: signature) as? Api.BusinessGreetingMessage } } var _24: Api.BusinessAwayMessage? - if Int(_2!) & Int(1 << 3) != 0 { + if Int(_2 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _24 = Api.parse(reader, signature: signature) as? Api.BusinessAwayMessage } } var _25: Api.BusinessIntro? - if Int(_2!) & Int(1 << 4) != 0 { + if Int(_2 ?? 0) & Int(1 << 4) != 0 { if let signature = reader.readInt32() { _25 = Api.parse(reader, signature: signature) as? Api.BusinessIntro } } var _26: Api.Birthday? - if Int(_2!) & Int(1 << 5) != 0 { + if Int(_2 ?? 0) & Int(1 << 5) != 0 { if let signature = reader.readInt32() { _26 = Api.parse(reader, signature: signature) as? Api.Birthday } } var _27: Int64? - if Int(_2!) & Int(1 << 6) != 0 { + if Int(_2 ?? 0) & Int(1 << 6) != 0 { _27 = reader.readInt64() } var _28: Int32? - if Int(_2!) & Int(1 << 6) != 0 { + if Int(_2 ?? 0) & Int(1 << 6) != 0 { _28 = reader.readInt32() } var _29: Int32? - if Int(_2!) & Int(1 << 8) != 0 { + if Int(_2 ?? 0) & Int(1 << 8) != 0 { _29 = reader.readInt32() } var _30: Api.StarRefProgram? - if Int(_2!) & Int(1 << 11) != 0 { + if Int(_2 ?? 0) & Int(1 << 11) != 0 { if let signature = reader.readInt32() { _30 = Api.parse(reader, signature: signature) as? Api.StarRefProgram } } var _31: Api.BotVerification? - if Int(_2!) & Int(1 << 12) != 0 { + if Int(_2 ?? 0) & Int(1 << 12) != 0 { if let signature = reader.readInt32() { _31 = Api.parse(reader, signature: signature) as? Api.BotVerification } } var _32: Int64? - if Int(_2!) & Int(1 << 14) != 0 { + if Int(_2 ?? 0) & Int(1 << 14) != 0 { _32 = reader.readInt64() } var _33: Api.DisallowedGiftsSettings? - if Int(_2!) & Int(1 << 15) != 0 { + if Int(_2 ?? 0) & Int(1 << 15) != 0 { if let signature = reader.readInt32() { _33 = Api.parse(reader, signature: signature) as? Api.DisallowedGiftsSettings } } var _34: Api.StarsRating? - if Int(_2!) & Int(1 << 17) != 0 { + if Int(_2 ?? 0) & Int(1 << 17) != 0 { if let signature = reader.readInt32() { _34 = Api.parse(reader, signature: signature) as? Api.StarsRating } } var _35: Api.StarsRating? - if Int(_2!) & Int(1 << 18) != 0 { + if Int(_2 ?? 0) & Int(1 << 18) != 0 { if let signature = reader.readInt32() { _35 = Api.parse(reader, signature: signature) as? Api.StarsRating } } var _36: Int32? - if Int(_2!) & Int(1 << 18) != 0 { + if Int(_2 ?? 0) & Int(1 << 18) != 0 { _36 = reader.readInt32() } var _37: Api.ProfileTab? - if Int(_2!) & Int(1 << 20) != 0 { + if Int(_2 ?? 0) & Int(1 << 20) != 0 { if let signature = reader.readInt32() { _37 = Api.parse(reader, signature: signature) as? Api.ProfileTab } } var _38: Api.Document? - if Int(_2!) & Int(1 << 21) != 0 { + if Int(_2 ?? 0) & Int(1 << 21) != 0 { if let signature = reader.readInt32() { _38 = Api.parse(reader, signature: signature) as? Api.Document } } var _39: Api.TextWithEntities? - if Int(_2!) & Int(1 << 22) != 0 { + if Int(_2 ?? 0) & Int(1 << 22) != 0 { if let signature = reader.readInt32() { _39 = Api.parse(reader, signature: signature) as? Api.TextWithEntities } } var _40: Int64? - if Int(_2!) & Int(1 << 25) != 0 { + if Int(_2 ?? 0) & Int(1 << 25) != 0 { _40 = reader.readInt64() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 21) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 2) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 22) == 0) || _8 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 21) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 22) == 0) || _8 != nil let _c9 = _9 != nil - let _c10 = (Int(_1!) & Int(1 << 3) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 6) == 0) || _11 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _11 != nil let _c12 = _12 != nil - let _c13 = (Int(_1!) & Int(1 << 11) == 0) || _13 != nil - let _c14 = (Int(_1!) & Int(1 << 14) == 0) || _14 != nil - let _c15 = (Int(_1!) & Int(1 << 15) == 0) || _15 != nil - let _c16 = (Int(_1!) & Int(1 << 16) == 0) || _16 != nil - let _c17 = (Int(_1!) & Int(1 << 17) == 0) || _17 != nil - let _c18 = (Int(_1!) & Int(1 << 18) == 0) || _18 != nil - let _c19 = (Int(_1!) & Int(1 << 24) == 0) || _19 != nil - let _c20 = (Int(_1!) & Int(1 << 25) == 0) || _20 != nil - let _c21 = (Int(_2!) & Int(1 << 0) == 0) || _21 != nil - let _c22 = (Int(_2!) & Int(1 << 1) == 0) || _22 != nil - let _c23 = (Int(_2!) & Int(1 << 2) == 0) || _23 != nil - let _c24 = (Int(_2!) & Int(1 << 3) == 0) || _24 != nil - let _c25 = (Int(_2!) & Int(1 << 4) == 0) || _25 != nil - let _c26 = (Int(_2!) & Int(1 << 5) == 0) || _26 != nil - let _c27 = (Int(_2!) & Int(1 << 6) == 0) || _27 != nil - let _c28 = (Int(_2!) & Int(1 << 6) == 0) || _28 != nil - let _c29 = (Int(_2!) & Int(1 << 8) == 0) || _29 != nil - let _c30 = (Int(_2!) & Int(1 << 11) == 0) || _30 != nil - let _c31 = (Int(_2!) & Int(1 << 12) == 0) || _31 != nil - let _c32 = (Int(_2!) & Int(1 << 14) == 0) || _32 != nil - let _c33 = (Int(_2!) & Int(1 << 15) == 0) || _33 != nil - let _c34 = (Int(_2!) & Int(1 << 17) == 0) || _34 != nil - let _c35 = (Int(_2!) & Int(1 << 18) == 0) || _35 != nil - let _c36 = (Int(_2!) & Int(1 << 18) == 0) || _36 != nil - let _c37 = (Int(_2!) & Int(1 << 20) == 0) || _37 != nil - let _c38 = (Int(_2!) & Int(1 << 21) == 0) || _38 != nil - let _c39 = (Int(_2!) & Int(1 << 22) == 0) || _39 != nil - let _c40 = (Int(_2!) & Int(1 << 25) == 0) || _40 != nil + let _c13 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _13 != nil + let _c14 = (Int(_1 ?? 0) & Int(1 << 14) == 0) || _14 != nil + let _c15 = (Int(_1 ?? 0) & Int(1 << 15) == 0) || _15 != nil + let _c16 = (Int(_1 ?? 0) & Int(1 << 16) == 0) || _16 != nil + let _c17 = (Int(_1 ?? 0) & Int(1 << 17) == 0) || _17 != nil + let _c18 = (Int(_1 ?? 0) & Int(1 << 18) == 0) || _18 != nil + let _c19 = (Int(_1 ?? 0) & Int(1 << 24) == 0) || _19 != nil + let _c20 = (Int(_1 ?? 0) & Int(1 << 25) == 0) || _20 != nil + let _c21 = (Int(_2 ?? 0) & Int(1 << 0) == 0) || _21 != nil + let _c22 = (Int(_2 ?? 0) & Int(1 << 1) == 0) || _22 != nil + let _c23 = (Int(_2 ?? 0) & Int(1 << 2) == 0) || _23 != nil + let _c24 = (Int(_2 ?? 0) & Int(1 << 3) == 0) || _24 != nil + let _c25 = (Int(_2 ?? 0) & Int(1 << 4) == 0) || _25 != nil + let _c26 = (Int(_2 ?? 0) & Int(1 << 5) == 0) || _26 != nil + let _c27 = (Int(_2 ?? 0) & Int(1 << 6) == 0) || _27 != nil + let _c28 = (Int(_2 ?? 0) & Int(1 << 6) == 0) || _28 != nil + let _c29 = (Int(_2 ?? 0) & Int(1 << 8) == 0) || _29 != nil + let _c30 = (Int(_2 ?? 0) & Int(1 << 11) == 0) || _30 != nil + let _c31 = (Int(_2 ?? 0) & Int(1 << 12) == 0) || _31 != nil + let _c32 = (Int(_2 ?? 0) & Int(1 << 14) == 0) || _32 != nil + let _c33 = (Int(_2 ?? 0) & Int(1 << 15) == 0) || _33 != nil + let _c34 = (Int(_2 ?? 0) & Int(1 << 17) == 0) || _34 != nil + let _c35 = (Int(_2 ?? 0) & Int(1 << 18) == 0) || _35 != nil + let _c36 = (Int(_2 ?? 0) & Int(1 << 18) == 0) || _36 != nil + let _c37 = (Int(_2 ?? 0) & Int(1 << 20) == 0) || _37 != nil + let _c38 = (Int(_2 ?? 0) & Int(1 << 21) == 0) || _38 != nil + let _c39 = (Int(_2 ?? 0) & Int(1 << 22) == 0) || _39 != nil + let _c40 = (Int(_2 ?? 0) & Int(1 << 25) == 0) || _40 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 && _c20 && _c21 && _c22 && _c23 && _c24 && _c25 && _c26 && _c27 && _c28 && _c29 && _c30 && _c31 && _c32 && _c33 && _c34 && _c35 && _c36 && _c37 && _c38 && _c39 && _c40 { return Api.UserFull.userFull(Cons_userFull(flags: _1!, flags2: _2!, id: _3!, about: _4, settings: _5!, personalPhoto: _6, profilePhoto: _7, fallbackPhoto: _8, notifySettings: _9!, botInfo: _10, pinnedMsgId: _11, commonChatsCount: _12!, folderId: _13, ttlPeriod: _14, theme: _15, privateForwardName: _16, botGroupAdminRights: _17, botBroadcastAdminRights: _18, wallpaper: _19, stories: _20, businessWorkHours: _21, businessLocation: _22, businessGreetingMessage: _23, businessAwayMessage: _24, businessIntro: _25, birthday: _26, personalChannelId: _27, personalChannelMessage: _28, stargiftsCount: _29, starrefProgram: _30, botVerification: _31, sendPaidMessagesStars: _32, disallowedGifts: _33, starsRating: _34, starsMyPendingRating: _35, starsMyPendingRatingDate: _36, mainTab: _37, savedMusic: _38, note: _39, botManagerId: _40)) } @@ -1559,14 +1559,14 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: Buffer? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _3 = parseBytes(reader) } var _4: Int32? _4 = reader.readInt32() let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil let _c4 = _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.UserProfilePhoto.userProfilePhoto(Cons_userProfilePhoto(flags: _1!, photoId: _2!, strippedThumb: _3, dcId: _4!)) @@ -1914,7 +1914,7 @@ public extension Api { var _5: Int32? _5 = reader.readInt32() var _6: Double? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _6 = reader.readDouble() } let _c1 = _1 != nil @@ -1922,7 +1922,7 @@ public extension Api { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.VideoSize.videoSize(Cons_videoSize(flags: _1!, type: _2!, w: _3!, h: _4!, size: _5!, videoStartTs: _6)) } @@ -2057,7 +2057,7 @@ public extension Api { _5 = Api.parse(reader, signature: signature) as? Api.Document } var _6: Api.WallPaperSettings? - if Int(_2!) & Int(1 << 2) != 0 { + if Int(_2 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.WallPaperSettings } @@ -2067,7 +2067,7 @@ public extension Api { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_2!) & Int(1 << 2) == 0) || _6 != nil + let _c6 = (Int(_2 ?? 0) & Int(1 << 2) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.WallPaper.wallPaper(Cons_wallPaper(id: _1!, flags: _2!, accessHash: _3!, slug: _4!, document: _5!, settings: _6)) } @@ -2081,14 +2081,14 @@ public extension Api { var _2: Int32? _2 = reader.readInt32() var _3: Api.WallPaperSettings? - if Int(_2!) & Int(1 << 2) != 0 { + if Int(_2 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.WallPaperSettings } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_2!) & Int(1 << 2) == 0) || _3 != nil + let _c3 = (Int(_2 ?? 0) & Int(1 << 2) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.WallPaper.wallPaperNoFile(Cons_wallPaperNoFile(id: _1!, flags: _2!, settings: _3)) } @@ -2168,41 +2168,41 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = reader.readInt32() } var _3: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _3 = reader.readInt32() } var _4: Int32? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _4 = reader.readInt32() } var _5: Int32? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { _5 = reader.readInt32() } var _6: Int32? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _6 = reader.readInt32() } var _7: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _7 = reader.readInt32() } var _8: String? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { _8 = parseString(reader) } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 4) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 5) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 6) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 7) == 0) || _8 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.WallPaperSettings.wallPaperSettings(Cons_wallPaperSettings(flags: _1!, backgroundColor: _2, secondBackgroundColor: _3, thirdBackgroundColor: _4, fourthBackgroundColor: _5, intensity: _6, rotation: _7, emoticon: _8)) } @@ -2638,65 +2638,65 @@ public extension Api { var _5: Int32? _5 = reader.readInt32() var _6: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _6 = parseString(reader) } var _7: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _7 = parseString(reader) } var _8: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _8 = parseString(reader) } var _9: String? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _9 = parseString(reader) } var _10: Api.Photo? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let signature = reader.readInt32() { _10 = Api.parse(reader, signature: signature) as? Api.Photo } } var _11: String? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _11 = parseString(reader) } var _12: String? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _12 = parseString(reader) } var _13: Int32? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { _13 = reader.readInt32() } var _14: Int32? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { _14 = reader.readInt32() } var _15: Int32? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { _15 = reader.readInt32() } var _16: String? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { _16 = parseString(reader) } var _17: Api.Document? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { if let signature = reader.readInt32() { _17 = Api.parse(reader, signature: signature) as? Api.Document } } var _18: Api.Page? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _18 = Api.parse(reader, signature: signature) as? Api.Page } } var _19: [Api.WebPageAttribute]? - if Int(_1!) & Int(1 << 12) != 0 { + if Int(_1 ?? 0) & Int(1 << 12) != 0 { if let _ = reader.readInt32() { _19 = Api.parseVector(reader, elementSignature: 0, elementType: Api.WebPageAttribute.self) } @@ -2706,20 +2706,20 @@ public extension Api { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 3) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 4) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 5) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 5) == 0) || _12 != nil - let _c13 = (Int(_1!) & Int(1 << 6) == 0) || _13 != nil - let _c14 = (Int(_1!) & Int(1 << 6) == 0) || _14 != nil - let _c15 = (Int(_1!) & Int(1 << 7) == 0) || _15 != nil - let _c16 = (Int(_1!) & Int(1 << 8) == 0) || _16 != nil - let _c17 = (Int(_1!) & Int(1 << 9) == 0) || _17 != nil - let _c18 = (Int(_1!) & Int(1 << 10) == 0) || _18 != nil - let _c19 = (Int(_1!) & Int(1 << 12) == 0) || _19 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _11 != nil + let _c12 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _12 != nil + let _c13 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _13 != nil + let _c14 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _14 != nil + let _c15 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _15 != nil + let _c16 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _16 != nil + let _c17 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _17 != nil + let _c18 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _18 != nil + let _c19 = (Int(_1 ?? 0) & Int(1 << 12) == 0) || _19 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 { return Api.WebPage.webPage(Cons_webPage(flags: _1!, id: _2!, url: _3!, displayUrl: _4!, hash: _5!, type: _6, siteName: _7, title: _8, description: _9, photo: _10, embedUrl: _11, embedType: _12, embedWidth: _13, embedHeight: _14, duration: _15, author: _16, document: _17, cachedPage: _18, attributes: _19)) } @@ -2733,12 +2733,12 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.WebPage.webPageEmpty(Cons_webPageEmpty(flags: _1!, id: _2!, url: _3)) } @@ -2750,11 +2750,11 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = reader.readInt32() } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil if _c1 && _c2 { return Api.WebPage.webPageNotModified(Cons_webPageNotModified(flags: _1!, cachedPageViews: _2)) } @@ -2768,14 +2768,14 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = parseString(reader) } var _4: Int32? _4 = reader.readInt32() let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil let _c4 = _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.WebPage.webPagePending(Cons_webPagePending(flags: _1!, id: _2!, url: _3, date: _4!)) diff --git a/submodules/TelegramApi/Sources/Api3.swift b/submodules/TelegramApi/Sources/Api3.swift index c8512ccb2e..e61edad873 100644 --- a/submodules/TelegramApi/Sources/Api3.swift +++ b/submodules/TelegramApi/Sources/Api3.swift @@ -51,20 +51,20 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: [Int64]? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let _ = reader.readInt32() { _2 = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self) } } var _3: [Int64]? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self) } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 4) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 6) == 0) || _3 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.BusinessBotRecipients.businessBotRecipients(Cons_businessBotRecipients(flags: _1!, users: _2, excludeUsers: _3)) } @@ -180,13 +180,13 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } } var _5: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _5 = parseString(reader) } var _6: Int32? @@ -194,8 +194,8 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil let _c6 = _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.BusinessChatLink.businessChatLink(Cons_businessChatLink(flags: _1!, link: _2!, message: _3!, entities: _4, title: _5, views: _6!)) @@ -314,7 +314,7 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: Api.Document? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.Document } @@ -322,7 +322,7 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.BusinessIntro.businessIntro(Cons_businessIntro(flags: _1!, title: _2!, description: _3!, sticker: _4)) } @@ -375,7 +375,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.GeoPoint? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.GeoPoint } @@ -383,7 +383,7 @@ public extension Api { var _3: String? _3 = parseString(reader) let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil let _c3 = _3 != nil if _c1 && _c2 && _c3 { return Api.BusinessLocation.businessLocation(Cons_businessLocation(flags: _1!, geoPoint: _2, address: _3!)) @@ -438,13 +438,13 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: [Int64]? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let _ = reader.readInt32() { _2 = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self) } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 4) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _2 != nil if _c1 && _c2 { return Api.BusinessRecipients.businessRecipients(Cons_businessRecipients(flags: _1!, users: _2)) } @@ -2323,20 +2323,20 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.ForumTopic? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.ForumTopic } } var _3: Api.ForumTopic? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.ForumTopic } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.ChannelAdminLogEventAction.channelAdminLogEventActionPinTopic(Cons_channelAdminLogEventActionPinTopic(flags: _1!, prevTopic: _2, newTopic: _3)) } diff --git a/submodules/TelegramApi/Sources/Api30.swift b/submodules/TelegramApi/Sources/Api30.swift index 0838c5992a..4e8f33efba 100644 --- a/submodules/TelegramApi/Sources/Api30.swift +++ b/submodules/TelegramApi/Sources/Api30.swift @@ -242,7 +242,7 @@ public extension Api { var _3: Int32? _3 = reader.readInt32() var _4: Api.StoryItem? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.StoryItem } @@ -250,7 +250,7 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.WebPageAttribute.webPageAttributeStory(Cons_webPageAttributeStory(flags: _1!, peer: _2!, id: _3!, story: _4)) } @@ -262,20 +262,20 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: [Api.Document]? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Document.self) } } var _3: Api.ThemeSettings? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.ThemeSettings } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.WebPageAttribute.webPageAttributeTheme(Cons_webPageAttributeTheme(flags: _1!, documents: _2, settings: _3)) } @@ -338,13 +338,13 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.InputBotInlineMessageID? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.InputBotInlineMessageID } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil if _c1 && _c2 { return Api.WebViewMessageSent.webViewMessageSent(Cons_webViewMessageSent(flags: _1!, msgId: _2)) } @@ -397,13 +397,13 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int64? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = reader.readInt64() } var _3: String? _3 = parseString(reader) let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil let _c3 = _3 != nil if _c1 && _c2 && _c3 { return Api.WebViewResult.webViewResultUrl(Cons_webViewResultUrl(flags: _1!, queryId: _2, url: _3!)) @@ -498,7 +498,7 @@ public extension Api.account { _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) } var _6: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _6 = parseString(reader) } let _c1 = _1 != nil @@ -506,7 +506,7 @@ public extension Api.account { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.account.AuthorizationForm.authorizationForm(Cons_authorizationForm(flags: _1!, requiredTypes: _2!, values: _3!, errors: _4!, users: _5!, privacyPolicyUrl: _6)) } @@ -892,7 +892,7 @@ public extension Api.account { _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) } var _6: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _6 = parseString(reader) } let _c1 = _1 != nil @@ -900,7 +900,7 @@ public extension Api.account { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.account.ChatThemes.chatThemes(Cons_chatThemes(flags: _1!, hash: _2!, themes: _3!, chats: _4!, users: _5!, nextOffset: _6)) } @@ -1386,25 +1386,25 @@ public extension Api.account { var _1: Int32? _1 = reader.readInt32() var _2: Api.PasswordKdfAlgo? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.PasswordKdfAlgo } } var _3: Buffer? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _3 = parseBytes(reader) } var _4: Int64? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _4 = reader.readInt64() } var _5: String? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _5 = parseString(reader) } var _6: String? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _6 = parseString(reader) } var _7: Api.PasswordKdfAlgo? @@ -1418,24 +1418,24 @@ public extension Api.account { var _9: Buffer? _9 = parseBytes(reader) var _10: Int32? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _10 = reader.readInt32() } var _11: String? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { _11 = parseString(reader) } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 2) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 4) == 0) || _6 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _6 != nil let _c7 = _7 != nil let _c8 = _8 != nil let _c9 = _9 != nil - let _c10 = (Int(_1!) & Int(1 << 5) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 6) == 0) || _11 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _11 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { return Api.account.Password.password(Cons_password(flags: _1!, currentAlgo: _2, srpB: _3, srpId: _4, hint: _5, emailUnconfirmedPattern: _6, newAlgo: _7!, newSecureAlgo: _8!, secureRandom: _9!, pendingResetDate: _10, loginEmailPattern: _11)) } @@ -1505,35 +1505,35 @@ public extension Api.account { var _1: Int32? _1 = reader.readInt32() var _2: Api.PasswordKdfAlgo? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.PasswordKdfAlgo } } var _3: Buffer? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = parseBytes(reader) } var _4: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = parseString(reader) } var _5: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _5 = parseString(reader) } var _6: Api.SecureSecretSettings? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.SecureSecretSettings } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.account.PasswordInputSettings.passwordInputSettings(Cons_passwordInputSettings(flags: _1!, newAlgo: _2, newPasswordHash: _3, hint: _4, email: _5, newSecureSettings: _6)) } @@ -1588,18 +1588,18 @@ public extension Api.account { var _1: Int32? _1 = reader.readInt32() var _2: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = parseString(reader) } var _3: Api.SecureSecretSettings? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.SecureSecretSettings } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.account.PasswordSettings.passwordSettings(Cons_passwordSettings(flags: _1!, email: _2, secureSettings: _3)) } diff --git a/submodules/TelegramApi/Sources/Api31.swift b/submodules/TelegramApi/Sources/Api31.swift index dffe0479b3..ddecedb633 100644 --- a/submodules/TelegramApi/Sources/Api31.swift +++ b/submodules/TelegramApi/Sources/Api31.swift @@ -68,7 +68,7 @@ public extension Api.account { var _3: String? _3 = parseString(reader) var _4: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } @@ -84,7 +84,7 @@ public extension Api.account { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { @@ -776,15 +776,15 @@ public extension Api.auth { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _2 = reader.readInt32() } var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } var _4: Buffer? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _4 = parseBytes(reader) } var _5: Api.User? @@ -792,9 +792,9 @@ public extension Api.auth { _5 = Api.parse(reader, signature: signature) as? Api.User } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil let _c5 = _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.auth.Authorization.authorization(Cons_authorization(flags: _1!, otherwiseReloginDays: _2, tmpSessions: _3, futureAuthToken: _4, user: _5!)) @@ -807,13 +807,13 @@ public extension Api.auth { var _1: Int32? _1 = reader.readInt32() var _2: Api.help.TermsOfService? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.help.TermsOfService } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil if _c1 && _c2 { return Api.auth.Authorization.authorizationSignUpRequired(Cons_authorizationSignUpRequired(flags: _1!, termsOfService: _2)) } @@ -983,11 +983,11 @@ public extension Api.auth { var _1: Int32? _1 = reader.readInt32() var _2: Buffer? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = parseBytes(reader) } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil if _c1 && _c2 { return Api.auth.LoggedOut.loggedOut(Cons_loggedOut(flags: _1!, futureAuthToken: _2)) } @@ -1311,20 +1311,20 @@ public extension Api.auth { var _3: String? _3 = parseString(reader) var _4: Api.auth.CodeType? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.auth.CodeType } } var _5: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.auth.SentCode.sentCode(Cons_sentCode(flags: _1!, type: _2!, phoneCodeHash: _3!, nextType: _4, timeout: _5)) } diff --git a/submodules/TelegramApi/Sources/Api32.swift b/submodules/TelegramApi/Sources/Api32.swift index d20d62cdd9..fbf3ae21e5 100644 --- a/submodules/TelegramApi/Sources/Api32.swift +++ b/submodules/TelegramApi/Sources/Api32.swift @@ -299,18 +299,18 @@ public extension Api.auth { var _3: Int32? _3 = reader.readInt32() var _4: Int32? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _4 = reader.readInt32() } var _5: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _5 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 4) == 0) || _5 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.auth.SentCodeType.sentCodeTypeEmailCode(Cons_sentCodeTypeEmailCode(flags: _1!, emailPattern: _2!, length: _3!, resetAvailablePeriod: _4, resetPendingDate: _5)) } @@ -322,33 +322,33 @@ public extension Api.auth { var _1: Int32? _1 = reader.readInt32() var _2: Buffer? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = parseBytes(reader) } var _3: Int64? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _3 = reader.readInt64() } var _4: Buffer? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _4 = parseBytes(reader) } var _5: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _5 = parseString(reader) } var _6: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _6 = reader.readInt32() } var _7: Int32? _7 = reader.readInt32() let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil let _c7 = _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { return Api.auth.SentCodeType.sentCodeTypeFirebaseSms(Cons_sentCodeTypeFirebaseSms(flags: _1!, nonce: _2, playIntegrityProjectId: _3, playIntegrityNonce: _4, receipt: _5, pushTimeout: _6, length: _7!)) @@ -422,11 +422,11 @@ public extension Api.auth { var _1: Int32? _1 = reader.readInt32() var _2: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = parseString(reader) } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil if _c1 && _c2 { return Api.auth.SentCodeType.sentCodeTypeSmsPhrase(Cons_sentCodeTypeSmsPhrase(flags: _1!, beginning: _2)) } @@ -438,11 +438,11 @@ public extension Api.auth { var _1: Int32? _1 = reader.readInt32() var _2: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = parseString(reader) } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil if _c1 && _c2 { return Api.auth.SentCodeType.sentCodeTypeSmsWord(Cons_sentCodeTypeSmsWord(flags: _1!, beginning: _2)) } @@ -496,13 +496,13 @@ public extension Api.bots { var _1: Int32? _1 = reader.readInt32() var _2: [Api.User]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _2 != nil if _c1 && _c2 { return Api.bots.AccessSettings.accessSettings(Cons_accessSettings(flags: _1!, addUsers: _2)) } @@ -659,7 +659,7 @@ public extension Api.bots { var _1: Int32? _1 = reader.readInt32() var _2: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = parseString(reader) } var _3: [Api.User]? @@ -667,7 +667,7 @@ public extension Api.bots { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil let _c3 = _3 != nil if _c1 && _c2 && _c3 { return Api.bots.PopularAppBots.popularAppBots(Cons_popularAppBots(flags: _1!, nextOffset: _2, users: _3!)) @@ -1285,7 +1285,7 @@ public extension Api.chatlists { _2 = Api.parse(reader, signature: signature) as? Api.TextWithEntities } var _3: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = parseString(reader) } var _4: [Api.Peer]? @@ -1302,7 +1302,7 @@ public extension Api.chatlists { } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil diff --git a/submodules/TelegramApi/Sources/Api33.swift b/submodules/TelegramApi/Sources/Api33.swift index 826344f32c..5a54e3e8a9 100644 --- a/submodules/TelegramApi/Sources/Api33.swift +++ b/submodules/TelegramApi/Sources/Api33.swift @@ -783,17 +783,17 @@ public extension Api.help { _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } var _6: Api.Document? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.Document } } var _7: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _7 = parseString(reader) } var _8: Api.Document? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.Document } @@ -803,9 +803,9 @@ public extension Api.help { 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 - let _c8 = (Int(_1!) & Int(1 << 3) == 0) || _8 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.help.AppUpdate.appUpdate(Cons_appUpdate(flags: _1!, id: _2!, version: _3!, text: _4!, entities: _5!, document: _6, url: _7, sticker: _8)) } @@ -942,7 +942,7 @@ public extension Api.help { var _3: String? _3 = parseString(reader) var _4: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = parseString(reader) } var _5: [Api.help.CountryCode]? @@ -952,7 +952,7 @@ public extension Api.help { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil let _c5 = _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.help.Country.country(Cons_country(flags: _1!, iso2: _2!, defaultName: _3!, name: _4, countryCodes: _5!)) @@ -1021,21 +1021,21 @@ public extension Api.help { var _2: String? _2 = parseString(reader) var _3: [String]? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self) } } var _4: [String]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _4 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self) } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.help.CountryCode.countryCode(Cons_countryCode(flags: _1!, countryCode: _2!, prefixes: _3, patterns: _4)) } @@ -1102,14 +1102,14 @@ public extension Api.help { var _2: String? _2 = parseString(reader) var _3: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.help.DeepLinkInfo.deepLinkInfo(Cons_deepLinkInfo(flags: _1!, message: _2!, entities: _3)) } @@ -1289,31 +1289,31 @@ public extension Api.help { var _2: Int32? _2 = reader.readInt32() var _3: Api.help.PeerColorSet? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.help.PeerColorSet } } var _4: Api.help.PeerColorSet? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.help.PeerColorSet } } var _5: Int32? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _5 = reader.readInt32() } var _6: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _6 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 4) == 0) || _6 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.help.PeerColorOption.peerColorOption(Cons_peerColorOption(flags: _1!, colorId: _2!, colors: _3, darkColors: _4, channelMinLevel: _5, groupMinLevel: _6)) } @@ -1709,17 +1709,17 @@ public extension Api.help { var _2: Int32? _2 = reader.readInt32() var _3: Api.Peer? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.Peer } } var _4: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = parseString(reader) } var _5: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = parseString(reader) } var _6: [String]? @@ -1731,7 +1731,7 @@ public extension Api.help { _7 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self) } var _8: Api.PendingSuggestion? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.PendingSuggestion } @@ -1746,12 +1746,12 @@ public extension Api.help { } let _c1 = _1 != nil let _c2 = _2 != nil - 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 _c3 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & 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 _c8 = (Int(_1 ?? 0) & 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 { diff --git a/submodules/TelegramApi/Sources/Api34.swift b/submodules/TelegramApi/Sources/Api34.swift index 64528d990f..8423bd6add 100644 --- a/submodules/TelegramApi/Sources/Api34.swift +++ b/submodules/TelegramApi/Sources/Api34.swift @@ -231,14 +231,14 @@ public extension Api.help { _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } var _5: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _5 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.help.TermsOfService.termsOfService(Cons_termsOfService(flags: _1!, id: _2!, text: _3!, entities: _4!, minAgeConfirm: _5)) } @@ -1018,18 +1018,18 @@ public extension Api.messages { var _1: Int32? _1 = reader.readInt32() var _2: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = parseString(reader) } var _3: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _3 = parseString(reader) } var _4: Int32? _4 = reader.readInt32() let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 2) == 0) || _3 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _3 != nil let _c4 = _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.messages.BotCallbackAnswer.botCallbackAnswer(Cons_botCallbackAnswer(flags: _1!, message: _2, url: _3, cacheTime: _4!)) @@ -1162,17 +1162,17 @@ public extension Api.messages { var _2: Int64? _2 = reader.readInt64() var _3: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _3 = parseString(reader) } var _4: Api.InlineBotSwitchPM? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.InlineBotSwitchPM } } var _5: Api.InlineBotWebView? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.InlineBotWebView } @@ -1189,9 +1189,9 @@ public extension Api.messages { } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil let _c8 = _8 != nil @@ -1586,14 +1586,14 @@ public extension Api.messages { _2 = Api.parse(reader, signature: signature) as? Api.TextWithEntities } var _3: Api.TextWithEntities? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.TextWithEntities } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.messages.ComposedMessageWithAI.composedMessageWithAI(Cons_composedMessageWithAI(flags: _1!, resultText: _2!, diffText: _3)) } diff --git a/submodules/TelegramApi/Sources/Api35.swift b/submodules/TelegramApi/Sources/Api35.swift index 52a9f95471..202d0b3a10 100644 --- a/submodules/TelegramApi/Sources/Api35.swift +++ b/submodules/TelegramApi/Sources/Api35.swift @@ -324,15 +324,15 @@ public extension Api.messages { _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Message.self) } var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } var _4: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = reader.readInt32() } var _5: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = reader.readInt32() } var _6: Int32? @@ -347,9 +347,9 @@ public extension Api.messages { } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil let _c8 = _8 != nil @@ -436,7 +436,7 @@ public extension Api.messages { _5 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) } var _6: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _6 = reader.readInt32() } let _c1 = _1 != nil @@ -444,7 +444,7 @@ public extension Api.messages { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.messages.EmojiGameInfo.emojiGameDiceInfo(Cons_emojiGameDiceInfo(flags: _1!, gameHash: _2!, prevStake: _3!, currentStreak: _4!, params: _5!, playsLeft: _6)) } @@ -1189,7 +1189,7 @@ public extension Api.messages { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = reader.readInt32() } var _3: Int64? @@ -1199,7 +1199,7 @@ public extension Api.messages { _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Document.self) } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil if _c1 && _c2 && _c3 && _c4 { @@ -1213,11 +1213,11 @@ public extension Api.messages { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = reader.readInt32() } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil if _c1 && _c2 { return Api.messages.FoundStickers.foundStickersNotModified(Cons_foundStickersNotModified(flags: _1!, nextOffset: _2)) } @@ -1373,11 +1373,11 @@ public extension Api.messages { var _1: Int32? _1 = reader.readInt32() var _2: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _2 = parseString(reader) } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 2) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _2 != nil if _c1 && _c2 { return Api.messages.HistoryImportParsed.historyImportParsed(Cons_historyImportParsed(flags: _1!, title: _2)) } @@ -1641,7 +1641,7 @@ public extension Api.messages { _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) } var _6: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _6 = parseString(reader) } let _c1 = _1 != nil @@ -1649,7 +1649,7 @@ public extension Api.messages { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.messages.MessageReactionsList.messageReactionsList(Cons_messageReactionsList(flags: _1!, count: _2!, reactions: _3!, chats: _4!, users: _5!, nextOffset: _6)) } @@ -1936,7 +1936,7 @@ public extension Api.messages { var _3: Int32? _3 = reader.readInt32() var _4: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _4 = reader.readInt32() } var _5: [Api.Message]? @@ -1958,7 +1958,7 @@ public extension Api.messages { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil @@ -2015,15 +2015,15 @@ public extension Api.messages { var _2: Int32? _2 = reader.readInt32() var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } var _4: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _4 = reader.readInt32() } var _5: Api.SearchPostsFlood? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.SearchPostsFlood } @@ -2046,9 +2046,9 @@ public extension Api.messages { } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil let _c8 = _8 != nil diff --git a/submodules/TelegramApi/Sources/Api36.swift b/submodules/TelegramApi/Sources/Api36.swift index 5ebc6101e0..1670f3226a 100644 --- a/submodules/TelegramApi/Sources/Api36.swift +++ b/submodules/TelegramApi/Sources/Api36.swift @@ -1022,7 +1022,7 @@ public extension Api.messages { var _4: Int32? _4 = reader.readInt32() var _5: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _5 = reader.readInt32() } var _6: [Api.SearchResultsCalendarPeriod]? @@ -1045,7 +1045,7 @@ public extension Api.messages { let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil let _c8 = _8 != nil @@ -1275,15 +1275,15 @@ public extension Api.messages { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = reader.readInt32() } var _3: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _3 = reader.readInt32() } var _4: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _4 = reader.readInt32() } var _5: [Api.SponsoredMessage]? @@ -1299,9 +1299,9 @@ public extension Api.messages { _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil @@ -1593,18 +1593,18 @@ public extension Api.messages { var _3: String? _3 = parseString(reader) var _4: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = reader.readInt32() } var _5: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _5 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.messages.TranscribedAudio.transcribedAudio(Cons_transcribedAudio(flags: _1!, transcriptionId: _2!, text: _3!, trialRemainsNum: _4, trialRemainsUntilDate: _5)) } diff --git a/submodules/TelegramApi/Sources/Api37.swift b/submodules/TelegramApi/Sources/Api37.swift index 4da43721cf..1cf60883c0 100644 --- a/submodules/TelegramApi/Sources/Api37.swift +++ b/submodules/TelegramApi/Sources/Api37.swift @@ -76,7 +76,7 @@ public extension Api.messages { _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) } var _6: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _6 = parseString(reader) } let _c1 = _1 != nil @@ -84,7 +84,7 @@ public extension Api.messages { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.messages.VotesList.votesList(Cons_votesList(flags: _1!, count: _2!, votes: _3!, chats: _4!, users: _5!, nextOffset: _6)) } @@ -422,17 +422,17 @@ public extension Api.payments { var _1: Int32? _1 = reader.readInt32() var _2: Api.Peer? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.Peer } } var _3: Int32? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _3 = reader.readInt32() } var _4: Int64? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = reader.readInt64() } var _5: Int32? @@ -440,7 +440,7 @@ public extension Api.payments { var _6: Int32? _6 = reader.readInt32() var _7: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _7 = reader.readInt32() } var _8: [Api.Chat]? @@ -452,12 +452,12 @@ public extension Api.payments { _9 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 4) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 3) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _7 != nil let _c8 = _8 != nil let _c9 = _9 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { @@ -678,22 +678,22 @@ public extension Api.payments { var _2: Int32? _2 = reader.readInt32() var _3: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _3 = reader.readInt32() } var _4: Int64? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _4 = reader.readInt64() } var _5: String? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _5 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 4) == 0) || _5 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.payments.GiveawayInfo.giveawayInfo(Cons_giveawayInfo(flags: _1!, startDate: _2!, joinedTooEarlyDate: _3, adminDisallowedChatId: _4, disallowedCountry: _5)) } @@ -707,11 +707,11 @@ public extension Api.payments { var _2: Int32? _2 = reader.readInt32() var _3: String? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _3 = parseString(reader) } var _4: Int64? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _4 = reader.readInt64() } var _5: Int32? @@ -719,16 +719,16 @@ public extension Api.payments { var _6: Int32? _6 = reader.readInt32() var _7: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _7 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 3) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 4) == 0) || _4 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 2) == 0) || _7 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { return Api.payments.GiveawayInfo.giveawayInfoResults(Cons_giveawayInfoResults(flags: _1!, startDate: _2!, giftCodeSlug: _3, starsPrize: _4, finishDate: _5!, winnersCount: _6!, activatedCount: _7)) } @@ -913,7 +913,7 @@ public extension Api.payments { var _5: String? _5 = parseString(reader) var _6: Api.WebDocument? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.WebDocument } @@ -927,29 +927,29 @@ public extension Api.payments { var _9: String? _9 = parseString(reader) var _10: String? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _10 = parseString(reader) } var _11: Api.DataJSON? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let signature = reader.readInt32() { _11 = Api.parse(reader, signature: signature) as? Api.DataJSON } } var _12: [Api.PaymentFormMethod]? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { if let _ = reader.readInt32() { _12 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PaymentFormMethod.self) } } var _13: Api.PaymentRequestedInfo? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _13 = Api.parse(reader, signature: signature) as? Api.PaymentRequestedInfo } } var _14: [Api.PaymentSavedCredentials]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _14 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PaymentSavedCredentials.self) } @@ -963,15 +963,15 @@ public extension Api.payments { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 5) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _6 != nil let _c7 = _7 != nil let _c8 = _8 != nil let _c9 = _9 != nil - let _c10 = (Int(_1!) & Int(1 << 4) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 4) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 6) == 0) || _12 != nil - let _c13 = (Int(_1!) & Int(1 << 0) == 0) || _13 != nil - let _c14 = (Int(_1!) & Int(1 << 1) == 0) || _14 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _11 != nil + let _c12 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _12 != nil + let _c13 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _13 != nil + let _c14 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _14 != nil let _c15 = _15 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 { return Api.payments.PaymentForm.paymentForm(Cons_paymentForm(flags: _1!, formId: _2!, botId: _3!, title: _4!, description: _5!, photo: _6, invoice: _7!, providerId: _8!, url: _9!, nativeProvider: _10, nativeParams: _11, additionalMethods: _12, savedInfo: _13, savedCredentials: _14, users: _15!)) @@ -1008,7 +1008,7 @@ public extension Api.payments { var _5: String? _5 = parseString(reader) var _6: Api.WebDocument? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.WebDocument } @@ -1026,7 +1026,7 @@ public extension Api.payments { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 5) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _6 != nil let _c7 = _7 != nil let _c8 = _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { @@ -1191,7 +1191,7 @@ public extension Api.payments { var _6: String? _6 = parseString(reader) var _7: Api.WebDocument? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.WebDocument } @@ -1201,19 +1201,19 @@ public extension Api.payments { _8 = Api.parse(reader, signature: signature) as? Api.Invoice } var _9: Api.PaymentRequestedInfo? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _9 = Api.parse(reader, signature: signature) as? Api.PaymentRequestedInfo } } var _10: Api.ShippingOption? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _10 = Api.parse(reader, signature: signature) as? Api.ShippingOption } } var _11: Int64? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _11 = reader.readInt64() } var _12: String? @@ -1232,11 +1232,11 @@ public extension Api.payments { let _c4 = _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 2) == 0) || _7 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _7 != nil let _c8 = _8 != nil - let _c9 = (Int(_1!) & Int(1 << 0) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 1) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 3) == 0) || _11 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _11 != nil let _c12 = _12 != nil let _c13 = _13 != nil let _c14 = _14 != nil @@ -1260,7 +1260,7 @@ public extension Api.payments { var _5: String? _5 = parseString(reader) var _6: Api.WebDocument? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.WebDocument } @@ -1284,7 +1284,7 @@ public extension Api.payments { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _6 != nil let _c7 = _7 != nil let _c8 = _8 != nil let _c9 = _9 != nil @@ -1467,17 +1467,17 @@ public extension Api.payments { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StarGift.self) } var _4: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = parseString(reader) } var _5: [Api.StarGiftAttribute]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StarGiftAttribute.self) } } var _6: Int64? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _6 = reader.readInt64() } var _7: [Api.Chat]? @@ -1485,7 +1485,7 @@ public extension Api.payments { _7 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self) } var _8: [Api.StarGiftAttributeCounter]? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let _ = reader.readInt32() { _8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StarGiftAttributeCounter.self) } @@ -1497,11 +1497,11 @@ public extension Api.payments { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _8 != nil let _c9 = _9 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { return Api.payments.ResaleStarGifts.resaleStarGifts(Cons_resaleStarGifts(flags: _1!, count: _2!, gifts: _3!, nextOffset: _4, attributes: _5, attributesHash: _6, chats: _7!, counters: _8, users: _9!)) @@ -1552,13 +1552,13 @@ public extension Api.payments { var _1: Int32? _1 = reader.readInt32() var _2: Api.PaymentRequestedInfo? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.PaymentRequestedInfo } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil if _c1 && _c2 { return Api.payments.SavedInfo.savedInfo(Cons_savedInfo(flags: _1!, savedInfo: _2)) } @@ -1639,7 +1639,7 @@ public extension Api.payments { var _2: Int32? _2 = reader.readInt32() var _3: Api.Bool? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.Bool } @@ -1649,7 +1649,7 @@ public extension Api.payments { _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.SavedStarGift.self) } var _5: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _5 = parseString(reader) } var _6: [Api.Chat]? @@ -1662,9 +1662,9 @@ public extension Api.payments { } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { diff --git a/submodules/TelegramApi/Sources/Api38.swift b/submodules/TelegramApi/Sources/Api38.swift index cd35317f0d..dbd5ef3cd2 100644 --- a/submodules/TelegramApi/Sources/Api38.swift +++ b/submodules/TelegramApi/Sources/Api38.swift @@ -91,7 +91,7 @@ public extension Api.payments { var _1: Int32? _1 = reader.readInt32() var _2: Api.StatsGraph? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.StatsGraph } @@ -107,7 +107,7 @@ public extension Api.payments { var _5: Double? _5 = reader.readDouble() let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil @@ -253,27 +253,27 @@ public extension Api.payments { _2 = Api.parse(reader, signature: signature) as? Api.StarsAmount } var _3: [Api.StarsSubscription]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StarsSubscription.self) } } var _4: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _4 = parseString(reader) } var _5: Int64? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _5 = reader.readInt64() } var _6: [Api.StarsTransaction]? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let _ = reader.readInt32() { _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StarsTransaction.self) } } var _7: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _7 = parseString(reader) } var _8: [Api.Chat]? @@ -286,11 +286,11 @@ public extension Api.payments { } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 4) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 0) == 0) || _7 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _7 != nil let _c8 = _8 != nil let _c9 = _9 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { @@ -369,14 +369,14 @@ public extension Api.payments { _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) } var _5: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _5 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.payments.SuggestedStarRefBots.suggestedStarRefBots(Cons_suggestedStarRefBots(flags: _1!, count: _2!, suggestedBots: _3!, users: _4!, nextOffset: _5)) } @@ -551,31 +551,31 @@ public extension Api.payments { var _6: Int64? _6 = reader.readInt64() var _7: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _7 = reader.readInt32() } var _8: Int64? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _8 = reader.readInt64() } var _9: Int64? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _9 = reader.readInt64() } var _10: Int64? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _10 = reader.readInt64() } var _11: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _11 = reader.readInt32() } var _12: Int32? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _12 = reader.readInt32() } var _13: String? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _13 = parseString(reader) } let _c1 = _1 != nil @@ -584,13 +584,13 @@ public extension Api.payments { let _c4 = _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 0) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 0) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 2) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 3) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 4) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 5) == 0) || _12 != nil - let _c13 = (Int(_1!) & Int(1 << 5) == 0) || _13 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _11 != nil + let _c12 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _12 != nil + let _c13 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _13 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 { return Api.payments.UniqueStarGiftValueInfo.uniqueStarGiftValueInfo(Cons_uniqueStarGiftValueInfo(flags: _1!, currency: _2!, value: _3!, initialSaleDate: _4!, initialSaleStars: _5!, initialSalePrice: _6!, lastSaleDate: _7, lastSalePrice: _8, floorPrice: _9, averagePrice: _10, listedCount: _11, fragmentListedCount: _12, fragmentListedUrl: _13)) } @@ -649,18 +649,18 @@ public extension Api.payments { var _1: Int32? _1 = reader.readInt32() var _2: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = parseString(reader) } var _3: [Api.ShippingOption]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ShippingOption.self) } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.payments.ValidatedRequestedInfo.validatedRequestedInfo(Cons_validatedRequestedInfo(flags: _1!, id: _2, shippingOptions: _3)) } @@ -1442,7 +1442,7 @@ public extension Api.premium { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Boost.self) } var _4: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = parseString(reader) } var _5: [Api.User]? @@ -1452,7 +1452,7 @@ public extension Api.premium { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil let _c5 = _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.premium.BoostsList.boostsList(Cons_boostsList(flags: _1!, count: _2!, boosts: _3!, nextOffset: _4, users: _5!)) @@ -1549,15 +1549,15 @@ public extension Api.premium { var _4: Int32? _4 = reader.readInt32() var _5: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _5 = reader.readInt32() } var _6: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _6 = reader.readInt32() } var _7: Api.StatsPercentValue? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.StatsPercentValue } @@ -1565,13 +1565,13 @@ public extension Api.premium { var _8: String? _8 = parseString(reader) var _9: [Api.PrepaidGiveaway]? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let _ = reader.readInt32() { _9 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PrepaidGiveaway.self) } } var _10: [Int32]? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let _ = reader.readInt32() { _10 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) } @@ -1580,12 +1580,12 @@ public extension Api.premium { let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 4) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _7 != nil let _c8 = _8 != nil - let _c9 = (Int(_1!) & Int(1 << 3) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 2) == 0) || _10 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _10 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 { return Api.premium.BoostsStatus.boostsStatus(Cons_boostsStatus(flags: _1!, level: _2!, currentLevelBoosts: _3!, boosts: _4!, giftBoosts: _5, nextLevelBoosts: _6, premiumAudience: _7, boostUrl: _8!, prepaidGiveaways: _9, myBoostSlots: _10)) } @@ -1787,7 +1787,7 @@ public extension Api.smsjobs { var _6: Int32? _6 = reader.readInt32() var _7: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _7 = parseString(reader) } var _8: String? @@ -1798,7 +1798,7 @@ public extension Api.smsjobs { let _c4 = _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 1) == 0) || _7 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _7 != nil let _c8 = _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.smsjobs.Status.status(Cons_status(flags: _1!, recentSent: _2!, recentSince: _3!, recentRemains: _4!, totalSent: _5!, totalSince: _6!, lastGiftSlug: _7, termsUrl: _8!)) @@ -2387,7 +2387,7 @@ public extension Api.stats { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PublicForward.self) } var _4: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = parseString(reader) } var _5: [Api.Chat]? @@ -2401,7 +2401,7 @@ public extension Api.stats { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { diff --git a/submodules/TelegramApi/Sources/Api39.swift b/submodules/TelegramApi/Sources/Api39.swift index e2afa538c0..e7194b40ee 100644 --- a/submodules/TelegramApi/Sources/Api39.swift +++ b/submodules/TelegramApi/Sources/Api39.swift @@ -322,7 +322,7 @@ public extension Api.stories { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.FoundStory.self) } var _4: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = parseString(reader) } var _5: [Api.Chat]? @@ -336,7 +336,7 @@ public extension Api.stories { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { @@ -492,7 +492,7 @@ public extension Api.stories { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.StoryItem.self) } var _4: [Int32]? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _4 = Api.parseVector(reader, elementSignature: -1471112230, elementType: Int32.self) } @@ -508,7 +508,7 @@ public extension Api.stories { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { @@ -598,7 +598,7 @@ public extension Api.stories { _5 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) } var _6: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _6 = parseString(reader) } let _c1 = _1 != nil @@ -606,7 +606,7 @@ public extension Api.stories { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.stories.StoryReactionsList.storyReactionsList(Cons_storyReactionsList(flags: _1!, count: _2!, reactions: _3!, chats: _4!, users: _5!, nextOffset: _6)) } @@ -771,7 +771,7 @@ public extension Api.stories { _8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) } var _9: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _9 = parseString(reader) } let _c1 = _1 != nil @@ -782,7 +782,7 @@ public extension Api.stories { let _c6 = _6 != nil let _c7 = _7 != nil let _c8 = _8 != nil - let _c9 = (Int(_1!) & Int(1 << 0) == 0) || _9 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _9 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { return Api.stories.StoryViewsList.storyViewsList(Cons_storyViewsList(flags: _1!, count: _2!, viewsCount: _3!, forwardsCount: _4!, reactionsCount: _5!, views: _6!, chats: _7!, users: _8!, nextOffset: _9)) } @@ -938,7 +938,7 @@ public extension Api.updates { var _2: Int32? _2 = reader.readInt32() var _3: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _3 = reader.readInt32() } var _4: [Api.Message]? @@ -959,7 +959,7 @@ public extension Api.updates { } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil @@ -977,12 +977,12 @@ public extension Api.updates { var _2: Int32? _2 = reader.readInt32() var _3: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _3 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.updates.ChannelDifference.channelDifferenceEmpty(Cons_channelDifferenceEmpty(flags: _1!, pts: _2!, timeout: _3)) } @@ -994,7 +994,7 @@ public extension Api.updates { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _2 = reader.readInt32() } var _3: Api.Dialog? @@ -1014,7 +1014,7 @@ public extension Api.updates { _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil diff --git a/submodules/TelegramApi/Sources/Api4.swift b/submodules/TelegramApi/Sources/Api4.swift index 1b2814cb3a..c6f42117da 100644 --- a/submodules/TelegramApi/Sources/Api4.swift +++ b/submodules/TelegramApi/Sources/Api4.swift @@ -386,18 +386,18 @@ public extension Api { var _3: Int32? _3 = reader.readInt32() var _4: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = reader.readInt32() } var _5: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.ChannelParticipant.channelParticipant(Cons_channelParticipant(flags: _1!, userId: _2!, date: _3!, subscriptionUntilDate: _4, rank: _5)) } @@ -411,7 +411,7 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: Int64? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _3 = reader.readInt64() } var _4: Int64? @@ -423,16 +423,16 @@ public extension Api { _6 = Api.parse(reader, signature: signature) as? Api.ChatAdminRights } var _7: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _7 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 2) == 0) || _7 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { return Api.ChannelParticipant.channelParticipantAdmin(Cons_channelParticipantAdmin(flags: _1!, userId: _2!, inviterId: _3, promotedBy: _4!, date: _5!, adminRights: _6!, rank: _7)) } @@ -456,7 +456,7 @@ public extension Api { _5 = Api.parse(reader, signature: signature) as? Api.ChatBannedRights } var _6: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _6 = parseString(reader) } let _c1 = _1 != nil @@ -464,7 +464,7 @@ public extension Api { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.ChannelParticipant.channelParticipantBanned(Cons_channelParticipantBanned(flags: _1!, peer: _2!, kickedBy: _3!, date: _4!, bannedRights: _5!, rank: _6)) } @@ -482,13 +482,13 @@ public extension Api { _3 = Api.parse(reader, signature: signature) as? Api.ChatAdminRights } var _4: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _4 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.ChannelParticipant.channelParticipantCreator(Cons_channelParticipantCreator(flags: _1!, userId: _2!, adminRights: _3!, rank: _4)) } @@ -519,19 +519,19 @@ public extension Api { var _4: Int32? _4 = reader.readInt32() var _5: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _5 = reader.readInt32() } var _6: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _6 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.ChannelParticipant.channelParticipantSelf(Cons_channelParticipantSelf(flags: _1!, userId: _2!, inviterId: _3!, date: _4!, subscriptionUntilDate: _5, rank: _6)) } @@ -721,16 +721,16 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = parseString(reader) } var _3: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _3 = reader.readInt32() } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.ChannelParticipantsFilter.channelParticipantsMentions(Cons_channelParticipantsMentions(flags: _1!, q: _2, topMsgId: _3)) } @@ -1023,13 +1023,13 @@ public extension Api { var _3: Int64? _3 = reader.readInt64() var _4: Int64? - if Int(_1!) & Int(1 << 13) != 0 { + if Int(_1 ?? 0) & Int(1 << 13) != 0 { _4 = reader.readInt64() } var _5: String? _5 = parseString(reader) var _6: String? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { _6 = parseString(reader) } var _7: Api.ChatPhoto? @@ -1039,106 +1039,106 @@ public extension Api { var _8: Int32? _8 = reader.readInt32() var _9: [Api.RestrictionReason]? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { if let _ = reader.readInt32() { _9 = Api.parseVector(reader, elementSignature: 0, elementType: Api.RestrictionReason.self) } } var _10: Api.ChatAdminRights? - if Int(_1!) & Int(1 << 14) != 0 { + if Int(_1 ?? 0) & Int(1 << 14) != 0 { if let signature = reader.readInt32() { _10 = Api.parse(reader, signature: signature) as? Api.ChatAdminRights } } var _11: Api.ChatBannedRights? - if Int(_1!) & Int(1 << 15) != 0 { + if Int(_1 ?? 0) & Int(1 << 15) != 0 { if let signature = reader.readInt32() { _11 = Api.parse(reader, signature: signature) as? Api.ChatBannedRights } } var _12: Api.ChatBannedRights? - if Int(_1!) & Int(1 << 18) != 0 { + if Int(_1 ?? 0) & Int(1 << 18) != 0 { if let signature = reader.readInt32() { _12 = Api.parse(reader, signature: signature) as? Api.ChatBannedRights } } var _13: Int32? - if Int(_1!) & Int(1 << 17) != 0 { + if Int(_1 ?? 0) & Int(1 << 17) != 0 { _13 = reader.readInt32() } var _14: [Api.Username]? - if Int(_2!) & Int(1 << 0) != 0 { + if Int(_2 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _14 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Username.self) } } var _15: Api.RecentStory? - if Int(_2!) & Int(1 << 4) != 0 { + if Int(_2 ?? 0) & Int(1 << 4) != 0 { if let signature = reader.readInt32() { _15 = Api.parse(reader, signature: signature) as? Api.RecentStory } } var _16: Api.PeerColor? - if Int(_2!) & Int(1 << 7) != 0 { + if Int(_2 ?? 0) & Int(1 << 7) != 0 { if let signature = reader.readInt32() { _16 = Api.parse(reader, signature: signature) as? Api.PeerColor } } var _17: Api.PeerColor? - if Int(_2!) & Int(1 << 8) != 0 { + if Int(_2 ?? 0) & Int(1 << 8) != 0 { if let signature = reader.readInt32() { _17 = Api.parse(reader, signature: signature) as? Api.PeerColor } } var _18: Api.EmojiStatus? - if Int(_2!) & Int(1 << 9) != 0 { + if Int(_2 ?? 0) & Int(1 << 9) != 0 { if let signature = reader.readInt32() { _18 = Api.parse(reader, signature: signature) as? Api.EmojiStatus } } var _19: Int32? - if Int(_2!) & Int(1 << 10) != 0 { + if Int(_2 ?? 0) & Int(1 << 10) != 0 { _19 = reader.readInt32() } var _20: Int32? - if Int(_2!) & Int(1 << 11) != 0 { + if Int(_2 ?? 0) & Int(1 << 11) != 0 { _20 = reader.readInt32() } var _21: Int64? - if Int(_2!) & Int(1 << 13) != 0 { + if Int(_2 ?? 0) & Int(1 << 13) != 0 { _21 = reader.readInt64() } var _22: Int64? - if Int(_2!) & Int(1 << 14) != 0 { + if Int(_2 ?? 0) & Int(1 << 14) != 0 { _22 = reader.readInt64() } var _23: Int64? - if Int(_2!) & Int(1 << 18) != 0 { + if Int(_2 ?? 0) & Int(1 << 18) != 0 { _23 = reader.readInt64() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 13) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 13) == 0) || _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 6) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _6 != nil let _c7 = _7 != nil let _c8 = _8 != nil - let _c9 = (Int(_1!) & Int(1 << 9) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 14) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 15) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 18) == 0) || _12 != nil - let _c13 = (Int(_1!) & Int(1 << 17) == 0) || _13 != nil - let _c14 = (Int(_2!) & Int(1 << 0) == 0) || _14 != nil - let _c15 = (Int(_2!) & Int(1 << 4) == 0) || _15 != nil - let _c16 = (Int(_2!) & Int(1 << 7) == 0) || _16 != nil - let _c17 = (Int(_2!) & Int(1 << 8) == 0) || _17 != nil - let _c18 = (Int(_2!) & Int(1 << 9) == 0) || _18 != nil - let _c19 = (Int(_2!) & Int(1 << 10) == 0) || _19 != nil - let _c20 = (Int(_2!) & Int(1 << 11) == 0) || _20 != nil - let _c21 = (Int(_2!) & Int(1 << 13) == 0) || _21 != nil - let _c22 = (Int(_2!) & Int(1 << 14) == 0) || _22 != nil - let _c23 = (Int(_2!) & Int(1 << 18) == 0) || _23 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 14) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 15) == 0) || _11 != nil + let _c12 = (Int(_1 ?? 0) & Int(1 << 18) == 0) || _12 != nil + let _c13 = (Int(_1 ?? 0) & Int(1 << 17) == 0) || _13 != nil + let _c14 = (Int(_2 ?? 0) & Int(1 << 0) == 0) || _14 != nil + let _c15 = (Int(_2 ?? 0) & Int(1 << 4) == 0) || _15 != nil + let _c16 = (Int(_2 ?? 0) & Int(1 << 7) == 0) || _16 != nil + let _c17 = (Int(_2 ?? 0) & Int(1 << 8) == 0) || _17 != nil + let _c18 = (Int(_2 ?? 0) & Int(1 << 9) == 0) || _18 != nil + let _c19 = (Int(_2 ?? 0) & Int(1 << 10) == 0) || _19 != nil + let _c20 = (Int(_2 ?? 0) & Int(1 << 11) == 0) || _20 != nil + let _c21 = (Int(_2 ?? 0) & Int(1 << 13) == 0) || _21 != nil + let _c22 = (Int(_2 ?? 0) & Int(1 << 14) == 0) || _22 != nil + let _c23 = (Int(_2 ?? 0) & Int(1 << 18) == 0) || _23 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 && _c20 && _c21 && _c22 && _c23 { return Api.Chat.channel(Cons_channel(flags: _1!, flags2: _2!, id: _3!, accessHash: _4, title: _5!, username: _6, photo: _7!, date: _8!, restrictionReason: _9, adminRights: _10, bannedRights: _11, defaultBannedRights: _12, participantsCount: _13, usernames: _14, storiesMaxId: _15, color: _16, profileColor: _17, emojiStatus: _18, level: _19, subscriptionUntilDate: _20, botVerificationIcon: _21, sendPaidMessagesStars: _22, linkedMonoforumId: _23)) } @@ -1156,14 +1156,14 @@ public extension Api { var _4: String? _4 = parseString(reader) var _5: Int32? - if Int(_1!) & Int(1 << 16) != 0 { + if Int(_1 ?? 0) & Int(1 << 16) != 0 { _5 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 16) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 16) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.Chat.channelForbidden(Cons_channelForbidden(flags: _1!, id: _2!, accessHash: _3!, title: _4!, untilDate: _5)) } @@ -1189,19 +1189,19 @@ public extension Api { var _7: Int32? _7 = reader.readInt32() var _8: Api.InputChannel? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.InputChannel } } var _9: Api.ChatAdminRights? - if Int(_1!) & Int(1 << 14) != 0 { + if Int(_1 ?? 0) & Int(1 << 14) != 0 { if let signature = reader.readInt32() { _9 = Api.parse(reader, signature: signature) as? Api.ChatAdminRights } } var _10: Api.ChatBannedRights? - if Int(_1!) & Int(1 << 18) != 0 { + if Int(_1 ?? 0) & Int(1 << 18) != 0 { if let signature = reader.readInt32() { _10 = Api.parse(reader, signature: signature) as? Api.ChatBannedRights } @@ -1213,9 +1213,9 @@ public extension Api { let _c5 = _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 6) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 14) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 18) == 0) || _10 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 14) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 18) == 0) || _10 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 { return Api.Chat.chat(Cons_chat(flags: _1!, id: _2!, title: _3!, photo: _4!, participantsCount: _5!, date: _6!, version: _7!, migratedTo: _8, adminRights: _9, defaultBannedRights: _10)) } @@ -1766,23 +1766,23 @@ public extension Api { var _4: String? _4 = parseString(reader) var _5: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _5 = reader.readInt32() } var _6: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _6 = reader.readInt32() } var _7: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _7 = reader.readInt32() } var _8: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _8 = reader.readInt32() } var _9: Int32? - if Int(_1!) & Int(1 << 13) != 0 { + if Int(_1 ?? 0) & Int(1 << 13) != 0 { _9 = reader.readInt32() } var _10: Int32? @@ -1800,7 +1800,7 @@ public extension Api { _14 = Api.parse(reader, signature: signature) as? Api.PeerNotifySettings } var _15: Api.ExportedChatInvite? - if Int(_1!) & Int(1 << 23) != 0 { + if Int(_1 ?? 0) & Int(1 << 23) != 0 { if let signature = reader.readInt32() { _15 = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite } @@ -1810,149 +1810,149 @@ public extension Api { _16 = Api.parseVector(reader, elementSignature: 0, elementType: Api.BotInfo.self) } var _17: Int64? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _17 = reader.readInt64() } var _18: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _18 = reader.readInt32() } var _19: Int32? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _19 = reader.readInt32() } var _20: Api.StickerSet? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { if let signature = reader.readInt32() { _20 = Api.parse(reader, signature: signature) as? Api.StickerSet } } var _21: Int32? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { _21 = reader.readInt32() } var _22: Int32? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { _22 = reader.readInt32() } var _23: Int64? - if Int(_1!) & Int(1 << 14) != 0 { + if Int(_1 ?? 0) & Int(1 << 14) != 0 { _23 = reader.readInt64() } var _24: Api.ChannelLocation? - if Int(_1!) & Int(1 << 15) != 0 { + if Int(_1 ?? 0) & Int(1 << 15) != 0 { if let signature = reader.readInt32() { _24 = Api.parse(reader, signature: signature) as? Api.ChannelLocation } } var _25: Int32? - if Int(_1!) & Int(1 << 17) != 0 { + if Int(_1 ?? 0) & Int(1 << 17) != 0 { _25 = reader.readInt32() } var _26: Int32? - if Int(_1!) & Int(1 << 18) != 0 { + if Int(_1 ?? 0) & Int(1 << 18) != 0 { _26 = reader.readInt32() } var _27: Int32? - if Int(_1!) & Int(1 << 12) != 0 { + if Int(_1 ?? 0) & Int(1 << 12) != 0 { _27 = reader.readInt32() } var _28: Int32? _28 = reader.readInt32() var _29: Api.InputGroupCall? - if Int(_1!) & Int(1 << 21) != 0 { + if Int(_1 ?? 0) & Int(1 << 21) != 0 { if let signature = reader.readInt32() { _29 = Api.parse(reader, signature: signature) as? Api.InputGroupCall } } var _30: Int32? - if Int(_1!) & Int(1 << 24) != 0 { + if Int(_1 ?? 0) & Int(1 << 24) != 0 { _30 = reader.readInt32() } var _31: [String]? - if Int(_1!) & Int(1 << 25) != 0 { + if Int(_1 ?? 0) & Int(1 << 25) != 0 { if let _ = reader.readInt32() { _31 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self) } } var _32: Api.Peer? - if Int(_1!) & Int(1 << 26) != 0 { + if Int(_1 ?? 0) & Int(1 << 26) != 0 { if let signature = reader.readInt32() { _32 = Api.parse(reader, signature: signature) as? Api.Peer } } var _33: String? - if Int(_1!) & Int(1 << 27) != 0 { + if Int(_1 ?? 0) & Int(1 << 27) != 0 { _33 = parseString(reader) } var _34: Int32? - if Int(_1!) & Int(1 << 28) != 0 { + if Int(_1 ?? 0) & Int(1 << 28) != 0 { _34 = reader.readInt32() } var _35: [Int64]? - if Int(_1!) & Int(1 << 28) != 0 { + if Int(_1 ?? 0) & Int(1 << 28) != 0 { if let _ = reader.readInt32() { _35 = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self) } } var _36: Api.Peer? - if Int(_1!) & Int(1 << 29) != 0 { + if Int(_1 ?? 0) & Int(1 << 29) != 0 { if let signature = reader.readInt32() { _36 = Api.parse(reader, signature: signature) as? Api.Peer } } var _37: Api.ChatReactions? - if Int(_1!) & Int(1 << 30) != 0 { + if Int(_1 ?? 0) & Int(1 << 30) != 0 { if let signature = reader.readInt32() { _37 = Api.parse(reader, signature: signature) as? Api.ChatReactions } } var _38: Int32? - if Int(_2!) & Int(1 << 13) != 0 { + if Int(_2 ?? 0) & Int(1 << 13) != 0 { _38 = reader.readInt32() } var _39: Api.PeerStories? - if Int(_2!) & Int(1 << 4) != 0 { + if Int(_2 ?? 0) & Int(1 << 4) != 0 { if let signature = reader.readInt32() { _39 = Api.parse(reader, signature: signature) as? Api.PeerStories } } var _40: Api.WallPaper? - if Int(_2!) & Int(1 << 7) != 0 { + if Int(_2 ?? 0) & Int(1 << 7) != 0 { if let signature = reader.readInt32() { _40 = Api.parse(reader, signature: signature) as? Api.WallPaper } } var _41: Int32? - if Int(_2!) & Int(1 << 8) != 0 { + if Int(_2 ?? 0) & Int(1 << 8) != 0 { _41 = reader.readInt32() } var _42: Int32? - if Int(_2!) & Int(1 << 9) != 0 { + if Int(_2 ?? 0) & Int(1 << 9) != 0 { _42 = reader.readInt32() } var _43: Api.StickerSet? - if Int(_2!) & Int(1 << 10) != 0 { + if Int(_2 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _43 = Api.parse(reader, signature: signature) as? Api.StickerSet } } var _44: Api.BotVerification? - if Int(_2!) & Int(1 << 17) != 0 { + if Int(_2 ?? 0) & Int(1 << 17) != 0 { if let signature = reader.readInt32() { _44 = Api.parse(reader, signature: signature) as? Api.BotVerification } } var _45: Int32? - if Int(_2!) & Int(1 << 18) != 0 { + if Int(_2 ?? 0) & Int(1 << 18) != 0 { _45 = reader.readInt32() } var _46: Int64? - if Int(_2!) & Int(1 << 21) != 0 { + if Int(_2 ?? 0) & Int(1 << 21) != 0 { _46 = reader.readInt64() } var _47: Api.ProfileTab? - if Int(_2!) & Int(1 << 22) != 0 { + if Int(_2 ?? 0) & Int(1 << 22) != 0 { if let signature = reader.readInt32() { _47 = Api.parse(reader, signature: signature) as? Api.ProfileTab } @@ -1961,49 +1961,49 @@ public extension Api { let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 2) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 13) == 0) || _9 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 13) == 0) || _9 != nil let _c10 = _10 != nil let _c11 = _11 != nil let _c12 = _12 != nil let _c13 = _13 != nil let _c14 = _14 != nil - let _c15 = (Int(_1!) & Int(1 << 23) == 0) || _15 != nil + let _c15 = (Int(_1 ?? 0) & Int(1 << 23) == 0) || _15 != nil let _c16 = _16 != nil - let _c17 = (Int(_1!) & Int(1 << 4) == 0) || _17 != nil - let _c18 = (Int(_1!) & Int(1 << 4) == 0) || _18 != nil - let _c19 = (Int(_1!) & Int(1 << 5) == 0) || _19 != nil - let _c20 = (Int(_1!) & Int(1 << 8) == 0) || _20 != nil - let _c21 = (Int(_1!) & Int(1 << 9) == 0) || _21 != nil - let _c22 = (Int(_1!) & Int(1 << 11) == 0) || _22 != nil - let _c23 = (Int(_1!) & Int(1 << 14) == 0) || _23 != nil - let _c24 = (Int(_1!) & Int(1 << 15) == 0) || _24 != nil - let _c25 = (Int(_1!) & Int(1 << 17) == 0) || _25 != nil - let _c26 = (Int(_1!) & Int(1 << 18) == 0) || _26 != nil - let _c27 = (Int(_1!) & Int(1 << 12) == 0) || _27 != nil + let _c17 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _17 != nil + let _c18 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _18 != nil + let _c19 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _19 != nil + let _c20 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _20 != nil + let _c21 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _21 != nil + let _c22 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _22 != nil + let _c23 = (Int(_1 ?? 0) & Int(1 << 14) == 0) || _23 != nil + let _c24 = (Int(_1 ?? 0) & Int(1 << 15) == 0) || _24 != nil + let _c25 = (Int(_1 ?? 0) & Int(1 << 17) == 0) || _25 != nil + let _c26 = (Int(_1 ?? 0) & Int(1 << 18) == 0) || _26 != nil + let _c27 = (Int(_1 ?? 0) & Int(1 << 12) == 0) || _27 != nil let _c28 = _28 != nil - let _c29 = (Int(_1!) & Int(1 << 21) == 0) || _29 != nil - let _c30 = (Int(_1!) & Int(1 << 24) == 0) || _30 != nil - let _c31 = (Int(_1!) & Int(1 << 25) == 0) || _31 != nil - let _c32 = (Int(_1!) & Int(1 << 26) == 0) || _32 != nil - let _c33 = (Int(_1!) & Int(1 << 27) == 0) || _33 != nil - let _c34 = (Int(_1!) & Int(1 << 28) == 0) || _34 != nil - let _c35 = (Int(_1!) & Int(1 << 28) == 0) || _35 != nil - let _c36 = (Int(_1!) & Int(1 << 29) == 0) || _36 != nil - let _c37 = (Int(_1!) & Int(1 << 30) == 0) || _37 != nil - let _c38 = (Int(_2!) & Int(1 << 13) == 0) || _38 != nil - let _c39 = (Int(_2!) & Int(1 << 4) == 0) || _39 != nil - let _c40 = (Int(_2!) & Int(1 << 7) == 0) || _40 != nil - let _c41 = (Int(_2!) & Int(1 << 8) == 0) || _41 != nil - let _c42 = (Int(_2!) & Int(1 << 9) == 0) || _42 != nil - let _c43 = (Int(_2!) & Int(1 << 10) == 0) || _43 != nil - let _c44 = (Int(_2!) & Int(1 << 17) == 0) || _44 != nil - let _c45 = (Int(_2!) & Int(1 << 18) == 0) || _45 != nil - let _c46 = (Int(_2!) & Int(1 << 21) == 0) || _46 != nil - let _c47 = (Int(_2!) & Int(1 << 22) == 0) || _47 != nil + let _c29 = (Int(_1 ?? 0) & Int(1 << 21) == 0) || _29 != nil + let _c30 = (Int(_1 ?? 0) & Int(1 << 24) == 0) || _30 != nil + let _c31 = (Int(_1 ?? 0) & Int(1 << 25) == 0) || _31 != nil + let _c32 = (Int(_1 ?? 0) & Int(1 << 26) == 0) || _32 != nil + let _c33 = (Int(_1 ?? 0) & Int(1 << 27) == 0) || _33 != nil + let _c34 = (Int(_1 ?? 0) & Int(1 << 28) == 0) || _34 != nil + let _c35 = (Int(_1 ?? 0) & Int(1 << 28) == 0) || _35 != nil + let _c36 = (Int(_1 ?? 0) & Int(1 << 29) == 0) || _36 != nil + let _c37 = (Int(_1 ?? 0) & Int(1 << 30) == 0) || _37 != nil + let _c38 = (Int(_2 ?? 0) & Int(1 << 13) == 0) || _38 != nil + let _c39 = (Int(_2 ?? 0) & Int(1 << 4) == 0) || _39 != nil + let _c40 = (Int(_2 ?? 0) & Int(1 << 7) == 0) || _40 != nil + let _c41 = (Int(_2 ?? 0) & Int(1 << 8) == 0) || _41 != nil + let _c42 = (Int(_2 ?? 0) & Int(1 << 9) == 0) || _42 != nil + let _c43 = (Int(_2 ?? 0) & Int(1 << 10) == 0) || _43 != nil + let _c44 = (Int(_2 ?? 0) & Int(1 << 17) == 0) || _44 != nil + let _c45 = (Int(_2 ?? 0) & Int(1 << 18) == 0) || _45 != nil + let _c46 = (Int(_2 ?? 0) & Int(1 << 21) == 0) || _46 != nil + let _c47 = (Int(_2 ?? 0) & Int(1 << 22) == 0) || _47 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 && _c20 && _c21 && _c22 && _c23 && _c24 && _c25 && _c26 && _c27 && _c28 && _c29 && _c30 && _c31 && _c32 && _c33 && _c34 && _c35 && _c36 && _c37 && _c38 && _c39 && _c40 && _c41 && _c42 && _c43 && _c44 && _c45 && _c46 && _c47 { return Api.ChatFull.channelFull(Cons_channelFull(flags: _1!, flags2: _2!, id: _3!, about: _4!, participantsCount: _5, adminsCount: _6, kickedCount: _7, bannedCount: _8, onlineCount: _9, readInboxMaxId: _10!, readOutboxMaxId: _11!, unreadCount: _12!, chatPhoto: _13!, notifySettings: _14!, exportedInvite: _15, botInfo: _16!, migratedFromChatId: _17, migratedFromMaxId: _18, pinnedMsgId: _19, stickerset: _20, availableMinId: _21, folderId: _22, linkedChatId: _23, location: _24, slowmodeSeconds: _25, slowmodeNextSendDate: _26, statsDc: _27, pts: _28!, call: _29, ttlPeriod: _30, pendingSuggestions: _31, groupcallDefaultJoinAs: _32, themeEmoticon: _33, requestsPending: _34, recentRequesters: _35, defaultSendAs: _36, availableReactions: _37, reactionsLimit: _38, stories: _39, wallpaper: _40, boostsApplied: _41, boostsUnrestrict: _42, emojiset: _43, botVerification: _44, stargiftsCount: _45, sendPaidMessagesStars: _46, mainTab: _47)) } @@ -2023,7 +2023,7 @@ public extension Api { _4 = Api.parse(reader, signature: signature) as? Api.ChatParticipants } var _5: Api.Photo? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.Photo } @@ -2033,83 +2033,83 @@ public extension Api { _6 = Api.parse(reader, signature: signature) as? Api.PeerNotifySettings } var _7: Api.ExportedChatInvite? - if Int(_1!) & Int(1 << 13) != 0 { + if Int(_1 ?? 0) & Int(1 << 13) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.ExportedChatInvite } } var _8: [Api.BotInfo]? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let _ = reader.readInt32() { _8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.BotInfo.self) } } var _9: Int32? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { _9 = reader.readInt32() } var _10: Int32? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { _10 = reader.readInt32() } var _11: Api.InputGroupCall? - if Int(_1!) & Int(1 << 12) != 0 { + if Int(_1 ?? 0) & Int(1 << 12) != 0 { if let signature = reader.readInt32() { _11 = Api.parse(reader, signature: signature) as? Api.InputGroupCall } } var _12: Int32? - if Int(_1!) & Int(1 << 14) != 0 { + if Int(_1 ?? 0) & Int(1 << 14) != 0 { _12 = reader.readInt32() } var _13: Api.Peer? - if Int(_1!) & Int(1 << 15) != 0 { + if Int(_1 ?? 0) & Int(1 << 15) != 0 { if let signature = reader.readInt32() { _13 = Api.parse(reader, signature: signature) as? Api.Peer } } var _14: String? - if Int(_1!) & Int(1 << 16) != 0 { + if Int(_1 ?? 0) & Int(1 << 16) != 0 { _14 = parseString(reader) } var _15: Int32? - if Int(_1!) & Int(1 << 17) != 0 { + if Int(_1 ?? 0) & Int(1 << 17) != 0 { _15 = reader.readInt32() } var _16: [Int64]? - if Int(_1!) & Int(1 << 17) != 0 { + if Int(_1 ?? 0) & Int(1 << 17) != 0 { if let _ = reader.readInt32() { _16 = Api.parseVector(reader, elementSignature: 570911930, elementType: Int64.self) } } var _17: Api.ChatReactions? - if Int(_1!) & Int(1 << 18) != 0 { + if Int(_1 ?? 0) & Int(1 << 18) != 0 { if let signature = reader.readInt32() { _17 = Api.parse(reader, signature: signature) as? Api.ChatReactions } } var _18: Int32? - if Int(_1!) & Int(1 << 20) != 0 { + if Int(_1 ?? 0) & Int(1 << 20) != 0 { _18 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 13) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 3) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 6) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 11) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 12) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 14) == 0) || _12 != nil - let _c13 = (Int(_1!) & Int(1 << 15) == 0) || _13 != nil - let _c14 = (Int(_1!) & Int(1 << 16) == 0) || _14 != nil - let _c15 = (Int(_1!) & Int(1 << 17) == 0) || _15 != nil - let _c16 = (Int(_1!) & Int(1 << 17) == 0) || _16 != nil - let _c17 = (Int(_1!) & Int(1 << 18) == 0) || _17 != nil - let _c18 = (Int(_1!) & Int(1 << 20) == 0) || _18 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 13) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 12) == 0) || _11 != nil + let _c12 = (Int(_1 ?? 0) & Int(1 << 14) == 0) || _12 != nil + let _c13 = (Int(_1 ?? 0) & Int(1 << 15) == 0) || _13 != nil + let _c14 = (Int(_1 ?? 0) & Int(1 << 16) == 0) || _14 != nil + let _c15 = (Int(_1 ?? 0) & Int(1 << 17) == 0) || _15 != nil + let _c16 = (Int(_1 ?? 0) & Int(1 << 17) == 0) || _16 != nil + let _c17 = (Int(_1 ?? 0) & Int(1 << 18) == 0) || _17 != nil + let _c18 = (Int(_1 ?? 0) & Int(1 << 20) == 0) || _18 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 { return Api.ChatFull.chatFull(Cons_chatFull(flags: _1!, id: _2!, about: _3!, participants: _4!, chatPhoto: _5, notifySettings: _6!, exportedInvite: _7, botInfo: _8, pinnedMsgId: _9, folderId: _10, call: _11, ttlPeriod: _12, groupcallDefaultJoinAs: _13, themeEmoticon: _14, requestsPending: _15, recentRequesters: _16, availableReactions: _17, reactionsLimit: _18)) } @@ -2236,7 +2236,7 @@ public extension Api { var _2: String? _2 = parseString(reader) var _3: String? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _3 = parseString(reader) } var _4: Api.Photo? @@ -2246,7 +2246,7 @@ public extension Api { var _5: Int32? _5 = reader.readInt32() var _6: [Api.User]? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let _ = reader.readInt32() { _6 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self) } @@ -2254,31 +2254,31 @@ public extension Api { var _7: Int32? _7 = reader.readInt32() var _8: Api.StarsSubscriptionPricing? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.StarsSubscriptionPricing } } var _9: Int64? - if Int(_1!) & Int(1 << 12) != 0 { + if Int(_1 ?? 0) & Int(1 << 12) != 0 { _9 = reader.readInt64() } var _10: Api.BotVerification? - if Int(_1!) & Int(1 << 13) != 0 { + if Int(_1 ?? 0) & Int(1 << 13) != 0 { if let signature = reader.readInt32() { _10 = Api.parse(reader, signature: signature) as? Api.BotVerification } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 5) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 4) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _6 != nil let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 10) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 12) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 13) == 0) || _10 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 12) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 13) == 0) || _10 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 { return Api.ChatInvite.chatInvite(Cons_chatInvite(flags: _1!, title: _2!, about: _3, photo: _4!, participantsCount: _5!, participants: _6, color: _7!, subscriptionPricing: _8, subscriptionFormId: _9, botVerification: _10)) } diff --git a/submodules/TelegramApi/Sources/Api5.swift b/submodules/TelegramApi/Sources/Api5.swift index d5bc6b26a1..a8463caf27 100644 --- a/submodules/TelegramApi/Sources/Api5.swift +++ b/submodules/TelegramApi/Sources/Api5.swift @@ -53,18 +53,18 @@ public extension Api { var _3: Int32? _3 = reader.readInt32() var _4: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _4 = parseString(reader) } var _5: Int64? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _5 = reader.readInt64() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 1) == 0) || _5 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.ChatInviteImporter.chatInviteImporter(Cons_chatInviteImporter(flags: _1!, userId: _2!, date: _3!, about: _4, approvedBy: _5)) } @@ -231,14 +231,14 @@ public extension Api { var _4: Int32? _4 = reader.readInt32() var _5: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _5 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.ChatParticipant.chatParticipant(Cons_chatParticipant(flags: _1!, userId: _2!, inviterId: _3!, date: _4!, rank: _5)) } @@ -256,14 +256,14 @@ public extension Api { var _4: Int32? _4 = reader.readInt32() var _5: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _5 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.ChatParticipant.chatParticipantAdmin(Cons_chatParticipantAdmin(flags: _1!, userId: _2!, inviterId: _3!, date: _4!, rank: _5)) } @@ -277,12 +277,12 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.ChatParticipant.chatParticipantCreator(Cons_chatParticipantCreator(flags: _1!, userId: _2!, rank: _3)) } @@ -384,14 +384,14 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: Api.ChatParticipant? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.ChatParticipant } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.ChatParticipants.chatParticipantsForbidden(Cons_chatParticipantsForbidden(flags: _1!, chatId: _2!, selfParticipant: _3)) } @@ -457,14 +457,14 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: Buffer? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _3 = parseBytes(reader) } var _4: Int32? _4 = reader.readInt32() let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil let _c4 = _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.ChatPhoto.chatPhoto(Cons_chatPhoto(flags: _1!, photoId: _2!, strippedThumb: _3, dcId: _4!)) @@ -709,25 +709,25 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: [Buffer]? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { if let _ = reader.readInt32() { _2 = Api.parseVector(reader, elementSignature: -1255641564, elementType: Buffer.self) } } var _3: String? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { _3 = parseString(reader) } var _4: Api.Bool? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.Bool } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 6) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 8) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 8) == 0) || _4 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.CodeSettings.codeSettings(Cons_codeSettings(flags: _1!, logoutTokens: _2, token: _3, appSandbox: _4)) } @@ -974,7 +974,7 @@ public extension Api { var _24: Int32? _24 = reader.readInt32() var _25: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _25 = reader.readInt32() } var _26: Int32? @@ -988,23 +988,23 @@ public extension Api { var _30: String? _30 = parseString(reader) var _31: String? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { _31 = parseString(reader) } var _32: String? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { _32 = parseString(reader) } var _33: String? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { _33 = parseString(reader) } var _34: String? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { _34 = parseString(reader) } var _35: String? - if Int(_1!) & Int(1 << 12) != 0 { + if Int(_1 ?? 0) & Int(1 << 12) != 0 { _35 = parseString(reader) } var _36: Int32? @@ -1014,25 +1014,25 @@ public extension Api { var _38: Int32? _38 = reader.readInt32() var _39: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _39 = parseString(reader) } var _40: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _40 = reader.readInt32() } var _41: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _41 = reader.readInt32() } var _42: Api.Reaction? - if Int(_1!) & Int(1 << 15) != 0 { + if Int(_1 ?? 0) & Int(1 << 15) != 0 { if let signature = reader.readInt32() { _42 = Api.parse(reader, signature: signature) as? Api.Reaction } } var _43: String? - if Int(_1!) & Int(1 << 16) != 0 { + if Int(_1 ?? 0) & Int(1 << 16) != 0 { _43 = parseString(reader) } let _c1 = _1 != nil @@ -1059,25 +1059,25 @@ public extension Api { let _c22 = _22 != nil let _c23 = _23 != nil let _c24 = _24 != nil - let _c25 = (Int(_1!) & Int(1 << 0) == 0) || _25 != nil + let _c25 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _25 != nil let _c26 = _26 != nil let _c27 = _27 != nil let _c28 = _28 != nil let _c29 = _29 != nil let _c30 = _30 != nil - let _c31 = (Int(_1!) & Int(1 << 7) == 0) || _31 != nil - let _c32 = (Int(_1!) & Int(1 << 9) == 0) || _32 != nil - let _c33 = (Int(_1!) & Int(1 << 10) == 0) || _33 != nil - let _c34 = (Int(_1!) & Int(1 << 11) == 0) || _34 != nil - let _c35 = (Int(_1!) & Int(1 << 12) == 0) || _35 != nil + let _c31 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _31 != nil + let _c32 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _32 != nil + let _c33 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _33 != nil + let _c34 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _34 != nil + let _c35 = (Int(_1 ?? 0) & Int(1 << 12) == 0) || _35 != nil let _c36 = _36 != nil let _c37 = _37 != nil let _c38 = _38 != nil - let _c39 = (Int(_1!) & Int(1 << 2) == 0) || _39 != nil - let _c40 = (Int(_1!) & Int(1 << 2) == 0) || _40 != nil - let _c41 = (Int(_1!) & Int(1 << 2) == 0) || _41 != nil - let _c42 = (Int(_1!) & Int(1 << 15) == 0) || _42 != nil - let _c43 = (Int(_1!) & Int(1 << 16) == 0) || _43 != nil + let _c39 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _39 != nil + let _c40 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _40 != nil + let _c41 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _41 != nil + let _c42 = (Int(_1 ?? 0) & Int(1 << 15) == 0) || _42 != nil + let _c43 = (Int(_1 ?? 0) & Int(1 << 16) == 0) || _43 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 && _c20 && _c21 && _c22 && _c23 && _c24 && _c25 && _c26 && _c27 && _c28 && _c29 && _c30 && _c31 && _c32 && _c33 && _c34 && _c35 && _c36 && _c37 && _c38 && _c39 && _c40 && _c41 && _c42 && _c43 { return Api.Config.config(Cons_config(flags: _1!, date: _2!, expires: _3!, testMode: _4!, thisDc: _5!, dcOptions: _6!, dcTxtDomainName: _7!, chatSizeMax: _8!, megagroupSizeMax: _9!, forwardedCountMax: _10!, onlineUpdatePeriodMs: _11!, offlineBlurTimeoutMs: _12!, offlineIdleTimeoutMs: _13!, onlineCloudTimeoutMs: _14!, notifyCloudDelayMs: _15!, notifyDefaultDelayMs: _16!, pushChatPeriodMs: _17!, pushChatLimit: _18!, editTimeLimit: _19!, revokeTimeLimit: _20!, revokePmTimeLimit: _21!, ratingEDecay: _22!, stickersRecentLimit: _23!, channelsReadMediaPeriod: _24!, tmpSessions: _25, callReceiveTimeoutMs: _26!, callRingTimeoutMs: _27!, callConnectTimeoutMs: _28!, callPacketTimeoutMs: _29!, meUrlPrefix: _30!, autoupdateUrlPrefix: _31, gifSearchUsername: _32, venueSearchUsername: _33, imgSearchUsername: _34, staticMapsProvider: _35, captionLengthMax: _36!, messageLengthMax: _37!, webfileDcId: _38!, suggestedLangCode: _39, langPackVersion: _40, baseLangPackVersion: _41, reactionsDefault: _42, autologinToken: _43)) } @@ -1219,7 +1219,7 @@ public extension Api { var _5: Int32? _5 = reader.readInt32() var _6: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _6 = reader.readInt32() } var _7: Int64? @@ -1231,7 +1231,7 @@ public extension Api { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil let _c7 = _7 != nil let _c8 = _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { @@ -1498,14 +1498,14 @@ public extension Api { var _4: Int32? _4 = reader.readInt32() var _5: Buffer? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { _5 = parseBytes(reader) } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 10) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.DcOption.dcOption(Cons_dcOption(flags: _1!, id: _2!, ipAddress: _3!, port: _4!, secret: _5)) } @@ -1702,21 +1702,21 @@ public extension Api { _10 = Api.parse(reader, signature: signature) as? Api.PeerNotifySettings } var _11: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _11 = reader.readInt32() } var _12: Api.DraftMessage? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _12 = Api.parse(reader, signature: signature) as? Api.DraftMessage } } var _13: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _13 = reader.readInt32() } var _14: Int32? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _14 = reader.readInt32() } let _c1 = _1 != nil @@ -1729,10 +1729,10 @@ public extension Api { let _c8 = _8 != nil let _c9 = _9 != nil let _c10 = _10 != nil - let _c11 = (Int(_1!) & Int(1 << 0) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 1) == 0) || _12 != nil - let _c13 = (Int(_1!) & Int(1 << 4) == 0) || _13 != nil - let _c14 = (Int(_1!) & Int(1 << 5) == 0) || _14 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _11 != nil + let _c12 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _12 != nil + let _c13 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _13 != nil + let _c14 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _14 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 { return Api.Dialog.dialog(Cons_dialog(flags: _1!, peer: _2!, topMessage: _3!, readInboxMaxId: _4!, readOutboxMaxId: _5!, unreadCount: _6!, unreadMentionsCount: _7!, unreadReactionsCount: _8!, unreadPollVotesCount: _9!, notifySettings: _10!, pts: _11, draft: _12, folderId: _13, ttlPeriod: _14)) } @@ -1912,11 +1912,11 @@ public extension Api { _3 = Api.parse(reader, signature: signature) as? Api.TextWithEntities } var _4: String? - if Int(_1!) & Int(1 << 25) != 0 { + if Int(_1 ?? 0) & Int(1 << 25) != 0 { _4 = parseString(reader) } var _5: Int32? - if Int(_1!) & Int(1 << 27) != 0 { + if Int(_1 ?? 0) & Int(1 << 27) != 0 { _5 = reader.readInt32() } var _6: [Api.InputPeer]? @@ -1934,8 +1934,8 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 25) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 27) == 0) || _5 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 25) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 27) == 0) || _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil let _c8 = _8 != nil @@ -1956,11 +1956,11 @@ public extension Api { _3 = Api.parse(reader, signature: signature) as? Api.TextWithEntities } var _4: String? - if Int(_1!) & Int(1 << 25) != 0 { + if Int(_1 ?? 0) & Int(1 << 25) != 0 { _4 = parseString(reader) } var _5: Int32? - if Int(_1!) & Int(1 << 27) != 0 { + if Int(_1 ?? 0) & Int(1 << 27) != 0 { _5 = reader.readInt32() } var _6: [Api.InputPeer]? @@ -1974,8 +1974,8 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 25) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 27) == 0) || _5 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 25) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 27) == 0) || _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { diff --git a/submodules/TelegramApi/Sources/Api6.swift b/submodules/TelegramApi/Sources/Api6.swift index 355cd7863e..5fce4f058c 100644 --- a/submodules/TelegramApi/Sources/Api6.swift +++ b/submodules/TelegramApi/Sources/Api6.swift @@ -153,13 +153,13 @@ public extension Api { var _7: Int64? _7 = reader.readInt64() var _8: [Api.PhotoSize]? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _8 = Api.parseVector(reader, elementSignature: 0, elementType: Api.PhotoSize.self) } } var _9: [Api.VideoSize]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _9 = Api.parseVector(reader, elementSignature: 0, elementType: Api.VideoSize.self) } @@ -177,8 +177,8 @@ public extension Api { let _c5 = _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 0) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 1) == 0) || _9 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _9 != nil let _c10 = _10 != nil let _c11 = _11 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { @@ -409,22 +409,22 @@ public extension Api { var _2: Int32? _2 = reader.readInt32() var _3: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = parseString(reader) } var _4: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = parseString(reader) } var _5: Buffer? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = parseBytes(reader) } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.DocumentAttribute.documentAttributeAudio(Cons_documentAttributeAudio(flags: _1!, duration: _2!, title: _3, performer: _4, waveform: _5)) } @@ -489,7 +489,7 @@ public extension Api { _3 = Api.parse(reader, signature: signature) as? Api.InputStickerSet } var _4: Api.MaskCoords? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.MaskCoords } @@ -497,7 +497,7 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.DocumentAttribute.documentAttributeSticker(Cons_documentAttributeSticker(flags: _1!, alt: _2!, stickerset: _3!, maskCoords: _4)) } @@ -515,24 +515,24 @@ public extension Api { var _4: Int32? _4 = reader.readInt32() var _5: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = reader.readInt32() } var _6: Double? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _6 = reader.readDouble() } var _7: String? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _7 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 4) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 5) == 0) || _7 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { return Api.DocumentAttribute.documentAttributeVideo(Cons_documentAttributeVideo(flags: _1!, duration: _2!, w: _3!, h: _4!, preloadPrefixSize: _5, videoStartTs: _6, videoCodec: _7)) } @@ -635,7 +635,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.InputReplyTo? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.InputReplyTo } @@ -643,13 +643,13 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let _ = reader.readInt32() { _4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } } var _5: Api.InputMedia? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.InputMedia } @@ -657,23 +657,23 @@ public extension Api { var _6: Int32? _6 = reader.readInt32() var _7: Int64? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { _7 = reader.readInt64() } var _8: Api.SuggestedPost? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.SuggestedPost } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 4) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 5) == 0) || _5 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _5 != nil let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 7) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 8) == 0) || _8 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.DraftMessage.draftMessage(Cons_draftMessage(flags: _1!, replyTo: _2, message: _3!, entities: _4, media: _5, date: _6!, effect: _7, suggestedPost: _8)) } @@ -685,11 +685,11 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = reader.readInt32() } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil if _c1 && _c2 { return Api.DraftMessage.draftMessageEmpty(Cons_draftMessageEmpty(flags: _1!, date: _2)) } @@ -1422,12 +1422,12 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.EmojiStatus.emojiStatus(Cons_emojiStatus(flags: _1!, documentId: _2!, until: _3)) } @@ -1457,7 +1457,7 @@ public extension Api { var _10: Int32? _10 = reader.readInt32() var _11: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _11 = reader.readInt32() } let _c1 = _1 != nil @@ -1470,7 +1470,7 @@ public extension Api { let _c8 = _8 != nil let _c9 = _9 != nil let _c10 = _10 != nil - let _c11 = (Int(_1!) & Int(1 << 0) == 0) || _11 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _11 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { return Api.EmojiStatus.emojiStatusCollectible(Cons_emojiStatusCollectible(flags: _1!, collectibleId: _2!, documentId: _3!, title: _4!, slug: _5!, patternDocumentId: _6!, centerColor: _7!, edgeColor: _8!, patternColor: _9!, textColor: _10!, until: _11)) } @@ -1487,12 +1487,12 @@ public extension Api { var _2: Int64? _2 = reader.readInt64() var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.EmojiStatus.inputEmojiStatusCollectible(Cons_inputEmojiStatusCollectible(flags: _1!, collectibleId: _2!, until: _3)) } diff --git a/submodules/TelegramApi/Sources/Api7.swift b/submodules/TelegramApi/Sources/Api7.swift index 035ec1c502..38afddaed2 100644 --- a/submodules/TelegramApi/Sources/Api7.swift +++ b/submodules/TelegramApi/Sources/Api7.swift @@ -259,7 +259,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _2 = reader.readInt32() } var _3: Int32? @@ -275,7 +275,7 @@ public extension Api { var _8: Buffer? _8 = parseBytes(reader) let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil @@ -608,35 +608,35 @@ public extension Api { var _4: Int32? _4 = reader.readInt32() var _5: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _5 = reader.readInt32() } var _6: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _6 = reader.readInt32() } var _7: Int32? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _7 = reader.readInt32() } var _8: Int32? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _8 = reader.readInt32() } var _9: Int32? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { _9 = reader.readInt32() } var _10: Int32? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { _10 = reader.readInt32() } var _11: String? - if Int(_1!) & Int(1 << 8) != 0 { + if Int(_1 ?? 0) & Int(1 << 8) != 0 { _11 = parseString(reader) } var _12: Api.StarsSubscriptionPricing? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { if let signature = reader.readInt32() { _12 = Api.parse(reader, signature: signature) as? Api.StarsSubscriptionPricing } @@ -645,14 +645,14 @@ public extension Api { let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 4) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 1) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 2) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 3) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 7) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 10) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 8) == 0) || _11 != nil - let _c12 = (Int(_1!) & Int(1 << 9) == 0) || _12 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 8) == 0) || _11 != nil + let _c12 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _12 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 { return Api.ExportedChatInvite.chatInviteExported(Cons_chatInviteExported(flags: _1!, link: _2!, adminId: _3!, date: _4!, startDate: _5, expireDate: _6, usageLimit: _7, usage: _8, requested: _9, subscriptionExpired: _10, title: _11, subscriptionPricing: _12)) } @@ -925,11 +925,11 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _2 = parseString(reader) } var _3: Api.TextWithEntities? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.TextWithEntities } @@ -937,8 +937,8 @@ public extension Api { var _4: Int64? _4 = reader.readInt64() let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil let _c4 = _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.FactCheck.factCheck(Cons_factCheck(flags: _1!, country: _2, text: _3, hash: _4!)) @@ -1055,7 +1055,7 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: Api.ChatPhoto? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.ChatPhoto } @@ -1063,7 +1063,7 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.Folder.folder(Cons_folder(flags: _1!, id: _2!, title: _3!, photo: _4)) } @@ -1242,7 +1242,7 @@ public extension Api { var _6: Int32? _6 = reader.readInt32() var _7: Int64? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _7 = reader.readInt64() } var _8: Int32? @@ -1268,7 +1268,7 @@ public extension Api { _16 = Api.parse(reader, signature: signature) as? Api.PeerNotifySettings } var _17: Api.DraftMessage? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let signature = reader.readInt32() { _17 = Api.parse(reader, signature: signature) as? Api.DraftMessage } @@ -1279,7 +1279,7 @@ public extension Api { let _c4 = _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil - let _c7 = (Int(_1!) & Int(1 << 0) == 0) || _7 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _7 != nil let _c8 = _8 != nil let _c9 = _9 != nil let _c10 = _10 != nil @@ -1289,7 +1289,7 @@ public extension Api { let _c14 = _14 != nil let _c15 = _15 != nil let _c16 = _16 != nil - let _c17 = (Int(_1!) & Int(1 << 4) == 0) || _17 != nil + let _c17 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _17 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 { return Api.ForumTopic.forumTopic(Cons_forumTopic(flags: _1!, id: _2!, date: _3!, peer: _4!, title: _5!, iconColor: _6!, iconEmojiId: _7, topMessage: _8!, readInboxMaxId: _9!, readOutboxMaxId: _10!, unreadCount: _11!, unreadMentionsCount: _12!, unreadReactionsCount: _13!, unreadPollVotesCount: _14!, fromId: _15!, notifySettings: _16!, draft: _17)) } @@ -1436,7 +1436,7 @@ public extension Api { _7 = Api.parse(reader, signature: signature) as? Api.Photo } var _8: Api.Document? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.Document } @@ -1448,7 +1448,7 @@ public extension Api { let _c5 = _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 0) == 0) || _8 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.Game.game(Cons_game(flags: _1!, id: _2!, accessHash: _3!, shortName: _4!, title: _5!, description: _6!, photo: _7!, document: _8)) } @@ -1521,14 +1521,14 @@ public extension Api { var _4: Int64? _4 = reader.readInt64() var _5: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _5 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.GeoPoint.geoPoint(Cons_geoPoint(flags: _1!, long: _2!, lat: _3!, accessHash: _4!, accuracyRadius: _5)) } @@ -1596,22 +1596,22 @@ public extension Api { var _2: String? _2 = parseString(reader) var _3: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = parseString(reader) } var _4: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = parseString(reader) } var _5: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.GeoPointAddress.geoPointAddress(Cons_geoPointAddress(flags: _1!, countryIso2: _2!, state: _3, city: _4, street: _5)) } @@ -1666,18 +1666,18 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Int64? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _2 = reader.readInt64() } var _3: Api.DisallowedGiftsSettings? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.DisallowedGiftsSettings } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 5) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 6) == 0) || _3 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.GlobalPrivacySettings.globalPrivacySettings(Cons_globalPrivacySettings(flags: _1!, noncontactPeersPaidStars: _2, disallowedGifts: _3)) } @@ -1807,23 +1807,23 @@ public extension Api { var _4: Int32? _4 = reader.readInt32() var _5: String? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _5 = parseString(reader) } var _6: Int32? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { _6 = reader.readInt32() } var _7: Int32? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { _7 = reader.readInt32() } var _8: Int32? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { _8 = reader.readInt32() } var _9: Int32? - if Int(_1!) & Int(1 << 10) != 0 { + if Int(_1 ?? 0) & Int(1 << 10) != 0 { _9 = reader.readInt32() } var _10: Int32? @@ -1831,15 +1831,15 @@ public extension Api { var _11: Int32? _11 = reader.readInt32() var _12: String? - if Int(_1!) & Int(1 << 16) != 0 { + if Int(_1 ?? 0) & Int(1 << 16) != 0 { _12 = parseString(reader) } var _13: Int64? - if Int(_1!) & Int(1 << 20) != 0 { + if Int(_1 ?? 0) & Int(1 << 20) != 0 { _13 = reader.readInt64() } var _14: Api.Peer? - if Int(_1!) & Int(1 << 21) != 0 { + if Int(_1 ?? 0) & Int(1 << 21) != 0 { if let signature = reader.readInt32() { _14 = Api.parse(reader, signature: signature) as? Api.Peer } @@ -1848,16 +1848,16 @@ public extension Api { let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 4) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 5) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 7) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 10) == 0) || _9 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 10) == 0) || _9 != nil let _c10 = _10 != nil let _c11 = _11 != nil - let _c12 = (Int(_1!) & Int(1 << 16) == 0) || _12 != nil - let _c13 = (Int(_1!) & Int(1 << 20) == 0) || _13 != nil - let _c14 = (Int(_1!) & Int(1 << 21) == 0) || _14 != nil + let _c12 = (Int(_1 ?? 0) & Int(1 << 16) == 0) || _12 != nil + let _c13 = (Int(_1 ?? 0) & Int(1 << 20) == 0) || _13 != nil + let _c14 = (Int(_1 ?? 0) & Int(1 << 21) == 0) || _14 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 { return Api.GroupCall.groupCall(Cons_groupCall(flags: _1!, id: _2!, accessHash: _3!, participantsCount: _4!, title: _5, streamDcId: _6, recordStartDate: _7, scheduleDate: _8, unmutedVideoCount: _9, unmutedVideoLimit: _10!, version: _11!, inviteLink: _12, sendPaidMessagesStars: _13, defaultSendAs: _14)) } @@ -1927,7 +1927,7 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.Peer? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.Peer } @@ -1935,7 +1935,7 @@ public extension Api { var _3: Int64? _3 = reader.readInt64() let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 3) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _2 != nil let _c3 = _3 != nil if _c1 && _c2 && _c3 { return Api.GroupCallDonor.groupCallDonor(Cons_groupCallDonor(flags: _1!, peerId: _2, stars: _3!)) @@ -2010,7 +2010,7 @@ public extension Api { _5 = Api.parse(reader, signature: signature) as? Api.TextWithEntities } var _6: Int64? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _6 = reader.readInt64() } let _c1 = _1 != nil @@ -2018,7 +2018,7 @@ public extension Api { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.GroupCallMessage.groupCallMessage(Cons_groupCallMessage(flags: _1!, id: _2!, fromId: _3!, date: _4!, message: _5!, paidMessageStars: _6)) } diff --git a/submodules/TelegramApi/Sources/Api8.swift b/submodules/TelegramApi/Sources/Api8.swift index 05c7d7bfde..6d78d0b9ed 100644 --- a/submodules/TelegramApi/Sources/Api8.swift +++ b/submodules/TelegramApi/Sources/Api8.swift @@ -83,50 +83,50 @@ public extension Api { var _3: Int32? _3 = reader.readInt32() var _4: Int32? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _4 = reader.readInt32() } var _5: Int32? _5 = reader.readInt32() var _6: Int32? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { _6 = reader.readInt32() } var _7: String? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { _7 = parseString(reader) } var _8: Int64? - if Int(_1!) & Int(1 << 13) != 0 { + if Int(_1 ?? 0) & Int(1 << 13) != 0 { _8 = reader.readInt64() } var _9: Api.GroupCallParticipantVideo? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { if let signature = reader.readInt32() { _9 = Api.parse(reader, signature: signature) as? Api.GroupCallParticipantVideo } } var _10: Api.GroupCallParticipantVideo? - if Int(_1!) & Int(1 << 14) != 0 { + if Int(_1 ?? 0) & Int(1 << 14) != 0 { if let signature = reader.readInt32() { _10 = Api.parse(reader, signature: signature) as? Api.GroupCallParticipantVideo } } var _11: Int64? - if Int(_1!) & Int(1 << 16) != 0 { + if Int(_1 ?? 0) & Int(1 << 16) != 0 { _11 = reader.readInt64() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 3) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 7) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 11) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 13) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 6) == 0) || _9 != nil - let _c10 = (Int(_1!) & Int(1 << 14) == 0) || _10 != nil - let _c11 = (Int(_1!) & Int(1 << 16) == 0) || _11 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 13) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _9 != nil + let _c10 = (Int(_1 ?? 0) & Int(1 << 14) == 0) || _10 != nil + let _c11 = (Int(_1 ?? 0) & Int(1 << 16) == 0) || _11 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 { return Api.GroupCallParticipant.groupCallParticipant(Cons_groupCallParticipant(flags: _1!, peer: _2!, date: _3!, activeDate: _4, source: _5!, volume: _6, about: _7, raiseHandRating: _8, video: _9, presentation: _10, paidStarsTotal: _11)) } @@ -192,13 +192,13 @@ public extension Api { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.GroupCallParticipantVideoSourceGroup.self) } var _4: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = reader.readInt32() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.GroupCallParticipantVideo.groupCallParticipantVideo(Cons_groupCallParticipantVideo(flags: _1!, endpoint: _2!, sourceGroups: _3!, audioSource: _4)) } @@ -1177,13 +1177,13 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 2) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _2 != nil if _c1 && _c2 { return Api.InputBotInlineMessage.inputBotInlineMessageGame(Cons_inputBotInlineMessageGame(flags: _1!, replyMarkup: _2)) } @@ -1197,21 +1197,21 @@ public extension Api { var _2: String? _2 = parseString(reader) var _3: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } } var _4: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.InputBotInlineMessage.inputBotInlineMessageMediaAuto(Cons_inputBotInlineMessageMediaAuto(flags: _1!, message: _2!, entities: _3, replyMarkup: _4)) } @@ -1231,7 +1231,7 @@ public extension Api { var _5: String? _5 = parseString(reader) var _6: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup } @@ -1241,7 +1241,7 @@ public extension Api { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.InputBotInlineMessage.inputBotInlineMessageMediaContact(Cons_inputBotInlineMessageMediaContact(flags: _1!, phoneNumber: _2!, firstName: _3!, lastName: _4!, vcard: _5!, replyMarkup: _6)) } @@ -1257,29 +1257,29 @@ public extension Api { _2 = Api.parse(reader, signature: signature) as? Api.InputGeoPoint } var _3: Int32? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = reader.readInt32() } var _4: Int32? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = reader.readInt32() } var _5: Int32? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _5 = reader.readInt32() } var _6: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.InputBotInlineMessage.inputBotInlineMessageMediaGeo(Cons_inputBotInlineMessageMediaGeo(flags: _1!, geoPoint: _2!, heading: _3, period: _4, proximityNotificationRadius: _5, replyMarkup: _6)) } @@ -1295,7 +1295,7 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: Api.InputWebDocument? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.InputWebDocument } @@ -1313,7 +1313,7 @@ public extension Api { _8 = Api.parse(reader, signature: signature) as? Api.DataJSON } var _9: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _9 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup } @@ -1321,12 +1321,12 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil let _c5 = _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil let _c8 = _8 != nil - let _c9 = (Int(_1!) & Int(1 << 2) == 0) || _9 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _9 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { return Api.InputBotInlineMessage.inputBotInlineMessageMediaInvoice(Cons_inputBotInlineMessageMediaInvoice(flags: _1!, title: _2!, description: _3!, photo: _4, invoice: _5!, payload: _6!, provider: _7!, providerData: _8!, replyMarkup: _9)) } @@ -1352,7 +1352,7 @@ public extension Api { var _7: String? _7 = parseString(reader) var _8: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup } @@ -1364,7 +1364,7 @@ public extension Api { let _c5 = _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil - let _c8 = (Int(_1!) & Int(1 << 2) == 0) || _8 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return Api.InputBotInlineMessage.inputBotInlineMessageMediaVenue(Cons_inputBotInlineMessageMediaVenue(flags: _1!, geoPoint: _2!, title: _3!, address: _4!, provider: _5!, venueId: _6!, venueType: _7!, replyMarkup: _8)) } @@ -1378,7 +1378,7 @@ public extension Api { var _2: String? _2 = parseString(reader) var _3: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } @@ -1386,16 +1386,16 @@ public extension Api { var _4: String? _4 = parseString(reader) var _5: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.InputBotInlineMessage.inputBotInlineMessageMediaWebPage(Cons_inputBotInlineMessageMediaWebPage(flags: _1!, message: _2!, entities: _3, url: _4!, replyMarkup: _5)) } @@ -1409,21 +1409,21 @@ public extension Api { var _2: String? _2 = parseString(reader) var _3: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } } var _4: Api.ReplyMarkup? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.ReplyMarkup } } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.InputBotInlineMessage.inputBotInlineMessageText(Cons_inputBotInlineMessageText(flags: _1!, message: _2!, entities: _3, replyMarkup: _4)) } @@ -1700,25 +1700,25 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = parseString(reader) } var _5: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = parseString(reader) } var _6: String? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _6 = parseString(reader) } var _7: Api.InputWebDocument? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let signature = reader.readInt32() { _7 = Api.parse(reader, signature: signature) as? Api.InputWebDocument } } var _8: Api.InputWebDocument? - if Int(_1!) & Int(1 << 5) != 0 { + if Int(_1 ?? 0) & Int(1 << 5) != 0 { if let signature = reader.readInt32() { _8 = Api.parse(reader, signature: signature) as? Api.InputWebDocument } @@ -1730,11 +1730,11 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 3) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 4) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 5) == 0) || _8 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 5) == 0) || _8 != nil let _c9 = _9 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { return Api.InputBotInlineResult.inputBotInlineResult(Cons_inputBotInlineResult(flags: _1!, id: _2!, type: _3!, title: _4, description: _5, url: _6, thumb: _7, content: _8, sendMessage: _9!)) @@ -1751,11 +1751,11 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = parseString(reader) } var _5: String? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = parseString(reader) } var _6: Api.InputDocument? @@ -1769,8 +1769,8 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil let _c6 = _6 != nil let _c7 = _7 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 { diff --git a/submodules/TelegramApi/Sources/Api9.swift b/submodules/TelegramApi/Sources/Api9.swift index 2215b0b419..aacd42f393 100644 --- a/submodules/TelegramApi/Sources/Api9.swift +++ b/submodules/TelegramApi/Sources/Api9.swift @@ -117,20 +117,20 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: [Api.InputUser]? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let _ = reader.readInt32() { _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputUser.self) } } var _3: [Api.InputUser]? - if Int(_1!) & Int(1 << 6) != 0 { + if Int(_1 ?? 0) & Int(1 << 6) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputUser.self) } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 4) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 6) == 0) || _3 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 6) == 0) || _3 != nil if _c1 && _c2 && _c3 { return Api.InputBusinessBotRecipients.inputBusinessBotRecipients(Cons_inputBusinessBotRecipients(flags: _1!, users: _2, excludeUsers: _3)) } @@ -194,19 +194,19 @@ public extension Api { var _2: String? _2 = parseString(reader) var _3: [Api.MessageEntity]? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let _ = reader.readInt32() { _3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.MessageEntity.self) } } var _4: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = parseString(reader) } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.InputBusinessChatLink.inputBusinessChatLink(Cons_inputBusinessChatLink(flags: _1!, message: _2!, entities: _3, title: _4)) } @@ -324,7 +324,7 @@ public extension Api { var _3: String? _3 = parseString(reader) var _4: Api.InputDocument? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _4 = Api.parse(reader, signature: signature) as? Api.InputDocument } @@ -332,7 +332,7 @@ public extension Api { let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil - let _c4 = (Int(_1!) & Int(1 << 0) == 0) || _4 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _4 != nil if _c1 && _c2 && _c3 && _c4 { return Api.InputBusinessIntro.inputBusinessIntro(Cons_inputBusinessIntro(flags: _1!, title: _2!, description: _3!, sticker: _4)) } @@ -386,13 +386,13 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: [Api.InputUser]? - if Int(_1!) & Int(1 << 4) != 0 { + if Int(_1 ?? 0) & Int(1 << 4) != 0 { if let _ = reader.readInt32() { _2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.InputUser.self) } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 4) == 0) || _2 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 4) == 0) || _2 != nil if _c1 && _c2 { return Api.InputBusinessRecipients.inputBusinessRecipients(Cons_inputBusinessRecipients(flags: _1!, users: _2)) } @@ -603,32 +603,32 @@ public extension Api { var _1: Int32? _1 = reader.readInt32() var _2: Api.InputFile? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _2 = Api.parse(reader, signature: signature) as? Api.InputFile } } var _3: Api.InputFile? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { if let signature = reader.readInt32() { _3 = Api.parse(reader, signature: signature) as? Api.InputFile } } var _4: Double? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _4 = reader.readDouble() } var _5: Api.VideoSize? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { if let signature = reader.readInt32() { _5 = Api.parse(reader, signature: signature) as? Api.VideoSize } } let _c1 = _1 != nil - let _c2 = (Int(_1!) & Int(1 << 0) == 0) || _2 != nil - let _c3 = (Int(_1!) & Int(1 << 1) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 2) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 3) == 0) || _5 != nil + let _c2 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _2 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return Api.InputChatPhoto.inputChatUploadedPhoto(Cons_inputChatUploadedPhoto(flags: _1!, file: _2, video: _3, videoStartTs: _4, videoEmojiMarkup: _5)) } @@ -1016,7 +1016,7 @@ public extension Api { var _5: String? _5 = parseString(reader) var _6: Api.TextWithEntities? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { if let signature = reader.readInt32() { _6 = Api.parse(reader, signature: signature) as? Api.TextWithEntities } @@ -1026,7 +1026,7 @@ public extension Api { let _c3 = _3 != nil let _c4 = _4 != nil let _c5 = _5 != nil - let _c6 = (Int(_1!) & Int(1 << 0) == 0) || _6 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _6 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 { return Api.InputContact.inputPhoneContact(Cons_inputPhoneContact(flags: _1!, clientId: _2!, phone: _3!, firstName: _4!, lastName: _5!, note: _6)) } diff --git a/submodules/TelegramApi/Sources/SecretApiLayer101.swift b/submodules/TelegramApi/Sources/SecretApiLayer101.swift index 9535ff9708..1d9d2acc95 100644 --- a/submodules/TelegramApi/Sources/SecretApiLayer101.swift +++ b/submodules/TelegramApi/Sources/SecretApiLayer101.swift @@ -231,38 +231,38 @@ public struct SecretApi101 { var _4: String? _4 = parseString(reader) var _5: SecretApi101.DecryptedMessageMedia? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { if let signature = reader.readInt32() { _5 = SecretApi101.parse(reader, signature: signature) as? SecretApi101.DecryptedMessageMedia } } var _6: [SecretApi101.MessageEntity]? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { if let _ = reader.readInt32() { _6 = SecretApi101.parseVector(reader, elementSignature: 0, elementType: SecretApi101.MessageEntity.self) } } var _7: String? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { _7 = parseString(reader) } var _8: Int64? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _8 = reader.readInt64() } var _9: Int64? - if Int(_1!) & Int(1 << 17) != 0 { + if Int(_1 ?? 0) & Int(1 << 17) != 0 { _9 = reader.readInt64() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 9) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 7) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 11) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 3) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 17) == 0) || _9 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 17) == 0) || _9 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { return SecretApi101.DecryptedMessage.decryptedMessage(flags: _1!, randomId: _2!, ttl: _3!, message: _4!, media: _5, entities: _6, viaBotName: _7, replyToRandomId: _8, groupedId: _9) } @@ -1048,22 +1048,22 @@ public struct SecretApi101 { var _2: Int32? _2 = reader.readInt32() var _3: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = parseString(reader) } var _4: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = parseString(reader) } var _5: Buffer? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = parseBytes(reader) } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return SecretApi101.DocumentAttribute.documentAttributeAudio(flags: _1!, duration: _2!, title: _3, performer: _4, waveform: _5) } diff --git a/submodules/TelegramApi/Sources/SecretApiLayer143.swift b/submodules/TelegramApi/Sources/SecretApiLayer143.swift index a790be1740..2cc35b0c6e 100644 --- a/submodules/TelegramApi/Sources/SecretApiLayer143.swift +++ b/submodules/TelegramApi/Sources/SecretApiLayer143.swift @@ -231,38 +231,38 @@ public struct SecretApi143 { var _4: String? _4 = parseString(reader) var _5: SecretApi143.DecryptedMessageMedia? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { if let signature = reader.readInt32() { _5 = SecretApi143.parse(reader, signature: signature) as? SecretApi143.DecryptedMessageMedia } } var _6: [SecretApi143.MessageEntity]? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { if let _ = reader.readInt32() { _6 = SecretApi143.parseVector(reader, elementSignature: 0, elementType: SecretApi143.MessageEntity.self) } } var _7: String? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { _7 = parseString(reader) } var _8: Int64? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _8 = reader.readInt64() } var _9: Int64? - if Int(_1!) & Int(1 << 17) != 0 { + if Int(_1 ?? 0) & Int(1 << 17) != 0 { _9 = reader.readInt64() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 9) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 7) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 11) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 3) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 17) == 0) || _9 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 17) == 0) || _9 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { return SecretApi143.DecryptedMessage.decryptedMessage(flags: _1!, randomId: _2!, ttl: _3!, message: _4!, media: _5, entities: _6, viaBotName: _7, replyToRandomId: _8, groupedId: _9) } @@ -1048,22 +1048,22 @@ public struct SecretApi143 { var _2: Int32? _2 = reader.readInt32() var _3: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = parseString(reader) } var _4: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = parseString(reader) } var _5: Buffer? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = parseBytes(reader) } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return SecretApi143.DocumentAttribute.documentAttributeAudio(flags: _1!, duration: _2!, title: _3, performer: _4, waveform: _5) } diff --git a/submodules/TelegramApi/Sources/SecretApiLayer144.swift b/submodules/TelegramApi/Sources/SecretApiLayer144.swift index 5fc560d44e..99b74b877c 100644 --- a/submodules/TelegramApi/Sources/SecretApiLayer144.swift +++ b/submodules/TelegramApi/Sources/SecretApiLayer144.swift @@ -233,38 +233,38 @@ public struct SecretApi144 { var _4: String? _4 = parseString(reader) var _5: SecretApi144.DecryptedMessageMedia? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { if let signature = reader.readInt32() { _5 = SecretApi144.parse(reader, signature: signature) as? SecretApi144.DecryptedMessageMedia } } var _6: [SecretApi144.MessageEntity]? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { if let _ = reader.readInt32() { _6 = SecretApi144.parseVector(reader, elementSignature: 0, elementType: SecretApi144.MessageEntity.self) } } var _7: String? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { _7 = parseString(reader) } var _8: Int64? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _8 = reader.readInt64() } var _9: Int64? - if Int(_1!) & Int(1 << 17) != 0 { + if Int(_1 ?? 0) & Int(1 << 17) != 0 { _9 = reader.readInt64() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 9) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 7) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 11) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 3) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 17) == 0) || _9 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 17) == 0) || _9 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { return SecretApi144.DecryptedMessage.decryptedMessage(flags: _1!, randomId: _2!, ttl: _3!, message: _4!, media: _5, entities: _6, viaBotName: _7, replyToRandomId: _8, groupedId: _9) } @@ -1050,22 +1050,22 @@ public struct SecretApi144 { var _2: Int32? _2 = reader.readInt32() var _3: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = parseString(reader) } var _4: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = parseString(reader) } var _5: Buffer? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = parseBytes(reader) } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return SecretApi144.DocumentAttribute.documentAttributeAudio(flags: _1!, duration: _2!, title: _3, performer: _4, waveform: _5) } diff --git a/submodules/TelegramApi/Sources/SecretApiLayer45.swift b/submodules/TelegramApi/Sources/SecretApiLayer45.swift index e9e5b4edf8..032b2d04fc 100644 --- a/submodules/TelegramApi/Sources/SecretApiLayer45.swift +++ b/submodules/TelegramApi/Sources/SecretApiLayer45.swift @@ -223,33 +223,33 @@ public struct SecretApi45 { var _4: String? _4 = parseString(reader) var _5: SecretApi45.DecryptedMessageMedia? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { if let signature = reader.readInt32() { _5 = SecretApi45.parse(reader, signature: signature) as? SecretApi45.DecryptedMessageMedia } } var _6: [SecretApi45.MessageEntity]? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { if let _ = reader.readInt32() { _6 = SecretApi45.parseVector(reader, elementSignature: 0, elementType: SecretApi45.MessageEntity.self) } } var _7: String? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { _7 = parseString(reader) } var _8: Int64? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _8 = reader.readInt64() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 9) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 7) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 11) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 3) == 0) || _8 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return SecretApi45.DecryptedMessage.decryptedMessage(flags: _1!, randomId: _2!, ttl: _3!, message: _4!, media: _5, entities: _6, viaBotName: _7, replyToRandomId: _8) } diff --git a/submodules/TelegramApi/Sources/SecretApiLayer46.swift b/submodules/TelegramApi/Sources/SecretApiLayer46.swift index 137a3e416d..4986c5444a 100644 --- a/submodules/TelegramApi/Sources/SecretApiLayer46.swift +++ b/submodules/TelegramApi/Sources/SecretApiLayer46.swift @@ -223,33 +223,33 @@ public struct SecretApi46 { var _4: String? _4 = parseString(reader) var _5: SecretApi46.DecryptedMessageMedia? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { if let signature = reader.readInt32() { _5 = SecretApi46.parse(reader, signature: signature) as? SecretApi46.DecryptedMessageMedia } } var _6: [SecretApi46.MessageEntity]? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { if let _ = reader.readInt32() { _6 = SecretApi46.parseVector(reader, elementSignature: 0, elementType: SecretApi46.MessageEntity.self) } } var _7: String? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { _7 = parseString(reader) } var _8: Int64? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _8 = reader.readInt64() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 9) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 7) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 11) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 3) == 0) || _8 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return SecretApi46.DecryptedMessage.decryptedMessage(flags: _1!, randomId: _2!, ttl: _3!, message: _4!, media: _5, entities: _6, viaBotName: _7, replyToRandomId: _8) } @@ -1034,22 +1034,22 @@ public struct SecretApi46 { var _2: Int32? _2 = reader.readInt32() var _3: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = parseString(reader) } var _4: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = parseString(reader) } var _5: Buffer? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = parseBytes(reader) } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return SecretApi46.DocumentAttribute.documentAttributeAudio(flags: _1!, duration: _2!, title: _3, performer: _4, waveform: _5) } diff --git a/submodules/TelegramApi/Sources/SecretApiLayer66.swift b/submodules/TelegramApi/Sources/SecretApiLayer66.swift index 8f87c3ae1b..5a9957d87a 100644 --- a/submodules/TelegramApi/Sources/SecretApiLayer66.swift +++ b/submodules/TelegramApi/Sources/SecretApiLayer66.swift @@ -225,33 +225,33 @@ public struct SecretApi66 { var _4: String? _4 = parseString(reader) var _5: SecretApi66.DecryptedMessageMedia? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { if let signature = reader.readInt32() { _5 = SecretApi66.parse(reader, signature: signature) as? SecretApi66.DecryptedMessageMedia } } var _6: [SecretApi66.MessageEntity]? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { if let _ = reader.readInt32() { _6 = SecretApi66.parseVector(reader, elementSignature: 0, elementType: SecretApi66.MessageEntity.self) } } var _7: String? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { _7 = parseString(reader) } var _8: Int64? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _8 = reader.readInt64() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 9) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 7) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 11) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 3) == 0) || _8 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _8 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 { return SecretApi66.DecryptedMessage.decryptedMessage(flags: _1!, randomId: _2!, ttl: _3!, message: _4!, media: _5, entities: _6, viaBotName: _7, replyToRandomId: _8) } @@ -1037,22 +1037,22 @@ public struct SecretApi66 { var _2: Int32? _2 = reader.readInt32() var _3: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = parseString(reader) } var _4: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = parseString(reader) } var _5: Buffer? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = parseBytes(reader) } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return SecretApi66.DocumentAttribute.documentAttributeAudio(flags: _1!, duration: _2!, title: _3, performer: _4, waveform: _5) } diff --git a/submodules/TelegramApi/Sources/SecretApiLayer73.swift b/submodules/TelegramApi/Sources/SecretApiLayer73.swift index 0a56864114..5253a5c3c3 100644 --- a/submodules/TelegramApi/Sources/SecretApiLayer73.swift +++ b/submodules/TelegramApi/Sources/SecretApiLayer73.swift @@ -228,38 +228,38 @@ public struct SecretApi73 { var _4: String? _4 = parseString(reader) var _5: SecretApi73.DecryptedMessageMedia? - if Int(_1!) & Int(1 << 9) != 0 { + if Int(_1 ?? 0) & Int(1 << 9) != 0 { if let signature = reader.readInt32() { _5 = SecretApi73.parse(reader, signature: signature) as? SecretApi73.DecryptedMessageMedia } } var _6: [SecretApi73.MessageEntity]? - if Int(_1!) & Int(1 << 7) != 0 { + if Int(_1 ?? 0) & Int(1 << 7) != 0 { if let _ = reader.readInt32() { _6 = SecretApi73.parseVector(reader, elementSignature: 0, elementType: SecretApi73.MessageEntity.self) } } var _7: String? - if Int(_1!) & Int(1 << 11) != 0 { + if Int(_1 ?? 0) & Int(1 << 11) != 0 { _7 = parseString(reader) } var _8: Int64? - if Int(_1!) & Int(1 << 3) != 0 { + if Int(_1 ?? 0) & Int(1 << 3) != 0 { _8 = reader.readInt64() } var _9: Int64? - if Int(_1!) & Int(1 << 17) != 0 { + if Int(_1 ?? 0) & Int(1 << 17) != 0 { _9 = reader.readInt64() } let _c1 = _1 != nil let _c2 = _2 != nil let _c3 = _3 != nil let _c4 = _4 != nil - let _c5 = (Int(_1!) & Int(1 << 9) == 0) || _5 != nil - let _c6 = (Int(_1!) & Int(1 << 7) == 0) || _6 != nil - let _c7 = (Int(_1!) & Int(1 << 11) == 0) || _7 != nil - let _c8 = (Int(_1!) & Int(1 << 3) == 0) || _8 != nil - let _c9 = (Int(_1!) & Int(1 << 17) == 0) || _9 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 9) == 0) || _5 != nil + let _c6 = (Int(_1 ?? 0) & Int(1 << 7) == 0) || _6 != nil + let _c7 = (Int(_1 ?? 0) & Int(1 << 11) == 0) || _7 != nil + let _c8 = (Int(_1 ?? 0) & Int(1 << 3) == 0) || _8 != nil + let _c9 = (Int(_1 ?? 0) & Int(1 << 17) == 0) || _9 != nil if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 { return SecretApi73.DecryptedMessage.decryptedMessage(flags: _1!, randomId: _2!, ttl: _3!, message: _4!, media: _5, entities: _6, viaBotName: _7, replyToRandomId: _8, groupedId: _9) } @@ -1045,22 +1045,22 @@ public struct SecretApi73 { var _2: Int32? _2 = reader.readInt32() var _3: String? - if Int(_1!) & Int(1 << 0) != 0 { + if Int(_1 ?? 0) & Int(1 << 0) != 0 { _3 = parseString(reader) } var _4: String? - if Int(_1!) & Int(1 << 1) != 0 { + if Int(_1 ?? 0) & Int(1 << 1) != 0 { _4 = parseString(reader) } var _5: Buffer? - if Int(_1!) & Int(1 << 2) != 0 { + if Int(_1 ?? 0) & Int(1 << 2) != 0 { _5 = parseBytes(reader) } let _c1 = _1 != nil let _c2 = _2 != nil - let _c3 = (Int(_1!) & Int(1 << 0) == 0) || _3 != nil - let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil - let _c5 = (Int(_1!) & Int(1 << 2) == 0) || _5 != nil + let _c3 = (Int(_1 ?? 0) & Int(1 << 0) == 0) || _3 != nil + let _c4 = (Int(_1 ?? 0) & Int(1 << 1) == 0) || _4 != nil + let _c5 = (Int(_1 ?? 0) & Int(1 << 2) == 0) || _5 != nil if _c1 && _c2 && _c3 && _c4 && _c5 { return SecretApi73.DocumentAttribute.documentAttributeAudio(flags: _1!, duration: _2!, title: _3, performer: _4, waveform: _5) }