diff --git a/submodules/TelegramApi/Sources/Api21.swift b/submodules/TelegramApi/Sources/Api21.swift index 9c0f848891..a47631de47 100644 --- a/submodules/TelegramApi/Sources/Api21.swift +++ b/submodules/TelegramApi/Sources/Api21.swift @@ -383,7 +383,19 @@ public extension Api { } public extension Api { enum ReactionCount: TypeConstructorDescription { - case reactionCount(flags: Int32, chosenOrder: Int32?, reaction: Api.Reaction, count: Int32) + public class Cons_reactionCount { + public var flags: Int32 + public var chosenOrder: Int32? + public var reaction: Api.Reaction + public var count: Int32 + public init(flags: Int32, chosenOrder: Int32?, reaction: Api.Reaction, count: Int32) { + self.flags = flags + self.chosenOrder = chosenOrder + self.reaction = reaction + self.count = count + } + } + case reactionCount(Cons_reactionCount) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { #if DEBUG @@ -449,7 +461,21 @@ public extension Api { } public extension Api { enum ReactionsNotifySettings: TypeConstructorDescription { - case reactionsNotifySettings(flags: Int32, messagesNotifyFrom: Api.ReactionNotificationsFrom?, storiesNotifyFrom: Api.ReactionNotificationsFrom?, sound: Api.NotificationSound, showPreviews: Api.Bool) + public class Cons_reactionsNotifySettings { + public var flags: Int32 + public var messagesNotifyFrom: Api.ReactionNotificationsFrom? + public var storiesNotifyFrom: Api.ReactionNotificationsFrom? + public var sound: Api.NotificationSound + public var showPreviews: Api.Bool + public init(flags: Int32, messagesNotifyFrom: Api.ReactionNotificationsFrom?, storiesNotifyFrom: Api.ReactionNotificationsFrom?, sound: Api.NotificationSound, showPreviews: Api.Bool) { + self.flags = flags + self.messagesNotifyFrom = messagesNotifyFrom + self.storiesNotifyFrom = storiesNotifyFrom + self.sound = sound + self.showPreviews = showPreviews + } + } + case reactionsNotifySettings(Cons_reactionsNotifySettings) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { #if DEBUG @@ -478,7 +504,15 @@ public extension Api { } public extension Api { enum ReadParticipantDate: TypeConstructorDescription { - case readParticipantDate(userId: Int64, date: Int32) + public class Cons_readParticipantDate { + public var userId: Int64 + public var date: Int32 + public init(userId: Int64, date: Int32) { + self.userId = userId + self.date = date + } + } + case readParticipantDate(Cons_readParticipantDate) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { #if DEBUG diff --git a/submodules/TelegramApi/Sources/Api22.swift b/submodules/TelegramApi/Sources/Api22.swift index 6c175728af..ddaa7cb2ab 100644 --- a/submodules/TelegramApi/Sources/Api22.swift +++ b/submodules/TelegramApi/Sources/Api22.swift @@ -1,6 +1,14 @@ public extension Api { enum ReceivedNotifyMessage: TypeConstructorDescription { - case receivedNotifyMessage(id: Int32, flags: Int32) + public class Cons_receivedNotifyMessage { + public var id: Int32 + public var flags: Int32 + public init(id: Int32, flags: Int32) { + self.id = id + self.flags = flags + } + } + case receivedNotifyMessage(Cons_receivedNotifyMessage) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { #if DEBUG @@ -29,11 +37,49 @@ public extension Api { } public extension Api { indirect enum RecentMeUrl: TypeConstructorDescription { - case recentMeUrlChat(url: String, chatId: Int64) - case recentMeUrlChatInvite(url: String, chatInvite: Api.ChatInvite) - case recentMeUrlStickerSet(url: String, set: Api.StickerSetCovered) - case recentMeUrlUnknown(url: String) - case recentMeUrlUser(url: String, userId: Int64) + public class Cons_recentMeUrlChat { + public var url: String + public var chatId: Int64 + public init(url: String, chatId: Int64) { + self.url = url + self.chatId = chatId + } + } + public class Cons_recentMeUrlChatInvite { + public var url: String + public var chatInvite: Api.ChatInvite + public init(url: String, chatInvite: Api.ChatInvite) { + self.url = url + self.chatInvite = chatInvite + } + } + public class Cons_recentMeUrlStickerSet { + public var url: String + public var set: Api.StickerSetCovered + public init(url: String, set: Api.StickerSetCovered) { + self.url = url + self.set = set + } + } + public class Cons_recentMeUrlUnknown { + public var url: String + public init(url: String) { + self.url = url + } + } + public class Cons_recentMeUrlUser { + public var url: String + public var userId: Int64 + public init(url: String, userId: Int64) { + self.url = url + self.userId = userId + } + } + case recentMeUrlChat(Cons_recentMeUrlChat) + case recentMeUrlChatInvite(Cons_recentMeUrlChatInvite) + case recentMeUrlStickerSet(Cons_recentMeUrlStickerSet) + case recentMeUrlUnknown(Cons_recentMeUrlUnknown) + case recentMeUrlUser(Cons_recentMeUrlUser) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { #if DEBUG @@ -90,7 +136,15 @@ public extension Api { } public extension Api { enum RecentStory: TypeConstructorDescription { - case recentStory(flags: Int32, maxId: Int32?) + public class Cons_recentStory { + public var flags: Int32 + public var maxId: Int32? + public init(flags: Int32, maxId: Int32?) { + self.flags = flags + self.maxId = maxId + } + } + case recentStory(Cons_recentStory) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { #if DEBUG @@ -119,10 +173,40 @@ public extension Api { } public extension Api { enum ReplyMarkup: TypeConstructorDescription { - case replyInlineMarkup(rows: [Api.KeyboardButtonRow]) - case replyKeyboardForceReply(flags: Int32, placeholder: String?) - case replyKeyboardHide(flags: Int32) - case replyKeyboardMarkup(flags: Int32, rows: [Api.KeyboardButtonRow], placeholder: String?) + public class Cons_replyInlineMarkup { + public var rows: [Api.KeyboardButtonRow] + public init(rows: [Api.KeyboardButtonRow]) { + self.rows = rows + } + } + public class Cons_replyKeyboardForceReply { + public var flags: Int32 + public var placeholder: String? + public init(flags: Int32, placeholder: String?) { + self.flags = flags + self.placeholder = placeholder + } + } + public class Cons_replyKeyboardHide { + public var flags: Int32 + public init(flags: Int32) { + self.flags = flags + } + } + public class Cons_replyKeyboardMarkup { + public var flags: Int32 + public var rows: [Api.KeyboardButtonRow] + public var placeholder: String? + public init(flags: Int32, rows: [Api.KeyboardButtonRow], placeholder: String?) { + self.flags = flags + self.rows = rows + self.placeholder = placeholder + } + } + case replyInlineMarkup(Cons_replyInlineMarkup) + case replyKeyboardForceReply(Cons_replyKeyboardForceReply) + case replyKeyboardHide(Cons_replyKeyboardHide) + case replyKeyboardMarkup(Cons_replyKeyboardMarkup) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { #if DEBUG @@ -273,8 +357,24 @@ public extension Api { } public extension Api { enum ReportResult: TypeConstructorDescription { - case reportResultAddComment(flags: Int32, option: Buffer) - case reportResultChooseOption(title: String, options: [Api.MessageReportOption]) + public class Cons_reportResultAddComment { + public var flags: Int32 + public var option: Buffer + public init(flags: Int32, option: Buffer) { + self.flags = flags + self.option = option + } + } + public class Cons_reportResultChooseOption { + public var title: String + public var options: [Api.MessageReportOption] + public init(title: String, options: [Api.MessageReportOption]) { + self.title = title + self.options = options + } + } + case reportResultAddComment(Cons_reportResultAddComment) + case reportResultChooseOption(Cons_reportResultChooseOption) case reportResultReported public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { @@ -318,9 +418,45 @@ public extension Api { } public extension Api { enum RequestPeerType: TypeConstructorDescription { - case requestPeerTypeBroadcast(flags: Int32, hasUsername: Api.Bool?, userAdminRights: Api.ChatAdminRights?, botAdminRights: Api.ChatAdminRights?) - case requestPeerTypeChat(flags: Int32, hasUsername: Api.Bool?, forum: Api.Bool?, userAdminRights: Api.ChatAdminRights?, botAdminRights: Api.ChatAdminRights?) - case requestPeerTypeUser(flags: Int32, bot: Api.Bool?, premium: Api.Bool?) + public class Cons_requestPeerTypeBroadcast { + public var flags: Int32 + public var hasUsername: Api.Bool? + public var userAdminRights: Api.ChatAdminRights? + public var botAdminRights: Api.ChatAdminRights? + public init(flags: Int32, hasUsername: Api.Bool?, userAdminRights: Api.ChatAdminRights?, botAdminRights: Api.ChatAdminRights?) { + self.flags = flags + self.hasUsername = hasUsername + self.userAdminRights = userAdminRights + self.botAdminRights = botAdminRights + } + } + public class Cons_requestPeerTypeChat { + public var flags: Int32 + public var hasUsername: Api.Bool? + public var forum: Api.Bool? + public var userAdminRights: Api.ChatAdminRights? + public var botAdminRights: Api.ChatAdminRights? + public init(flags: Int32, hasUsername: Api.Bool?, forum: Api.Bool?, userAdminRights: Api.ChatAdminRights?, botAdminRights: Api.ChatAdminRights?) { + self.flags = flags + self.hasUsername = hasUsername + self.forum = forum + self.userAdminRights = userAdminRights + self.botAdminRights = botAdminRights + } + } + public class Cons_requestPeerTypeUser { + public var flags: Int32 + public var bot: Api.Bool? + public var premium: Api.Bool? + public init(flags: Int32, bot: Api.Bool?, premium: Api.Bool?) { + self.flags = flags + self.bot = bot + self.premium = premium + } + } + case requestPeerTypeBroadcast(Cons_requestPeerTypeBroadcast) + case requestPeerTypeChat(Cons_requestPeerTypeChat) + case requestPeerTypeUser(Cons_requestPeerTypeUser) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { #if DEBUG @@ -363,9 +499,51 @@ public extension Api { } public extension Api { enum RequestedPeer: TypeConstructorDescription { - case requestedPeerChannel(flags: Int32, channelId: Int64, title: String?, username: String?, photo: Api.Photo?) - case requestedPeerChat(flags: Int32, chatId: Int64, title: String?, photo: Api.Photo?) - case requestedPeerUser(flags: Int32, userId: Int64, firstName: String?, lastName: String?, username: String?, photo: Api.Photo?) + public class Cons_requestedPeerChannel { + public var flags: Int32 + public var channelId: Int64 + public var title: String? + public var username: String? + public var photo: Api.Photo? + public init(flags: Int32, channelId: Int64, title: String?, username: String?, photo: Api.Photo?) { + self.flags = flags + self.channelId = channelId + self.title = title + self.username = username + self.photo = photo + } + } + public class Cons_requestedPeerChat { + public var flags: Int32 + public var chatId: Int64 + public var title: String? + public var photo: Api.Photo? + public init(flags: Int32, chatId: Int64, title: String?, photo: Api.Photo?) { + self.flags = flags + self.chatId = chatId + self.title = title + self.photo = photo + } + } + public class Cons_requestedPeerUser { + public var flags: Int32 + public var userId: Int64 + public var firstName: String? + public var lastName: String? + public var username: String? + public var photo: Api.Photo? + public init(flags: Int32, userId: Int64, firstName: String?, lastName: String?, username: String?, photo: Api.Photo?) { + self.flags = flags + self.userId = userId + self.firstName = firstName + self.lastName = lastName + self.username = username + self.photo = photo + } + } + case requestedPeerChannel(Cons_requestedPeerChannel) + case requestedPeerChat(Cons_requestedPeerChat) + case requestedPeerUser(Cons_requestedPeerUser) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { #if DEBUG @@ -408,8 +586,14 @@ public extension Api { } public extension Api { enum RequirementToContact: TypeConstructorDescription { + public class Cons_requirementToContactPaidMessages { + public var starsAmount: Int64 + public init(starsAmount: Int64) { + self.starsAmount = starsAmount + } + } case requirementToContactEmpty - case requirementToContactPaidMessages(starsAmount: Int64) + case requirementToContactPaidMessages(Cons_requirementToContactPaidMessages) case requirementToContactPremium public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { diff --git a/submodules/TelegramApi/Sources/Api23.swift b/submodules/TelegramApi/Sources/Api23.swift index d227e11653..26e9937711 100644 --- a/submodules/TelegramApi/Sources/Api23.swift +++ b/submodules/TelegramApi/Sources/Api23.swift @@ -1,6 +1,16 @@ public extension Api { enum RestrictionReason: TypeConstructorDescription { - case restrictionReason(platform: String, reason: String, text: String) + public class Cons_restrictionReason { + public var platform: String + public var reason: String + public var text: String + public init(platform: String, reason: String, text: String) { + self.platform = platform + self.reason = reason + self.text = text + } + } + case restrictionReason(Cons_restrictionReason) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { #if DEBUG @@ -29,22 +39,126 @@ public extension Api { } public extension Api { indirect enum RichText: TypeConstructorDescription { - case textAnchor(text: Api.RichText, name: String) - case textBold(text: Api.RichText) - case textConcat(texts: [Api.RichText]) - case textEmail(text: Api.RichText, email: String) + public class Cons_textAnchor { + public var text: Api.RichText + public var name: String + public init(text: Api.RichText, name: String) { + self.text = text + self.name = name + } + } + public class Cons_textBold { + public var text: Api.RichText + public init(text: Api.RichText) { + self.text = text + } + } + public class Cons_textConcat { + public var texts: [Api.RichText] + public init(texts: [Api.RichText]) { + self.texts = texts + } + } + public class Cons_textEmail { + public var text: Api.RichText + public var email: String + public init(text: Api.RichText, email: String) { + self.text = text + self.email = email + } + } + public class Cons_textFixed { + public var text: Api.RichText + public init(text: Api.RichText) { + self.text = text + } + } + public class Cons_textImage { + public var documentId: Int64 + public var w: Int32 + public var h: Int32 + public init(documentId: Int64, w: Int32, h: Int32) { + self.documentId = documentId + self.w = w + self.h = h + } + } + public class Cons_textItalic { + public var text: Api.RichText + public init(text: Api.RichText) { + self.text = text + } + } + public class Cons_textMarked { + public var text: Api.RichText + public init(text: Api.RichText) { + self.text = text + } + } + public class Cons_textPhone { + public var text: Api.RichText + public var phone: String + public init(text: Api.RichText, phone: String) { + self.text = text + self.phone = phone + } + } + public class Cons_textPlain { + public var text: String + public init(text: String) { + self.text = text + } + } + public class Cons_textStrike { + public var text: Api.RichText + public init(text: Api.RichText) { + self.text = text + } + } + public class Cons_textSubscript { + public var text: Api.RichText + public init(text: Api.RichText) { + self.text = text + } + } + public class Cons_textSuperscript { + public var text: Api.RichText + public init(text: Api.RichText) { + self.text = text + } + } + public class Cons_textUnderline { + public var text: Api.RichText + public init(text: Api.RichText) { + self.text = text + } + } + public class Cons_textUrl { + public var text: Api.RichText + public var url: String + public var webpageId: Int64 + public init(text: Api.RichText, url: String, webpageId: Int64) { + self.text = text + self.url = url + self.webpageId = webpageId + } + } + case textAnchor(Cons_textAnchor) + case textBold(Cons_textBold) + case textConcat(Cons_textConcat) + case textEmail(Cons_textEmail) case textEmpty - case textFixed(text: Api.RichText) - case textImage(documentId: Int64, w: Int32, h: Int32) - case textItalic(text: Api.RichText) - case textMarked(text: Api.RichText) - case textPhone(text: Api.RichText, phone: String) - case textPlain(text: String) - case textStrike(text: Api.RichText) - case textSubscript(text: Api.RichText) - case textSuperscript(text: Api.RichText) - case textUnderline(text: Api.RichText) - case textUrl(text: Api.RichText, url: String, webpageId: Int64) + case textFixed(Cons_textFixed) + case textImage(Cons_textImage) + case textItalic(Cons_textItalic) + case textMarked(Cons_textMarked) + case textPhone(Cons_textPhone) + case textPlain(Cons_textPlain) + case textStrike(Cons_textStrike) + case textSubscript(Cons_textSubscript) + case textSuperscript(Cons_textSuperscript) + case textUnderline(Cons_textUnderline) + case textUrl(Cons_textUrl) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { #if DEBUG @@ -178,7 +292,19 @@ public extension Api { } public extension Api { enum SavedContact: TypeConstructorDescription { - case savedPhoneContact(phone: String, firstName: String, lastName: String, date: Int32) + public class Cons_savedPhoneContact { + public var phone: String + public var firstName: String + public var lastName: String + public var date: Int32 + public init(phone: String, firstName: String, lastName: String, date: Int32) { + self.phone = phone + self.firstName = firstName + self.lastName = lastName + self.date = date + } + } + case savedPhoneContact(Cons_savedPhoneContact) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { #if DEBUG @@ -207,8 +333,38 @@ public extension Api { } public extension Api { indirect enum SavedDialog: TypeConstructorDescription { - case monoForumDialog(flags: Int32, peer: Api.Peer, topMessage: Int32, readInboxMaxId: Int32, readOutboxMaxId: Int32, unreadCount: Int32, unreadReactionsCount: Int32, draft: Api.DraftMessage?) - case savedDialog(flags: Int32, peer: Api.Peer, topMessage: Int32) + public class Cons_monoForumDialog { + public var flags: Int32 + public var peer: Api.Peer + public var topMessage: Int32 + public var readInboxMaxId: Int32 + public var readOutboxMaxId: Int32 + public var unreadCount: Int32 + public var unreadReactionsCount: Int32 + public var draft: Api.DraftMessage? + public init(flags: Int32, peer: Api.Peer, topMessage: Int32, readInboxMaxId: Int32, readOutboxMaxId: Int32, unreadCount: Int32, unreadReactionsCount: Int32, draft: Api.DraftMessage?) { + self.flags = flags + self.peer = peer + self.topMessage = topMessage + self.readInboxMaxId = readInboxMaxId + self.readOutboxMaxId = readOutboxMaxId + self.unreadCount = unreadCount + self.unreadReactionsCount = unreadReactionsCount + self.draft = draft + } + } + public class Cons_savedDialog { + public var flags: Int32 + public var peer: Api.Peer + public var topMessage: Int32 + public init(flags: Int32, peer: Api.Peer, topMessage: Int32) { + self.flags = flags + self.peer = peer + self.topMessage = topMessage + } + } + case monoForumDialog(Cons_monoForumDialog) + case savedDialog(Cons_savedDialog) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { #if DEBUG @@ -244,7 +400,19 @@ public extension Api { } public extension Api { enum SavedReactionTag: TypeConstructorDescription { - case savedReactionTag(flags: Int32, reaction: Api.Reaction, title: String?, count: Int32) + public class Cons_savedReactionTag { + public var flags: Int32 + public var reaction: Api.Reaction + public var title: String? + public var count: Int32 + public init(flags: Int32, reaction: Api.Reaction, title: String?, count: Int32) { + self.flags = flags + self.reaction = reaction + self.title = title + self.count = count + } + } + case savedReactionTag(Cons_savedReactionTag) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { #if DEBUG @@ -273,7 +441,49 @@ public extension Api { } public extension Api { enum SavedStarGift: TypeConstructorDescription { - case savedStarGift(flags: Int32, fromId: Api.Peer?, date: Int32, gift: Api.StarGift, message: Api.TextWithEntities?, msgId: Int32?, savedId: Int64?, convertStars: Int64?, upgradeStars: Int64?, canExportAt: Int32?, transferStars: Int64?, canTransferAt: Int32?, canResellAt: Int32?, collectionId: [Int32]?, prepaidUpgradeHash: String?, dropOriginalDetailsStars: Int64?, giftNum: Int32?, canCraftAt: Int32?, craftChancePermille: Int32?) + public class Cons_savedStarGift { + public var flags: Int32 + public var fromId: Api.Peer? + public var date: Int32 + public var gift: Api.StarGift + public var message: Api.TextWithEntities? + public var msgId: Int32? + public var savedId: Int64? + public var convertStars: Int64? + public var upgradeStars: Int64? + public var canExportAt: Int32? + public var transferStars: Int64? + public var canTransferAt: Int32? + public var canResellAt: Int32? + public var collectionId: [Int32]? + public var prepaidUpgradeHash: String? + public var dropOriginalDetailsStars: Int64? + public var giftNum: Int32? + public var canCraftAt: Int32? + public var craftChancePermille: Int32? + public init(flags: Int32, fromId: Api.Peer?, date: Int32, gift: Api.StarGift, message: Api.TextWithEntities?, msgId: Int32?, savedId: Int64?, convertStars: Int64?, upgradeStars: Int64?, canExportAt: Int32?, transferStars: Int64?, canTransferAt: Int32?, canResellAt: Int32?, collectionId: [Int32]?, prepaidUpgradeHash: String?, dropOriginalDetailsStars: Int64?, giftNum: Int32?, canCraftAt: Int32?, craftChancePermille: Int32?) { + self.flags = flags + self.fromId = fromId + self.date = date + self.gift = gift + self.message = message + self.msgId = msgId + self.savedId = savedId + self.convertStars = convertStars + self.upgradeStars = upgradeStars + self.canExportAt = canExportAt + self.transferStars = transferStars + self.canTransferAt = canTransferAt + self.canResellAt = canResellAt + self.collectionId = collectionId + self.prepaidUpgradeHash = prepaidUpgradeHash + self.dropOriginalDetailsStars = dropOriginalDetailsStars + self.giftNum = giftNum + self.canCraftAt = canCraftAt + self.craftChancePermille = craftChancePermille + } + } + case savedStarGift(Cons_savedStarGift) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { #if DEBUG @@ -302,7 +512,21 @@ public extension Api { } public extension Api { enum SearchPostsFlood: TypeConstructorDescription { - case searchPostsFlood(flags: Int32, totalDaily: Int32, remains: Int32, waitTill: Int32?, starsAmount: Int64) + public class Cons_searchPostsFlood { + public var flags: Int32 + public var totalDaily: Int32 + public var remains: Int32 + public var waitTill: Int32? + public var starsAmount: Int64 + public init(flags: Int32, totalDaily: Int32, remains: Int32, waitTill: Int32?, starsAmount: Int64) { + self.flags = flags + self.totalDaily = totalDaily + self.remains = remains + self.waitTill = waitTill + self.starsAmount = starsAmount + } + } + case searchPostsFlood(Cons_searchPostsFlood) public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) { #if DEBUG diff --git a/submodules/TelegramCore/Sources/ApiUtils/PeerAccessRestrictionInfo.swift b/submodules/TelegramCore/Sources/ApiUtils/PeerAccessRestrictionInfo.swift index ec42c80376..7fd4cbf7c5 100644 --- a/submodules/TelegramCore/Sources/ApiUtils/PeerAccessRestrictionInfo.swift +++ b/submodules/TelegramCore/Sources/ApiUtils/PeerAccessRestrictionInfo.swift @@ -6,7 +6,8 @@ import TelegramApi extension RestrictionRule { convenience init(apiReason: Api.RestrictionReason) { switch apiReason { - case let .restrictionReason(platform, reason, text): + case let .restrictionReason(restrictionReasonData): + let (platform, reason, text) = (restrictionReasonData.platform, restrictionReasonData.reason, restrictionReasonData.text) self.init(platform: platform, reason: reason, text: text) } } diff --git a/submodules/TelegramCore/Sources/ApiUtils/ReactionsMessageAttribute.swift b/submodules/TelegramCore/Sources/ApiUtils/ReactionsMessageAttribute.swift index 3b7a70ed49..38df783272 100644 --- a/submodules/TelegramCore/Sources/ApiUtils/ReactionsMessageAttribute.swift +++ b/submodules/TelegramCore/Sources/ApiUtils/ReactionsMessageAttribute.swift @@ -12,7 +12,8 @@ extension ReactionsMessageAttribute { let isTags = (flags & (1 << 3)) != 0 var reactions = results.compactMap { result -> MessageReaction? in switch result { - case let .reactionCount(_, chosenOrder, reaction, count): + case let .reactionCount(reactionCountData): + let (_, chosenOrder, reaction, count) = (reactionCountData.flags, reactionCountData.chosenOrder, reactionCountData.reaction, reactionCountData.count) if let reaction = MessageReaction.Reaction(apiReaction: reaction) { return MessageReaction(value: reaction, count: count, chosenOrder: chosenOrder.flatMap(Int.init)) } else { @@ -307,7 +308,8 @@ extension ReactionsMessageAttribute { isTags: isTags, reactions: results.compactMap { result -> MessageReaction? in switch result { - case let .reactionCount(_, chosenOrder, reaction, count): + case let .reactionCount(reactionCountData): + let (_, chosenOrder, reaction, count) = (reactionCountData.flags, reactionCountData.chosenOrder, reactionCountData.reaction, reactionCountData.count) if let reaction = MessageReaction.Reaction(apiReaction: reaction) { return MessageReaction(value: reaction, count: count, chosenOrder: chosenOrder.flatMap(Int.init)) } else { diff --git a/submodules/TelegramCore/Sources/ApiUtils/ReplyMarkupMessageAttribute.swift b/submodules/TelegramCore/Sources/ApiUtils/ReplyMarkupMessageAttribute.swift index 3eb70acda0..0c2e34ff56 100644 --- a/submodules/TelegramCore/Sources/ApiUtils/ReplyMarkupMessageAttribute.swift +++ b/submodules/TelegramCore/Sources/ApiUtils/ReplyMarkupMessageAttribute.swift @@ -102,12 +102,14 @@ extension ReplyMarkupButton { let (text, buttonId, peerType, maxQuantity) = (keyboardButtonRequestPeerData.text, keyboardButtonRequestPeerData.buttonId, keyboardButtonRequestPeerData.peerType, keyboardButtonRequestPeerData.maxQuantity) let mappedPeerType: ReplyMarkupButtonRequestPeerType switch peerType { - case let .requestPeerTypeUser(_, bot, premium): + case let .requestPeerTypeUser(requestPeerTypeUserData): + let (bot, premium) = (requestPeerTypeUserData.bot, requestPeerTypeUserData.premium) mappedPeerType = .user(ReplyMarkupButtonRequestPeerType.User( isBot: bot.flatMap({ $0 == .boolTrue }), isPremium: premium.flatMap({ $0 == .boolTrue }) )) - case let .requestPeerTypeChat(flags, hasUsername, forum, userAdminRights, botAdminRights): + case let .requestPeerTypeChat(requestPeerTypeChatData): + let (flags, hasUsername, forum, userAdminRights, botAdminRights) = (requestPeerTypeChatData.flags, requestPeerTypeChatData.hasUsername, requestPeerTypeChatData.forum, requestPeerTypeChatData.userAdminRights, requestPeerTypeChatData.botAdminRights) mappedPeerType = .group(ReplyMarkupButtonRequestPeerType.Group( isCreator: (flags & (1 << 0)) != 0, hasUsername: hasUsername.flatMap({ $0 == .boolTrue }), @@ -116,7 +118,8 @@ extension ReplyMarkupButton { userAdminRights: userAdminRights.flatMap(TelegramChatAdminRights.init(apiAdminRights:)), botAdminRights: botAdminRights.flatMap(TelegramChatAdminRights.init(apiAdminRights:)) )) - case let .requestPeerTypeBroadcast(flags, hasUsername, userAdminRights, botAdminRights): + case let .requestPeerTypeBroadcast(requestPeerTypeBroadcastData): + let (flags, hasUsername, userAdminRights, botAdminRights) = (requestPeerTypeBroadcastData.flags, requestPeerTypeBroadcastData.hasUsername, requestPeerTypeBroadcastData.userAdminRights, requestPeerTypeBroadcastData.botAdminRights) mappedPeerType = .channel(ReplyMarkupButtonRequestPeerType.Channel( isCreator: (flags & (1 << 0)) != 0, hasUsername: hasUsername.flatMap({ $0 == .boolTrue }), @@ -129,12 +132,14 @@ extension ReplyMarkupButton { let (text, buttonId, peerType, maxQuantity) = (inputKeyboardButtonRequestPeerData.text, inputKeyboardButtonRequestPeerData.buttonId, inputKeyboardButtonRequestPeerData.peerType, inputKeyboardButtonRequestPeerData.maxQuantity) let mappedPeerType: ReplyMarkupButtonRequestPeerType switch peerType { - case let .requestPeerTypeUser(_, bot, premium): + case let .requestPeerTypeUser(requestPeerTypeUserData): + let (bot, premium) = (requestPeerTypeUserData.bot, requestPeerTypeUserData.premium) mappedPeerType = .user(ReplyMarkupButtonRequestPeerType.User( isBot: bot.flatMap({ $0 == .boolTrue }), isPremium: premium.flatMap({ $0 == .boolTrue }) )) - case let .requestPeerTypeChat(flags, hasUsername, forum, userAdminRights, botAdminRights): + case let .requestPeerTypeChat(requestPeerTypeChatData): + let (flags, hasUsername, forum, userAdminRights, botAdminRights) = (requestPeerTypeChatData.flags, requestPeerTypeChatData.hasUsername, requestPeerTypeChatData.forum, requestPeerTypeChatData.userAdminRights, requestPeerTypeChatData.botAdminRights) mappedPeerType = .group(ReplyMarkupButtonRequestPeerType.Group( isCreator: (flags & (1 << 0)) != 0, hasUsername: hasUsername.flatMap({ $0 == .boolTrue }), @@ -143,7 +148,8 @@ extension ReplyMarkupButton { userAdminRights: userAdminRights.flatMap(TelegramChatAdminRights.init(apiAdminRights:)), botAdminRights: botAdminRights.flatMap(TelegramChatAdminRights.init(apiAdminRights:)) )) - case let .requestPeerTypeBroadcast(flags, hasUsername, userAdminRights, botAdminRights): + case let .requestPeerTypeBroadcast(requestPeerTypeBroadcastData): + let (flags, hasUsername, userAdminRights, botAdminRights) = (requestPeerTypeBroadcastData.flags, requestPeerTypeBroadcastData.hasUsername, requestPeerTypeBroadcastData.userAdminRights, requestPeerTypeBroadcastData.botAdminRights) mappedPeerType = .channel(ReplyMarkupButtonRequestPeerType.Channel( isCreator: (flags & (1 << 0)) != 0, hasUsername: hasUsername.flatMap({ $0 == .boolTrue }), @@ -175,7 +181,8 @@ extension ReplyMarkupMessageAttribute { var flags = ReplyMarkupMessageFlags() var placeholder: String? switch apiMarkup { - case let .replyKeyboardMarkup(markupFlags, apiRows, apiPlaceholder): + case let .replyKeyboardMarkup(replyKeyboardMarkupData): + let (markupFlags, apiRows, apiPlaceholder) = (replyKeyboardMarkupData.flags, replyKeyboardMarkupData.rows, replyKeyboardMarkupData.placeholder) rows = apiRows.map { ReplyMarkupRow(apiRow: $0) } if (markupFlags & (1 << 0)) != 0 { flags.insert(.fit) @@ -190,10 +197,12 @@ extension ReplyMarkupMessageAttribute { flags.insert(.persistent) } placeholder = apiPlaceholder - case let .replyInlineMarkup(apiRows): + case let .replyInlineMarkup(replyInlineMarkupData): + let apiRows = replyInlineMarkupData.rows rows = apiRows.map { ReplyMarkupRow(apiRow: $0) } flags.insert(.inline) - case let .replyKeyboardForceReply(forceReplyFlags, apiPlaceholder): + case let .replyKeyboardForceReply(replyKeyboardForceReplyData): + let (forceReplyFlags, apiPlaceholder) = (replyKeyboardForceReplyData.flags, replyKeyboardForceReplyData.placeholder) if (forceReplyFlags & (1 << 1)) != 0 { flags.insert(.once) } @@ -202,7 +211,8 @@ extension ReplyMarkupMessageAttribute { } flags.insert(.setupReply) placeholder = apiPlaceholder - case let .replyKeyboardHide(hideFlags): + case let .replyKeyboardHide(replyKeyboardHideData): + let hideFlags = replyKeyboardHideData.flags if (hideFlags & (1 << 2)) != 0 { flags.insert(.personal) } diff --git a/submodules/TelegramCore/Sources/ApiUtils/RichText.swift b/submodules/TelegramCore/Sources/ApiUtils/RichText.swift index 04fb00e791..1bb3c1d9c8 100644 --- a/submodules/TelegramCore/Sources/ApiUtils/RichText.swift +++ b/submodules/TelegramCore/Sources/ApiUtils/RichText.swift @@ -8,35 +8,50 @@ extension RichText { switch apiText { case .textEmpty: self = .empty - case let .textPlain(text): + case let .textPlain(textPlainData): + let text = textPlainData.text self = .plain(text) - case let .textBold(text): + case let .textBold(textBoldData): + let text = textBoldData.text self = .bold(RichText(apiText: text)) - case let .textItalic(text): + case let .textItalic(textItalicData): + let text = textItalicData.text self = .italic(RichText(apiText: text)) - case let .textUnderline(text): + case let .textUnderline(textUnderlineData): + let text = textUnderlineData.text self = .underline(RichText(apiText: text)) - case let .textStrike(text): + case let .textStrike(textStrikeData): + let text = textStrikeData.text self = .strikethrough(RichText(apiText: text)) - case let .textFixed(text): + case let .textFixed(textFixedData): + let text = textFixedData.text self = .fixed(RichText(apiText: text)) - case let .textUrl(text, url, webpageId): + case let .textUrl(textUrlData): + let (text, url, webpageId) = (textUrlData.text, textUrlData.url, textUrlData.webpageId) self = .url(text: RichText(apiText: text), url: url, webpageId: webpageId == 0 ? nil : MediaId(namespace: Namespaces.Media.CloudWebpage, id: webpageId)) - case let .textEmail(text, email): + case let .textEmail(textEmailData): + let (text, email) = (textEmailData.text, textEmailData.email) self = .email(text: RichText(apiText: text), email: email) - case let .textConcat(texts): + case let .textConcat(textConcatData): + let texts = textConcatData.texts self = .concat(texts.map({ RichText(apiText: $0) })) - case let .textSubscript(text): + case let .textSubscript(textSubscriptData): + let text = textSubscriptData.text self = .subscript(RichText(apiText: text)) - case let .textSuperscript(text): + case let .textSuperscript(textSuperscriptData): + let text = textSuperscriptData.text self = .superscript(RichText(apiText: text)) - case let .textMarked(text): + case let .textMarked(textMarkedData): + let text = textMarkedData.text self = .marked(RichText(apiText: text)) - case let .textPhone(text, phone): + case let .textPhone(textPhoneData): + let (text, phone) = (textPhoneData.text, textPhoneData.phone) self = .phone(text: RichText(apiText: text), phone: phone) - case let .textImage(documentId, w, h): + case let .textImage(textImageData): + let (documentId, w, h) = (textImageData.documentId, textImageData.w, textImageData.h) self = .image(id: MediaId(namespace: Namespaces.Media.CloudFile, id: documentId), dimensions: PixelDimensions(width: w, height: h)) - case let .textAnchor(text, name): + case let .textAnchor(textAnchorData): + let (text, name) = (textAnchorData.text, textAnchorData.name) self = .anchor(text: RichText(apiText: text), name: name) } } diff --git a/submodules/TelegramCore/Sources/ForumChannels.swift b/submodules/TelegramCore/Sources/ForumChannels.swift index 889bce78e7..cfbb4886c4 100644 --- a/submodules/TelegramCore/Sources/ForumChannels.swift +++ b/submodules/TelegramCore/Sources/ForumChannels.swift @@ -785,7 +785,8 @@ func _internal_requestMessageHistoryThreads(accountPeerId: PeerId, postbox: Post for dialog in dialogs { switch dialog { - case let .savedDialog(flags, peer, topMessage): + case let .savedDialog(savedDialogData): + let (flags, peer, topMessage) = (savedDialogData.flags, savedDialogData.peer, savedDialogData.topMessage) if (flags & (1 << 2)) != 0 { pinnedIds.append(peer.peerId.toInt64()) } @@ -843,7 +844,8 @@ func _internal_requestMessageHistoryThreads(accountPeerId: PeerId, postbox: Post index: topicIndex, threadPeer: threadPeer )) - case let .monoForumDialog(flags, peer, topMessage, readInboxMaxId, readOutboxMaxId, unreadCount, unreadReactionsCount, _): + case let .monoForumDialog(monoForumDialogData): + let (flags, peer, topMessage, readInboxMaxId, readOutboxMaxId, unreadCount, unreadReactionsCount) = (monoForumDialogData.flags, monoForumDialogData.peer, monoForumDialogData.topMessage, monoForumDialogData.readInboxMaxId, monoForumDialogData.readOutboxMaxId, monoForumDialogData.unreadCount, monoForumDialogData.unreadReactionsCount) let isMarkedUnread = (flags & (1 << 3)) != 0 let data = MessageHistoryThreadData( creationDate: 0, diff --git a/submodules/TelegramCore/Sources/State/AccountStateManagementUtils.swift b/submodules/TelegramCore/Sources/State/AccountStateManagementUtils.swift index 5ea257c771..44f6464d93 100644 --- a/submodules/TelegramCore/Sources/State/AccountStateManagementUtils.swift +++ b/submodules/TelegramCore/Sources/State/AccountStateManagementUtils.swift @@ -2203,7 +2203,8 @@ func resolveForumThreads(accountPeerId: PeerId, postbox: Postbox, source: FetchM } case let .savedDialog(savedDialog): switch savedDialog { - case let .monoForumDialog(flags, peer, topMessage, readInboxMaxId, readOutboxMaxId, unreadCount, unreadReactionsCount, _): + case let .monoForumDialog(monoForumDialogData): + let (flags, peer, topMessage, readInboxMaxId, readOutboxMaxId, unreadCount, unreadReactionsCount, _) = (monoForumDialogData.flags, monoForumDialogData.peer, monoForumDialogData.topMessage, monoForumDialogData.readInboxMaxId, monoForumDialogData.readOutboxMaxId, monoForumDialogData.unreadCount, monoForumDialogData.unreadReactionsCount, monoForumDialogData.draft) state.operations.append(.ResetForumTopic( topicId: PeerAndBoundThreadId(peerId: peerId, threadId: peer.peerId.toInt64()), data: StoreMessageHistoryThreadData( @@ -2366,7 +2367,8 @@ func resolveForumThreads(accountPeerId: PeerId, postbox: Postbox, source: FetchM } case let .savedDialog(savedDialog): switch savedDialog { - case let .monoForumDialog(flags, peer, topMessage, readInboxMaxId, readOutboxMaxId, unreadCount, unreadReactionsCount, _): + case let .monoForumDialog(monoForumDialogData): + let (flags, peer, topMessage, readInboxMaxId, readOutboxMaxId, unreadCount, unreadReactionsCount, _) = (monoForumDialogData.flags, monoForumDialogData.peer, monoForumDialogData.topMessage, monoForumDialogData.readInboxMaxId, monoForumDialogData.readOutboxMaxId, monoForumDialogData.unreadCount, monoForumDialogData.unreadReactionsCount, monoForumDialogData.draft) let data = MessageHistoryThreadData( creationDate: 0, isOwnedByMe: true, @@ -2533,8 +2535,9 @@ func resolveForumThreads(accountPeerId: PeerId, postbox: Postbox, source: FetchM } case let .savedDialog(savedDialog): switch savedDialog { - case let .monoForumDialog(flags, peer, topMessage, readInboxMaxId, readOutboxMaxId, unreadCount, unreadReactionsCount, _): - + case let .monoForumDialog(monoForumDialogData): + let (flags, peer, topMessage, readInboxMaxId, readOutboxMaxId, unreadCount, unreadReactionsCount, _) = (monoForumDialogData.flags, monoForumDialogData.peer, monoForumDialogData.topMessage, monoForumDialogData.readInboxMaxId, monoForumDialogData.readOutboxMaxId, monoForumDialogData.unreadCount, monoForumDialogData.unreadReactionsCount, monoForumDialogData.draft) + fetchedChatList.threadInfos[PeerAndBoundThreadId(peerId: peerId, threadId: peer.peerId.toInt64())] = StoreMessageHistoryThreadData( data: MessageHistoryThreadData( creationDate: 0, diff --git a/submodules/TelegramCore/Sources/State/AccountViewTracker.swift b/submodules/TelegramCore/Sources/State/AccountViewTracker.swift index eabb5d99b2..c341876645 100644 --- a/submodules/TelegramCore/Sources/State/AccountViewTracker.swift +++ b/submodules/TelegramCore/Sources/State/AccountViewTracker.swift @@ -1444,7 +1444,8 @@ public final class AccountViewTracker { if i < slice.count { let value = result[i] switch value { - case let .recentStory(flags, maxId): + case let .recentStory(recentStoryData): + let (flags, maxId) = (recentStoryData.flags, recentStoryData.maxId) if let maxId { transaction.setStoryItemsInexactMaxId(peerId: slice[i].0, id: maxId, hasLiveItems: (flags & (1 << 0)) != 0) } else { @@ -1556,7 +1557,8 @@ public final class AccountViewTracker { case .requirementToContactPremium: flags.insert(.premiumRequired) sendPaidMessageStars = nil - case let .requirementToContactPaidMessages(starsAmount): + case let .requirementToContactPaidMessages(requirementToContactPaidMessagesData): + let starsAmount = requirementToContactPaidMessagesData.starsAmount flags.remove(.premiumRequired) sendPaidMessageStars = StarsAmount(value: starsAmount, nanos: 0) } diff --git a/submodules/TelegramCore/Sources/State/ManagedConsumePersonalMessagesActions.swift b/submodules/TelegramCore/Sources/State/ManagedConsumePersonalMessagesActions.swift index 6ee409a545..237a3c7a35 100644 --- a/submodules/TelegramCore/Sources/State/ManagedConsumePersonalMessagesActions.swift +++ b/submodules/TelegramCore/Sources/State/ManagedConsumePersonalMessagesActions.swift @@ -738,7 +738,8 @@ func synchronizeSavedMessageTags(postbox: Postbox, network: Network, peerId: Pee var parsedTags: [SavedMessageTags.Tag] = [] for tag in tags { switch tag { - case let .savedReactionTag(_, reaction, title, count): + case let .savedReactionTag(savedReactionTagData): + let (reaction, title, count) = (savedReactionTagData.reaction, savedReactionTagData.title, savedReactionTagData.count) guard let reaction = MessageReaction.Reaction(apiReaction: reaction) else { continue } diff --git a/submodules/TelegramCore/Sources/State/ManagedGlobalNotificationSettings.swift b/submodules/TelegramCore/Sources/State/ManagedGlobalNotificationSettings.swift index 603f9a7e27..0e401533f2 100644 --- a/submodules/TelegramCore/Sources/State/ManagedGlobalNotificationSettings.swift +++ b/submodules/TelegramCore/Sources/State/ManagedGlobalNotificationSettings.swift @@ -279,7 +279,8 @@ private func fetchedNotificationSettings(network: Network) -> Signal map(Optional.init) |> `catch` { _ -> Signal in diff --git a/submodules/TelegramCore/Sources/State/ManagedSynchronizePinnedChatsOperations.swift b/submodules/TelegramCore/Sources/State/ManagedSynchronizePinnedChatsOperations.swift index e0529d18f2..8c5b70a9e7 100644 --- a/submodules/TelegramCore/Sources/State/ManagedSynchronizePinnedChatsOperations.swift +++ b/submodules/TelegramCore/Sources/State/ManagedSynchronizePinnedChatsOperations.swift @@ -312,7 +312,8 @@ private func synchronizePinnedSavedChats(transaction: Transaction, postbox: Post loop: for dialog in dialogs { switch dialog { - case let .savedDialog(_, peer, _): + case let .savedDialog(savedDialogData): + let peer = savedDialogData.peer remoteItemIds.append(peer.peerId) } } diff --git a/submodules/TelegramCore/Sources/State/PremiumRequiredToContact.swift b/submodules/TelegramCore/Sources/State/PremiumRequiredToContact.swift index f6810684d1..d90c362ca2 100644 --- a/submodules/TelegramCore/Sources/State/PremiumRequiredToContact.swift +++ b/submodules/TelegramCore/Sources/State/PremiumRequiredToContact.swift @@ -51,7 +51,8 @@ internal func _internal_updateIsPremiumRequiredToContact(account: Account, peerI flags.insert(.premiumRequired) sendPaidMessageStars = nil requirements[peerId] = .premium - case let .requirementToContactPaidMessages(starsAmount): + case let .requirementToContactPaidMessages(requirementToContactPaidMessagesData): + let starsAmount = requirementToContactPaidMessagesData.starsAmount flags.remove(.premiumRequired) sendPaidMessageStars = StarsAmount(value: starsAmount, nanos: 0) requirements[peerId] = .stars(StarsAmount(value: starsAmount, nanos: 0)) diff --git a/submodules/TelegramCore/Sources/State/SavedMessageTags.swift b/submodules/TelegramCore/Sources/State/SavedMessageTags.swift index 3d0cb4e8f4..5716de0f0d 100644 --- a/submodules/TelegramCore/Sources/State/SavedMessageTags.swift +++ b/submodules/TelegramCore/Sources/State/SavedMessageTags.swift @@ -174,7 +174,8 @@ func managedSynchronizeSavedMessageTags(postbox: Postbox, network: Network, acco var parsedTags: [SavedMessageTags.Tag] = [] for tag in tags { switch tag { - case let .savedReactionTag(_, reaction, title, count): + case let .savedReactionTag(savedReactionTagData): + let (_, reaction, title, count) = (savedReactionTagData.flags, savedReactionTagData.reaction, savedReactionTagData.title, savedReactionTagData.count) guard let reaction = MessageReaction.Reaction(apiReaction: reaction) else { continue } diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/MessageReadStats.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/MessageReadStats.swift index 5883c8550a..317d7c3e99 100644 --- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/MessageReadStats.swift +++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/MessageReadStats.swift @@ -48,7 +48,8 @@ func _internal_messageReadStats(account: Account, id: MessageId) -> Signal map { result -> ReportContentResult in switch result { - case let .reportResultChooseOption(title, options): + case let .reportResultChooseOption(reportResultChooseOptionData): + let (title, options) = (reportResultChooseOptionData.title, reportResultChooseOptionData.options) return .options(title: title, options: options.map { switch $0 { case let .messageReportOption(messageReportOptionData): @@ -71,7 +72,8 @@ func _internal_reportContent(account: Account, subject: ReportContentSubject, op return ReportContentResult.Option(text: text, option: option.makeData()) } }) - case let .reportResultAddComment(flags, option): + case let .reportResultAddComment(reportResultAddCommentData): + let (flags, option) = (reportResultAddCommentData.flags, reportResultAddCommentData.option) return .addComment(optional: (flags & (1 << 0)) != 0, option: option.makeData()) case .reportResultReported: return .reported diff --git a/submodules/TelegramCore/Sources/TelegramEngine/Messages/SearchMessages.swift b/submodules/TelegramCore/Sources/TelegramEngine/Messages/SearchMessages.swift index fd05a6a523..7de30abf00 100644 --- a/submodules/TelegramCore/Sources/TelegramEngine/Messages/SearchMessages.swift +++ b/submodules/TelegramCore/Sources/TelegramEngine/Messages/SearchMessages.swift @@ -608,7 +608,8 @@ func _internal_searchMessages(account: Account, location: SearchMessagesLocation if let searchFlood { transaction.updatePreferencesEntry(key: PreferencesKeys.globalPostSearchState(), { _ in switch searchFlood { - case let .searchPostsFlood(_, totalDaily, remains, waitTill, starsAmount): + case let .searchPostsFlood(searchPostsFloodData): + let (_, totalDaily, remains, waitTill, starsAmount) = (searchPostsFloodData.flags, searchPostsFloodData.totalDaily, searchPostsFloodData.remains, searchPostsFloodData.waitTill, searchPostsFloodData.starsAmount) return PreferencesEntry(TelegramGlobalPostSearchState( totalFreeSearches: totalDaily, remainingFreeSearches: remains, @@ -1102,7 +1103,8 @@ func _internal_refreshGlobalPostSearchState(account: Account) -> Signal