diff --git a/submodules/TelegramApi/Sources/Api1.swift b/submodules/TelegramApi/Sources/Api1.swift index 5718ccf94d..01829ba6de 100644 --- a/submodules/TelegramApi/Sources/Api1.swift +++ b/submodules/TelegramApi/Sources/Api1.swift @@ -16,7 +16,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .accountDaysTTL(let days): - return ("accountDaysTTL", [("days", String(describing: days))]) + return ("accountDaysTTL", [("days", days as Any)]) } } @@ -64,7 +64,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .attachMenuBot(let flags, let botId, let shortName, let peerTypes, let icons): - return ("attachMenuBot", [("flags", String(describing: flags)), ("botId", String(describing: botId)), ("shortName", String(describing: shortName)), ("peerTypes", String(describing: peerTypes)), ("icons", String(describing: icons))]) + return ("attachMenuBot", [("flags", flags as Any), ("botId", botId as Any), ("shortName", shortName as Any), ("peerTypes", peerTypes as Any), ("icons", icons as Any)]) } } @@ -123,7 +123,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .attachMenuBotIcon(let flags, let name, let icon, let colors): - return ("attachMenuBotIcon", [("flags", String(describing: flags)), ("name", String(describing: name)), ("icon", String(describing: icon)), ("colors", String(describing: colors))]) + return ("attachMenuBotIcon", [("flags", flags as Any), ("name", name as Any), ("icon", icon as Any), ("colors", colors as Any)]) } } @@ -173,7 +173,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .attachMenuBotIconColor(let name, let color): - return ("attachMenuBotIconColor", [("name", String(describing: name)), ("color", String(describing: color))]) + return ("attachMenuBotIconColor", [("name", name as Any), ("color", color as Any)]) } } @@ -229,7 +229,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .attachMenuBots(let hash, let bots, let users): - return ("attachMenuBots", [("hash", String(describing: hash)), ("bots", String(describing: bots)), ("users", String(describing: users))]) + return ("attachMenuBots", [("hash", hash as Any), ("bots", bots as Any), ("users", users as Any)]) case .attachMenuBotsNotModified: return ("attachMenuBotsNotModified", []) } @@ -285,7 +285,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .attachMenuBotsBot(let bot, let users): - return ("attachMenuBotsBot", [("bot", String(describing: bot)), ("users", String(describing: users))]) + return ("attachMenuBotsBot", [("bot", bot as Any), ("users", users as Any)]) } } @@ -416,7 +416,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .authorization(let flags, let hash, let deviceModel, let platform, let systemVersion, let apiId, let appName, let appVersion, let dateCreated, let dateActive, let ip, let country, let region): - return ("authorization", [("flags", String(describing: flags)), ("hash", String(describing: hash)), ("deviceModel", String(describing: deviceModel)), ("platform", String(describing: platform)), ("systemVersion", String(describing: systemVersion)), ("apiId", String(describing: apiId)), ("appName", String(describing: appName)), ("appVersion", String(describing: appVersion)), ("dateCreated", String(describing: dateCreated)), ("dateActive", String(describing: dateActive)), ("ip", String(describing: ip)), ("country", String(describing: country)), ("region", String(describing: region))]) + return ("authorization", [("flags", flags as Any), ("hash", hash as Any), ("deviceModel", deviceModel as Any), ("platform", platform as Any), ("systemVersion", systemVersion as Any), ("apiId", apiId as Any), ("appName", appName as Any), ("appVersion", appVersion as Any), ("dateCreated", dateCreated as Any), ("dateActive", dateActive as Any), ("ip", ip as Any), ("country", country as Any), ("region", region as Any)]) } } @@ -492,7 +492,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .autoDownloadSettings(let flags, let photoSizeMax, let videoSizeMax, let fileSizeMax, let videoUploadMaxbitrate): - return ("autoDownloadSettings", [("flags", String(describing: flags)), ("photoSizeMax", String(describing: photoSizeMax)), ("videoSizeMax", String(describing: videoSizeMax)), ("fileSizeMax", String(describing: fileSizeMax)), ("videoUploadMaxbitrate", String(describing: videoUploadMaxbitrate))]) + return ("autoDownloadSettings", [("flags", flags as Any), ("photoSizeMax", photoSizeMax as Any), ("videoSizeMax", videoSizeMax as Any), ("fileSizeMax", fileSizeMax as Any), ("videoUploadMaxbitrate", videoUploadMaxbitrate as Any)]) } } @@ -549,7 +549,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .availableReaction(let flags, let reaction, let title, let staticIcon, let appearAnimation, let selectAnimation, let activateAnimation, let effectAnimation, let aroundAnimation, let centerIcon): - return ("availableReaction", [("flags", String(describing: flags)), ("reaction", String(describing: reaction)), ("title", String(describing: title)), ("staticIcon", String(describing: staticIcon)), ("appearAnimation", String(describing: appearAnimation)), ("selectAnimation", String(describing: selectAnimation)), ("activateAnimation", String(describing: activateAnimation)), ("effectAnimation", String(describing: effectAnimation)), ("aroundAnimation", String(describing: aroundAnimation)), ("centerIcon", String(describing: centerIcon))]) + return ("availableReaction", [("flags", flags as Any), ("reaction", reaction as Any), ("title", title as Any), ("staticIcon", staticIcon as Any), ("appearAnimation", appearAnimation as Any), ("selectAnimation", selectAnimation as Any), ("activateAnimation", activateAnimation as Any), ("effectAnimation", effectAnimation as Any), ("aroundAnimation", aroundAnimation as Any), ("centerIcon", centerIcon as Any)]) } } @@ -627,7 +627,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .bankCardOpenUrl(let url, let name): - return ("bankCardOpenUrl", [("url", String(describing: url)), ("name", String(describing: name))]) + return ("bankCardOpenUrl", [("url", url as Any), ("name", name as Any)]) } } @@ -783,7 +783,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .botCommand(let command, let description): - return ("botCommand", [("command", String(describing: command)), ("description", String(describing: description))]) + return ("botCommand", [("command", command as Any), ("description", description as Any)]) } } @@ -871,11 +871,11 @@ public extension Api { case .botCommandScopeDefault: return ("botCommandScopeDefault", []) case .botCommandScopePeer(let peer): - return ("botCommandScopePeer", [("peer", String(describing: peer))]) + return ("botCommandScopePeer", [("peer", peer as Any)]) case .botCommandScopePeerAdmins(let peer): - return ("botCommandScopePeerAdmins", [("peer", String(describing: peer))]) + return ("botCommandScopePeerAdmins", [("peer", peer as Any)]) case .botCommandScopePeerUser(let peer, let userId): - return ("botCommandScopePeerUser", [("peer", String(describing: peer)), ("userId", String(describing: userId))]) + return ("botCommandScopePeerUser", [("peer", peer as Any), ("userId", userId as Any)]) case .botCommandScopeUsers: return ("botCommandScopeUsers", []) } @@ -968,7 +968,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .botInfo(let flags, let userId, let description, let descriptionPhoto, let descriptionDocument, let commands, let menuButton): - return ("botInfo", [("flags", String(describing: flags)), ("userId", String(describing: userId)), ("description", String(describing: description)), ("descriptionPhoto", String(describing: descriptionPhoto)), ("descriptionDocument", String(describing: descriptionDocument)), ("commands", String(describing: commands)), ("menuButton", String(describing: menuButton))]) + return ("botInfo", [("flags", flags as Any), ("userId", userId as Any), ("description", description as Any), ("descriptionPhoto", descriptionPhoto as Any), ("descriptionDocument", descriptionDocument as Any), ("commands", commands as Any), ("menuButton", menuButton as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api10.swift b/submodules/TelegramApi/Sources/Api10.swift index 5d867ef90d..ffdf3f8477 100644 --- a/submodules/TelegramApi/Sources/Api10.swift +++ b/submodules/TelegramApi/Sources/Api10.swift @@ -84,7 +84,7 @@ public extension Api { case .inputStickerSetAnimatedEmojiAnimations: return ("inputStickerSetAnimatedEmojiAnimations", []) case .inputStickerSetDice(let emoticon): - return ("inputStickerSetDice", [("emoticon", String(describing: emoticon))]) + return ("inputStickerSetDice", [("emoticon", emoticon as Any)]) case .inputStickerSetEmojiDefaultStatuses: return ("inputStickerSetEmojiDefaultStatuses", []) case .inputStickerSetEmojiDefaultTopicIcons: @@ -94,11 +94,11 @@ public extension Api { case .inputStickerSetEmpty: return ("inputStickerSetEmpty", []) case .inputStickerSetID(let id, let accessHash): - return ("inputStickerSetID", [("id", String(describing: id)), ("accessHash", String(describing: accessHash))]) + return ("inputStickerSetID", [("id", id as Any), ("accessHash", accessHash as Any)]) case .inputStickerSetPremiumGifts: return ("inputStickerSetPremiumGifts", []) case .inputStickerSetShortName(let shortName): - return ("inputStickerSetShortName", [("shortName", String(describing: shortName))]) + return ("inputStickerSetShortName", [("shortName", shortName as Any)]) } } @@ -183,7 +183,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputStickerSetItem(let flags, let document, let emoji, let maskCoords): - return ("inputStickerSetItem", [("flags", String(describing: flags)), ("document", String(describing: document)), ("emoji", String(describing: emoji)), ("maskCoords", String(describing: maskCoords))]) + return ("inputStickerSetItem", [("flags", flags as Any), ("document", document as Any), ("emoji", emoji as Any), ("maskCoords", maskCoords as Any)]) } } @@ -239,9 +239,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputStickeredMediaDocument(let id): - return ("inputStickeredMediaDocument", [("id", String(describing: id))]) + return ("inputStickeredMediaDocument", [("id", id as Any)]) case .inputStickeredMediaPhoto(let id): - return ("inputStickeredMediaPhoto", [("id", String(describing: id))]) + return ("inputStickeredMediaPhoto", [("id", id as Any)]) } } @@ -301,9 +301,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputStorePaymentGiftPremium(let userId, let currency, let amount): - return ("inputStorePaymentGiftPremium", [("userId", String(describing: userId)), ("currency", String(describing: currency)), ("amount", String(describing: amount))]) + return ("inputStorePaymentGiftPremium", [("userId", userId as Any), ("currency", currency as Any), ("amount", amount as Any)]) case .inputStorePaymentPremiumSubscription(let flags): - return ("inputStorePaymentPremiumSubscription", [("flags", String(describing: flags))]) + return ("inputStorePaymentPremiumSubscription", [("flags", flags as Any)]) } } @@ -366,9 +366,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputTheme(let id, let accessHash): - return ("inputTheme", [("id", String(describing: id)), ("accessHash", String(describing: accessHash))]) + return ("inputTheme", [("id", id as Any), ("accessHash", accessHash as Any)]) case .inputThemeSlug(let slug): - return ("inputThemeSlug", [("slug", String(describing: slug))]) + return ("inputThemeSlug", [("slug", slug as Any)]) } } @@ -428,7 +428,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputThemeSettings(let flags, let baseTheme, let accentColor, let outboxAccentColor, let messageColors, let wallpaper, let wallpaperSettings): - return ("inputThemeSettings", [("flags", String(describing: flags)), ("baseTheme", String(describing: baseTheme)), ("accentColor", String(describing: accentColor)), ("outboxAccentColor", String(describing: outboxAccentColor)), ("messageColors", String(describing: messageColors)), ("wallpaper", String(describing: wallpaper)), ("wallpaperSettings", String(describing: wallpaperSettings))]) + return ("inputThemeSettings", [("flags", flags as Any), ("baseTheme", baseTheme as Any), ("accentColor", accentColor as Any), ("outboxAccentColor", outboxAccentColor as Any), ("messageColors", messageColors as Any), ("wallpaper", wallpaper as Any), ("wallpaperSettings", wallpaperSettings as Any)]) } } @@ -514,11 +514,11 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputUser(let userId, let accessHash): - return ("inputUser", [("userId", String(describing: userId)), ("accessHash", String(describing: accessHash))]) + return ("inputUser", [("userId", userId as Any), ("accessHash", accessHash as Any)]) case .inputUserEmpty: return ("inputUserEmpty", []) case .inputUserFromMessage(let peer, let msgId, let userId): - return ("inputUserFromMessage", [("peer", String(describing: peer)), ("msgId", String(describing: msgId)), ("userId", String(describing: userId))]) + return ("inputUserFromMessage", [("peer", peer as Any), ("msgId", msgId as Any), ("userId", userId as Any)]) case .inputUserSelf: return ("inputUserSelf", []) } @@ -599,11 +599,11 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputWallPaper(let id, let accessHash): - return ("inputWallPaper", [("id", String(describing: id)), ("accessHash", String(describing: accessHash))]) + return ("inputWallPaper", [("id", id as Any), ("accessHash", accessHash as Any)]) case .inputWallPaperNoFile(let id): - return ("inputWallPaperNoFile", [("id", String(describing: id))]) + return ("inputWallPaperNoFile", [("id", id as Any)]) case .inputWallPaperSlug(let slug): - return ("inputWallPaperSlug", [("slug", String(describing: slug))]) + return ("inputWallPaperSlug", [("slug", slug as Any)]) } } @@ -671,7 +671,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputWebDocument(let url, let size, let mimeType, let attributes): - return ("inputWebDocument", [("url", String(describing: url)), ("size", String(describing: size)), ("mimeType", String(describing: mimeType)), ("attributes", String(describing: attributes))]) + return ("inputWebDocument", [("url", url as Any), ("size", size as Any), ("mimeType", mimeType as Any), ("attributes", attributes as Any)]) } } @@ -741,11 +741,11 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputWebFileAudioAlbumThumbLocation(let flags, let document, let title, let performer): - return ("inputWebFileAudioAlbumThumbLocation", [("flags", String(describing: flags)), ("document", String(describing: document)), ("title", String(describing: title)), ("performer", String(describing: performer))]) + return ("inputWebFileAudioAlbumThumbLocation", [("flags", flags as Any), ("document", document as Any), ("title", title as Any), ("performer", performer as Any)]) case .inputWebFileGeoPointLocation(let geoPoint, let accessHash, let w, let h, let zoom, let scale): - return ("inputWebFileGeoPointLocation", [("geoPoint", String(describing: geoPoint)), ("accessHash", String(describing: accessHash)), ("w", String(describing: w)), ("h", String(describing: h)), ("zoom", String(describing: zoom)), ("scale", String(describing: scale))]) + return ("inputWebFileGeoPointLocation", [("geoPoint", geoPoint as Any), ("accessHash", accessHash as Any), ("w", w as Any), ("h", h as Any), ("zoom", zoom as Any), ("scale", scale as Any)]) case .inputWebFileLocation(let url, let accessHash): - return ("inputWebFileLocation", [("url", String(describing: url)), ("accessHash", String(describing: accessHash))]) + return ("inputWebFileLocation", [("url", url as Any), ("accessHash", accessHash as Any)]) } } @@ -847,7 +847,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .invoice(let flags, let currency, let prices, let maxTipAmount, let suggestedTipAmounts, let recurringTermsUrl): - return ("invoice", [("flags", String(describing: flags)), ("currency", String(describing: currency)), ("prices", String(describing: prices)), ("maxTipAmount", String(describing: maxTipAmount)), ("suggestedTipAmounts", String(describing: suggestedTipAmounts)), ("recurringTermsUrl", String(describing: recurringTermsUrl))]) + return ("invoice", [("flags", flags as Any), ("currency", currency as Any), ("prices", prices as Any), ("maxTipAmount", maxTipAmount as Any), ("suggestedTipAmounts", suggestedTipAmounts as Any), ("recurringTermsUrl", recurringTermsUrl as Any)]) } } @@ -903,7 +903,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .jsonObjectValue(let key, let value): - return ("jsonObjectValue", [("key", String(describing: key)), ("value", String(describing: value))]) + return ("jsonObjectValue", [("key", key as Any), ("value", value as Any)]) } } @@ -987,17 +987,17 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .jsonArray(let value): - return ("jsonArray", [("value", String(describing: value))]) + return ("jsonArray", [("value", value as Any)]) case .jsonBool(let value): - return ("jsonBool", [("value", String(describing: value))]) + return ("jsonBool", [("value", value as Any)]) case .jsonNull: return ("jsonNull", []) case .jsonNumber(let value): - return ("jsonNumber", [("value", String(describing: value))]) + return ("jsonNumber", [("value", value as Any)]) case .jsonObject(let value): - return ("jsonObject", [("value", String(describing: value))]) + return ("jsonObject", [("value", value as Any)]) case .jsonString(let value): - return ("jsonString", [("value", String(describing: value))]) + return ("jsonString", [("value", value as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api11.swift b/submodules/TelegramApi/Sources/Api11.swift index 38443bc319..b3a214f317 100644 --- a/submodules/TelegramApi/Sources/Api11.swift +++ b/submodules/TelegramApi/Sources/Api11.swift @@ -133,35 +133,35 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputKeyboardButtonUrlAuth(let flags, let text, let fwdText, let url, let bot): - return ("inputKeyboardButtonUrlAuth", [("flags", String(describing: flags)), ("text", String(describing: text)), ("fwdText", String(describing: fwdText)), ("url", String(describing: url)), ("bot", String(describing: bot))]) + return ("inputKeyboardButtonUrlAuth", [("flags", flags as Any), ("text", text as Any), ("fwdText", fwdText as Any), ("url", url as Any), ("bot", bot as Any)]) case .inputKeyboardButtonUserProfile(let text, let userId): - return ("inputKeyboardButtonUserProfile", [("text", String(describing: text)), ("userId", String(describing: userId))]) + return ("inputKeyboardButtonUserProfile", [("text", text as Any), ("userId", userId as Any)]) case .keyboardButton(let text): - return ("keyboardButton", [("text", String(describing: text))]) + return ("keyboardButton", [("text", text as Any)]) case .keyboardButtonBuy(let text): - return ("keyboardButtonBuy", [("text", String(describing: text))]) + return ("keyboardButtonBuy", [("text", text as Any)]) case .keyboardButtonCallback(let flags, let text, let data): - return ("keyboardButtonCallback", [("flags", String(describing: flags)), ("text", String(describing: text)), ("data", String(describing: data))]) + return ("keyboardButtonCallback", [("flags", flags as Any), ("text", text as Any), ("data", data as Any)]) case .keyboardButtonGame(let text): - return ("keyboardButtonGame", [("text", String(describing: text))]) + return ("keyboardButtonGame", [("text", text as Any)]) case .keyboardButtonRequestGeoLocation(let text): - return ("keyboardButtonRequestGeoLocation", [("text", String(describing: text))]) + return ("keyboardButtonRequestGeoLocation", [("text", text as Any)]) case .keyboardButtonRequestPhone(let text): - return ("keyboardButtonRequestPhone", [("text", String(describing: text))]) + return ("keyboardButtonRequestPhone", [("text", text as Any)]) case .keyboardButtonRequestPoll(let flags, let quiz, let text): - return ("keyboardButtonRequestPoll", [("flags", String(describing: flags)), ("quiz", String(describing: quiz)), ("text", String(describing: text))]) + return ("keyboardButtonRequestPoll", [("flags", flags as Any), ("quiz", quiz as Any), ("text", text as Any)]) case .keyboardButtonSimpleWebView(let text, let url): - return ("keyboardButtonSimpleWebView", [("text", String(describing: text)), ("url", String(describing: url))]) + return ("keyboardButtonSimpleWebView", [("text", text as Any), ("url", url as Any)]) case .keyboardButtonSwitchInline(let flags, let text, let query): - return ("keyboardButtonSwitchInline", [("flags", String(describing: flags)), ("text", String(describing: text)), ("query", String(describing: query))]) + return ("keyboardButtonSwitchInline", [("flags", flags as Any), ("text", text as Any), ("query", query as Any)]) case .keyboardButtonUrl(let text, let url): - return ("keyboardButtonUrl", [("text", String(describing: text)), ("url", String(describing: url))]) + return ("keyboardButtonUrl", [("text", text as Any), ("url", url as Any)]) case .keyboardButtonUrlAuth(let flags, let text, let fwdText, let url, let buttonId): - return ("keyboardButtonUrlAuth", [("flags", String(describing: flags)), ("text", String(describing: text)), ("fwdText", String(describing: fwdText)), ("url", String(describing: url)), ("buttonId", String(describing: buttonId))]) + return ("keyboardButtonUrlAuth", [("flags", flags as Any), ("text", text as Any), ("fwdText", fwdText as Any), ("url", url as Any), ("buttonId", buttonId as Any)]) case .keyboardButtonUserProfile(let text, let userId): - return ("keyboardButtonUserProfile", [("text", String(describing: text)), ("userId", String(describing: userId))]) + return ("keyboardButtonUserProfile", [("text", text as Any), ("userId", userId as Any)]) case .keyboardButtonWebView(let text, let url): - return ("keyboardButtonWebView", [("text", String(describing: text)), ("url", String(describing: url))]) + return ("keyboardButtonWebView", [("text", text as Any), ("url", url as Any)]) } } @@ -418,7 +418,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .keyboardButtonRow(let buttons): - return ("keyboardButtonRow", [("buttons", String(describing: buttons))]) + return ("keyboardButtonRow", [("buttons", buttons as Any)]) } } @@ -457,7 +457,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .labeledPrice(let label, let amount): - return ("labeledPrice", [("label", String(describing: label)), ("amount", String(describing: amount))]) + return ("labeledPrice", [("label", label as Any), ("amount", amount as Any)]) } } @@ -503,7 +503,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .langPackDifference(let langCode, let fromVersion, let version, let strings): - return ("langPackDifference", [("langCode", String(describing: langCode)), ("fromVersion", String(describing: fromVersion)), ("version", String(describing: version)), ("strings", String(describing: strings))]) + return ("langPackDifference", [("langCode", langCode as Any), ("fromVersion", fromVersion as Any), ("version", version as Any), ("strings", strings as Any)]) } } @@ -558,7 +558,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .langPackLanguage(let flags, let name, let nativeName, let langCode, let baseLangCode, let pluralCode, let stringsCount, let translatedCount, let translationsUrl): - return ("langPackLanguage", [("flags", String(describing: flags)), ("name", String(describing: name)), ("nativeName", String(describing: nativeName)), ("langCode", String(describing: langCode)), ("baseLangCode", String(describing: baseLangCode)), ("pluralCode", String(describing: pluralCode)), ("stringsCount", String(describing: stringsCount)), ("translatedCount", String(describing: translatedCount)), ("translationsUrl", String(describing: translationsUrl))]) + return ("langPackLanguage", [("flags", flags as Any), ("name", name as Any), ("nativeName", nativeName as Any), ("langCode", langCode as Any), ("baseLangCode", baseLangCode as Any), ("pluralCode", pluralCode as Any), ("stringsCount", stringsCount as Any), ("translatedCount", translatedCount as Any), ("translationsUrl", translationsUrl as Any)]) } } @@ -640,11 +640,11 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .langPackString(let key, let value): - return ("langPackString", [("key", String(describing: key)), ("value", String(describing: value))]) + return ("langPackString", [("key", key as Any), ("value", value as Any)]) case .langPackStringDeleted(let key): - return ("langPackStringDeleted", [("key", String(describing: key))]) + return ("langPackStringDeleted", [("key", key as Any)]) case .langPackStringPluralized(let flags, let key, let zeroValue, let oneValue, let twoValue, let fewValue, let manyValue, let otherValue): - return ("langPackStringPluralized", [("flags", String(describing: flags)), ("key", String(describing: key)), ("zeroValue", String(describing: zeroValue)), ("oneValue", String(describing: oneValue)), ("twoValue", String(describing: twoValue)), ("fewValue", String(describing: fewValue)), ("manyValue", String(describing: manyValue)), ("otherValue", String(describing: otherValue))]) + return ("langPackStringPluralized", [("flags", flags as Any), ("key", key as Any), ("zeroValue", zeroValue as Any), ("oneValue", oneValue as Any), ("twoValue", twoValue as Any), ("fewValue", fewValue as Any), ("manyValue", manyValue as Any), ("otherValue", otherValue as Any)]) } } @@ -729,7 +729,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .maskCoords(let n, let x, let y, let zoom): - return ("maskCoords", [("n", String(describing: n)), ("x", String(describing: x)), ("y", String(describing: y)), ("zoom", String(describing: zoom))]) + return ("maskCoords", [("n", n as Any), ("x", x as Any), ("y", y as Any), ("zoom", zoom as Any)]) } } @@ -825,11 +825,11 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .message(let flags, let id, let fromId, let peerId, let fwdFrom, let viaBotId, let replyTo, let date, let message, let media, let replyMarkup, let entities, let views, let forwards, let replies, let editDate, let postAuthor, let groupedId, let reactions, let restrictionReason, let ttlPeriod): - return ("message", [("flags", String(describing: flags)), ("id", String(describing: id)), ("fromId", String(describing: fromId)), ("peerId", String(describing: peerId)), ("fwdFrom", String(describing: fwdFrom)), ("viaBotId", String(describing: viaBotId)), ("replyTo", String(describing: replyTo)), ("date", String(describing: date)), ("message", String(describing: message)), ("media", String(describing: media)), ("replyMarkup", String(describing: replyMarkup)), ("entities", String(describing: entities)), ("views", String(describing: views)), ("forwards", String(describing: forwards)), ("replies", String(describing: replies)), ("editDate", String(describing: editDate)), ("postAuthor", String(describing: postAuthor)), ("groupedId", String(describing: groupedId)), ("reactions", String(describing: reactions)), ("restrictionReason", String(describing: restrictionReason)), ("ttlPeriod", String(describing: ttlPeriod))]) + return ("message", [("flags", flags as Any), ("id", id as Any), ("fromId", fromId as Any), ("peerId", peerId as Any), ("fwdFrom", fwdFrom as Any), ("viaBotId", viaBotId as Any), ("replyTo", replyTo as Any), ("date", date as Any), ("message", message as Any), ("media", media as Any), ("replyMarkup", replyMarkup as Any), ("entities", entities as Any), ("views", views as Any), ("forwards", forwards as Any), ("replies", replies as Any), ("editDate", editDate as Any), ("postAuthor", postAuthor as Any), ("groupedId", groupedId as Any), ("reactions", reactions as Any), ("restrictionReason", restrictionReason as Any), ("ttlPeriod", ttlPeriod as Any)]) case .messageEmpty(let flags, let id, let peerId): - return ("messageEmpty", [("flags", String(describing: flags)), ("id", String(describing: id)), ("peerId", String(describing: peerId))]) + return ("messageEmpty", [("flags", flags as Any), ("id", id as Any), ("peerId", peerId as Any)]) case .messageService(let flags, let id, let fromId, let peerId, let replyTo, let date, let action, let ttlPeriod): - return ("messageService", [("flags", String(describing: flags)), ("id", String(describing: id)), ("fromId", String(describing: fromId)), ("peerId", String(describing: peerId)), ("replyTo", String(describing: replyTo)), ("date", String(describing: date)), ("action", String(describing: action)), ("ttlPeriod", String(describing: ttlPeriod))]) + return ("messageService", [("flags", flags as Any), ("id", id as Any), ("fromId", fromId as Any), ("peerId", peerId as Any), ("replyTo", replyTo as Any), ("date", date as Any), ("action", action as Any), ("ttlPeriod", ttlPeriod as Any)]) } } @@ -1312,77 +1312,77 @@ public extension Api { case .messageActionAttachMenuBotAllowed: return ("messageActionAttachMenuBotAllowed", []) case .messageActionBotAllowed(let domain): - return ("messageActionBotAllowed", [("domain", String(describing: domain))]) + return ("messageActionBotAllowed", [("domain", domain as Any)]) case .messageActionChannelCreate(let title): - return ("messageActionChannelCreate", [("title", String(describing: title))]) + return ("messageActionChannelCreate", [("title", title as Any)]) case .messageActionChannelMigrateFrom(let title, let chatId): - return ("messageActionChannelMigrateFrom", [("title", String(describing: title)), ("chatId", String(describing: chatId))]) + return ("messageActionChannelMigrateFrom", [("title", title as Any), ("chatId", chatId as Any)]) case .messageActionChatAddUser(let users): - return ("messageActionChatAddUser", [("users", String(describing: users))]) + return ("messageActionChatAddUser", [("users", users as Any)]) case .messageActionChatCreate(let title, let users): - return ("messageActionChatCreate", [("title", String(describing: title)), ("users", String(describing: users))]) + return ("messageActionChatCreate", [("title", title as Any), ("users", users as Any)]) case .messageActionChatDeletePhoto: return ("messageActionChatDeletePhoto", []) case .messageActionChatDeleteUser(let userId): - return ("messageActionChatDeleteUser", [("userId", String(describing: userId))]) + return ("messageActionChatDeleteUser", [("userId", userId as Any)]) case .messageActionChatEditPhoto(let photo): - return ("messageActionChatEditPhoto", [("photo", String(describing: photo))]) + return ("messageActionChatEditPhoto", [("photo", photo as Any)]) case .messageActionChatEditTitle(let title): - return ("messageActionChatEditTitle", [("title", String(describing: title))]) + return ("messageActionChatEditTitle", [("title", title as Any)]) case .messageActionChatJoinedByLink(let inviterId): - return ("messageActionChatJoinedByLink", [("inviterId", String(describing: inviterId))]) + return ("messageActionChatJoinedByLink", [("inviterId", inviterId as Any)]) case .messageActionChatJoinedByRequest: return ("messageActionChatJoinedByRequest", []) case .messageActionChatMigrateTo(let channelId): - return ("messageActionChatMigrateTo", [("channelId", String(describing: channelId))]) + return ("messageActionChatMigrateTo", [("channelId", channelId as Any)]) case .messageActionContactSignUp: return ("messageActionContactSignUp", []) case .messageActionCustomAction(let message): - return ("messageActionCustomAction", [("message", String(describing: message))]) + return ("messageActionCustomAction", [("message", message as Any)]) case .messageActionEmpty: return ("messageActionEmpty", []) case .messageActionGameScore(let gameId, let score): - return ("messageActionGameScore", [("gameId", String(describing: gameId)), ("score", String(describing: score))]) + return ("messageActionGameScore", [("gameId", gameId as Any), ("score", score as Any)]) case .messageActionGeoProximityReached(let fromId, let toId, let distance): - return ("messageActionGeoProximityReached", [("fromId", String(describing: fromId)), ("toId", String(describing: toId)), ("distance", String(describing: distance))]) + return ("messageActionGeoProximityReached", [("fromId", fromId as Any), ("toId", toId as Any), ("distance", distance as Any)]) case .messageActionGiftPremium(let currency, let amount, let months): - return ("messageActionGiftPremium", [("currency", String(describing: currency)), ("amount", String(describing: amount)), ("months", String(describing: months))]) + return ("messageActionGiftPremium", [("currency", currency as Any), ("amount", amount as Any), ("months", months as Any)]) case .messageActionGroupCall(let flags, let call, let duration): - return ("messageActionGroupCall", [("flags", String(describing: flags)), ("call", String(describing: call)), ("duration", String(describing: duration))]) + return ("messageActionGroupCall", [("flags", flags as Any), ("call", call as Any), ("duration", duration as Any)]) case .messageActionGroupCallScheduled(let call, let scheduleDate): - return ("messageActionGroupCallScheduled", [("call", String(describing: call)), ("scheduleDate", String(describing: scheduleDate))]) + return ("messageActionGroupCallScheduled", [("call", call as Any), ("scheduleDate", scheduleDate as Any)]) case .messageActionHistoryClear: return ("messageActionHistoryClear", []) case .messageActionInviteToGroupCall(let call, let users): - return ("messageActionInviteToGroupCall", [("call", String(describing: call)), ("users", String(describing: users))]) + return ("messageActionInviteToGroupCall", [("call", call as Any), ("users", users as Any)]) case .messageActionPaymentSent(let flags, let currency, let totalAmount, let invoiceSlug): - return ("messageActionPaymentSent", [("flags", String(describing: flags)), ("currency", String(describing: currency)), ("totalAmount", String(describing: totalAmount)), ("invoiceSlug", String(describing: invoiceSlug))]) + return ("messageActionPaymentSent", [("flags", flags as Any), ("currency", currency as Any), ("totalAmount", totalAmount as Any), ("invoiceSlug", invoiceSlug as Any)]) case .messageActionPaymentSentMe(let flags, let currency, let totalAmount, let payload, let info, let shippingOptionId, let charge): - return ("messageActionPaymentSentMe", [("flags", String(describing: flags)), ("currency", String(describing: currency)), ("totalAmount", String(describing: totalAmount)), ("payload", String(describing: payload)), ("info", String(describing: info)), ("shippingOptionId", String(describing: shippingOptionId)), ("charge", String(describing: charge))]) + return ("messageActionPaymentSentMe", [("flags", flags as Any), ("currency", currency as Any), ("totalAmount", totalAmount as Any), ("payload", payload as Any), ("info", info as Any), ("shippingOptionId", shippingOptionId as Any), ("charge", charge as Any)]) case .messageActionPhoneCall(let flags, let callId, let reason, let duration): - return ("messageActionPhoneCall", [("flags", String(describing: flags)), ("callId", String(describing: callId)), ("reason", String(describing: reason)), ("duration", String(describing: duration))]) + return ("messageActionPhoneCall", [("flags", flags as Any), ("callId", callId as Any), ("reason", reason as Any), ("duration", duration as Any)]) case .messageActionPinMessage: return ("messageActionPinMessage", []) case .messageActionScreenshotTaken: return ("messageActionScreenshotTaken", []) case .messageActionSecureValuesSent(let types): - return ("messageActionSecureValuesSent", [("types", String(describing: types))]) + return ("messageActionSecureValuesSent", [("types", types as Any)]) case .messageActionSecureValuesSentMe(let values, let credentials): - return ("messageActionSecureValuesSentMe", [("values", String(describing: values)), ("credentials", String(describing: credentials))]) + return ("messageActionSecureValuesSentMe", [("values", values as Any), ("credentials", credentials as Any)]) case .messageActionSetChatTheme(let emoticon): - return ("messageActionSetChatTheme", [("emoticon", String(describing: emoticon))]) + return ("messageActionSetChatTheme", [("emoticon", emoticon as Any)]) case .messageActionSetMessagesTTL(let flags, let period, let autoSettingFrom): - return ("messageActionSetMessagesTTL", [("flags", String(describing: flags)), ("period", String(describing: period)), ("autoSettingFrom", String(describing: autoSettingFrom))]) + return ("messageActionSetMessagesTTL", [("flags", flags as Any), ("period", period as Any), ("autoSettingFrom", autoSettingFrom as Any)]) case .messageActionSuggestProfilePhoto(let photo): - return ("messageActionSuggestProfilePhoto", [("photo", String(describing: photo))]) + return ("messageActionSuggestProfilePhoto", [("photo", photo as Any)]) case .messageActionTopicCreate(let flags, let title, let iconColor, let iconEmojiId): - return ("messageActionTopicCreate", [("flags", String(describing: flags)), ("title", String(describing: title)), ("iconColor", String(describing: iconColor)), ("iconEmojiId", String(describing: iconEmojiId))]) + return ("messageActionTopicCreate", [("flags", flags as Any), ("title", title as Any), ("iconColor", iconColor as Any), ("iconEmojiId", iconEmojiId as Any)]) case .messageActionTopicEdit(let flags, let title, let iconEmojiId, let closed, let hidden): - return ("messageActionTopicEdit", [("flags", String(describing: flags)), ("title", String(describing: title)), ("iconEmojiId", String(describing: iconEmojiId)), ("closed", String(describing: closed)), ("hidden", String(describing: hidden))]) + return ("messageActionTopicEdit", [("flags", flags as Any), ("title", title as Any), ("iconEmojiId", iconEmojiId as Any), ("closed", closed as Any), ("hidden", hidden as Any)]) case .messageActionWebViewDataSent(let text): - return ("messageActionWebViewDataSent", [("text", String(describing: text))]) + return ("messageActionWebViewDataSent", [("text", text as Any)]) case .messageActionWebViewDataSentMe(let text, let data): - return ("messageActionWebViewDataSentMe", [("text", String(describing: text)), ("data", String(describing: data))]) + return ("messageActionWebViewDataSentMe", [("text", text as Any), ("data", data as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api12.swift b/submodules/TelegramApi/Sources/Api12.swift index c3150a81e3..36bae7ef09 100644 --- a/submodules/TelegramApi/Sources/Api12.swift +++ b/submodules/TelegramApi/Sources/Api12.swift @@ -182,47 +182,47 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputMessageEntityMentionName(let offset, let length, let userId): - return ("inputMessageEntityMentionName", [("offset", String(describing: offset)), ("length", String(describing: length)), ("userId", String(describing: userId))]) + return ("inputMessageEntityMentionName", [("offset", offset as Any), ("length", length as Any), ("userId", userId as Any)]) case .messageEntityBankCard(let offset, let length): - return ("messageEntityBankCard", [("offset", String(describing: offset)), ("length", String(describing: length))]) + return ("messageEntityBankCard", [("offset", offset as Any), ("length", length as Any)]) case .messageEntityBlockquote(let offset, let length): - return ("messageEntityBlockquote", [("offset", String(describing: offset)), ("length", String(describing: length))]) + return ("messageEntityBlockquote", [("offset", offset as Any), ("length", length as Any)]) case .messageEntityBold(let offset, let length): - return ("messageEntityBold", [("offset", String(describing: offset)), ("length", String(describing: length))]) + return ("messageEntityBold", [("offset", offset as Any), ("length", length as Any)]) case .messageEntityBotCommand(let offset, let length): - return ("messageEntityBotCommand", [("offset", String(describing: offset)), ("length", String(describing: length))]) + return ("messageEntityBotCommand", [("offset", offset as Any), ("length", length as Any)]) case .messageEntityCashtag(let offset, let length): - return ("messageEntityCashtag", [("offset", String(describing: offset)), ("length", String(describing: length))]) + return ("messageEntityCashtag", [("offset", offset as Any), ("length", length as Any)]) case .messageEntityCode(let offset, let length): - return ("messageEntityCode", [("offset", String(describing: offset)), ("length", String(describing: length))]) + return ("messageEntityCode", [("offset", offset as Any), ("length", length as Any)]) case .messageEntityCustomEmoji(let offset, let length, let documentId): - return ("messageEntityCustomEmoji", [("offset", String(describing: offset)), ("length", String(describing: length)), ("documentId", String(describing: documentId))]) + return ("messageEntityCustomEmoji", [("offset", offset as Any), ("length", length as Any), ("documentId", documentId as Any)]) case .messageEntityEmail(let offset, let length): - return ("messageEntityEmail", [("offset", String(describing: offset)), ("length", String(describing: length))]) + return ("messageEntityEmail", [("offset", offset as Any), ("length", length as Any)]) case .messageEntityHashtag(let offset, let length): - return ("messageEntityHashtag", [("offset", String(describing: offset)), ("length", String(describing: length))]) + return ("messageEntityHashtag", [("offset", offset as Any), ("length", length as Any)]) case .messageEntityItalic(let offset, let length): - return ("messageEntityItalic", [("offset", String(describing: offset)), ("length", String(describing: length))]) + return ("messageEntityItalic", [("offset", offset as Any), ("length", length as Any)]) case .messageEntityMention(let offset, let length): - return ("messageEntityMention", [("offset", String(describing: offset)), ("length", String(describing: length))]) + return ("messageEntityMention", [("offset", offset as Any), ("length", length as Any)]) case .messageEntityMentionName(let offset, let length, let userId): - return ("messageEntityMentionName", [("offset", String(describing: offset)), ("length", String(describing: length)), ("userId", String(describing: userId))]) + return ("messageEntityMentionName", [("offset", offset as Any), ("length", length as Any), ("userId", userId as Any)]) case .messageEntityPhone(let offset, let length): - return ("messageEntityPhone", [("offset", String(describing: offset)), ("length", String(describing: length))]) + return ("messageEntityPhone", [("offset", offset as Any), ("length", length as Any)]) case .messageEntityPre(let offset, let length, let language): - return ("messageEntityPre", [("offset", String(describing: offset)), ("length", String(describing: length)), ("language", String(describing: language))]) + return ("messageEntityPre", [("offset", offset as Any), ("length", length as Any), ("language", language as Any)]) case .messageEntitySpoiler(let offset, let length): - return ("messageEntitySpoiler", [("offset", String(describing: offset)), ("length", String(describing: length))]) + return ("messageEntitySpoiler", [("offset", offset as Any), ("length", length as Any)]) case .messageEntityStrike(let offset, let length): - return ("messageEntityStrike", [("offset", String(describing: offset)), ("length", String(describing: length))]) + return ("messageEntityStrike", [("offset", offset as Any), ("length", length as Any)]) case .messageEntityTextUrl(let offset, let length, let url): - return ("messageEntityTextUrl", [("offset", String(describing: offset)), ("length", String(describing: length)), ("url", String(describing: url))]) + return ("messageEntityTextUrl", [("offset", offset as Any), ("length", length as Any), ("url", url as Any)]) case .messageEntityUnderline(let offset, let length): - return ("messageEntityUnderline", [("offset", String(describing: offset)), ("length", String(describing: length))]) + return ("messageEntityUnderline", [("offset", offset as Any), ("length", length as Any)]) case .messageEntityUnknown(let offset, let length): - return ("messageEntityUnknown", [("offset", String(describing: offset)), ("length", String(describing: length))]) + return ("messageEntityUnknown", [("offset", offset as Any), ("length", length as Any)]) case .messageEntityUrl(let offset, let length): - return ("messageEntityUrl", [("offset", String(describing: offset)), ("length", String(describing: length))]) + return ("messageEntityUrl", [("offset", offset as Any), ("length", length as Any)]) } } @@ -569,9 +569,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .messageExtendedMedia(let media): - return ("messageExtendedMedia", [("media", String(describing: media))]) + return ("messageExtendedMedia", [("media", media as Any)]) case .messageExtendedMediaPreview(let flags, let w, let h, let thumb, let videoDuration): - return ("messageExtendedMediaPreview", [("flags", String(describing: flags)), ("w", String(describing: w)), ("h", String(describing: h)), ("thumb", String(describing: thumb)), ("videoDuration", String(describing: videoDuration))]) + return ("messageExtendedMediaPreview", [("flags", flags as Any), ("w", w as Any), ("h", h as Any), ("thumb", thumb as Any), ("videoDuration", videoDuration as Any)]) } } @@ -642,7 +642,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .messageFwdHeader(let flags, let fromId, let fromName, let date, let channelPost, let postAuthor, let savedFromPeer, let savedFromMsgId, let psaType): - return ("messageFwdHeader", [("flags", String(describing: flags)), ("fromId", String(describing: fromId)), ("fromName", String(describing: fromName)), ("date", String(describing: date)), ("channelPost", String(describing: channelPost)), ("postAuthor", String(describing: postAuthor)), ("savedFromPeer", String(describing: savedFromPeer)), ("savedFromMsgId", String(describing: savedFromMsgId)), ("psaType", String(describing: psaType))]) + return ("messageFwdHeader", [("flags", flags as Any), ("fromId", fromId as Any), ("fromName", fromName as Any), ("date", date as Any), ("channelPost", channelPost as Any), ("postAuthor", postAuthor as Any), ("savedFromPeer", savedFromPeer as Any), ("savedFromMsgId", savedFromMsgId as Any), ("psaType", psaType as Any)]) } } @@ -708,7 +708,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .messageInteractionCounters(let msgId, let views, let forwards): - return ("messageInteractionCounters", [("msgId", String(describing: msgId)), ("views", String(describing: views)), ("forwards", String(describing: forwards))]) + return ("messageInteractionCounters", [("msgId", msgId as Any), ("views", views as Any), ("forwards", forwards as Any)]) } } @@ -861,31 +861,31 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .messageMediaContact(let phoneNumber, let firstName, let lastName, let vcard, let userId): - return ("messageMediaContact", [("phoneNumber", String(describing: phoneNumber)), ("firstName", String(describing: firstName)), ("lastName", String(describing: lastName)), ("vcard", String(describing: vcard)), ("userId", String(describing: userId))]) + return ("messageMediaContact", [("phoneNumber", phoneNumber as Any), ("firstName", firstName as Any), ("lastName", lastName as Any), ("vcard", vcard as Any), ("userId", userId as Any)]) case .messageMediaDice(let value, let emoticon): - return ("messageMediaDice", [("value", String(describing: value)), ("emoticon", String(describing: emoticon))]) + return ("messageMediaDice", [("value", value as Any), ("emoticon", emoticon as Any)]) case .messageMediaDocument(let flags, let document, let ttlSeconds): - return ("messageMediaDocument", [("flags", String(describing: flags)), ("document", String(describing: document)), ("ttlSeconds", String(describing: ttlSeconds))]) + return ("messageMediaDocument", [("flags", flags as Any), ("document", document as Any), ("ttlSeconds", ttlSeconds as Any)]) case .messageMediaEmpty: return ("messageMediaEmpty", []) case .messageMediaGame(let game): - return ("messageMediaGame", [("game", String(describing: game))]) + return ("messageMediaGame", [("game", game as Any)]) case .messageMediaGeo(let geo): - return ("messageMediaGeo", [("geo", String(describing: geo))]) + return ("messageMediaGeo", [("geo", geo as Any)]) case .messageMediaGeoLive(let flags, let geo, let heading, let period, let proximityNotificationRadius): - return ("messageMediaGeoLive", [("flags", String(describing: flags)), ("geo", String(describing: geo)), ("heading", String(describing: heading)), ("period", String(describing: period)), ("proximityNotificationRadius", String(describing: proximityNotificationRadius))]) + return ("messageMediaGeoLive", [("flags", flags as Any), ("geo", geo as Any), ("heading", heading as Any), ("period", period as Any), ("proximityNotificationRadius", proximityNotificationRadius as Any)]) case .messageMediaInvoice(let flags, let title, let description, let photo, let receiptMsgId, let currency, let totalAmount, let startParam, let extendedMedia): - return ("messageMediaInvoice", [("flags", String(describing: flags)), ("title", String(describing: title)), ("description", String(describing: description)), ("photo", String(describing: photo)), ("receiptMsgId", String(describing: receiptMsgId)), ("currency", String(describing: currency)), ("totalAmount", String(describing: totalAmount)), ("startParam", String(describing: startParam)), ("extendedMedia", String(describing: extendedMedia))]) + return ("messageMediaInvoice", [("flags", flags as Any), ("title", title as Any), ("description", description as Any), ("photo", photo as Any), ("receiptMsgId", receiptMsgId as Any), ("currency", currency as Any), ("totalAmount", totalAmount as Any), ("startParam", startParam as Any), ("extendedMedia", extendedMedia as Any)]) case .messageMediaPhoto(let flags, let photo, let ttlSeconds): - return ("messageMediaPhoto", [("flags", String(describing: flags)), ("photo", String(describing: photo)), ("ttlSeconds", String(describing: ttlSeconds))]) + return ("messageMediaPhoto", [("flags", flags as Any), ("photo", photo as Any), ("ttlSeconds", ttlSeconds as Any)]) case .messageMediaPoll(let poll, let results): - return ("messageMediaPoll", [("poll", String(describing: poll)), ("results", String(describing: results))]) + return ("messageMediaPoll", [("poll", poll as Any), ("results", results as Any)]) case .messageMediaUnsupported: return ("messageMediaUnsupported", []) case .messageMediaVenue(let geo, let title, let address, let provider, let venueId, let venueType): - return ("messageMediaVenue", [("geo", String(describing: geo)), ("title", String(describing: title)), ("address", String(describing: address)), ("provider", String(describing: provider)), ("venueId", String(describing: venueId)), ("venueType", String(describing: venueType))]) + return ("messageMediaVenue", [("geo", geo as Any), ("title", title as Any), ("address", address as Any), ("provider", provider as Any), ("venueId", venueId as Any), ("venueType", venueType as Any)]) case .messageMediaWebPage(let webpage): - return ("messageMediaWebPage", [("webpage", String(describing: webpage))]) + return ("messageMediaWebPage", [("webpage", webpage as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api13.swift b/submodules/TelegramApi/Sources/Api13.swift index 43bced0e20..01a381dfa4 100644 --- a/submodules/TelegramApi/Sources/Api13.swift +++ b/submodules/TelegramApi/Sources/Api13.swift @@ -18,7 +18,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .messagePeerReaction(let flags, let peerId, let reaction): - return ("messagePeerReaction", [("flags", String(describing: flags)), ("peerId", String(describing: peerId)), ("reaction", String(describing: reaction))]) + return ("messagePeerReaction", [("flags", flags as Any), ("peerId", peerId as Any), ("reaction", reaction as Any)]) } } @@ -65,7 +65,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .messageRange(let minId, let maxId): - return ("messageRange", [("minId", String(describing: minId)), ("maxId", String(describing: maxId))]) + return ("messageRange", [("minId", minId as Any), ("maxId", maxId as Any)]) } } @@ -114,7 +114,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .messageReactions(let flags, let results, let recentReactions): - return ("messageReactions", [("flags", String(describing: flags)), ("results", String(describing: results)), ("recentReactions", String(describing: recentReactions))]) + return ("messageReactions", [("flags", flags as Any), ("results", results as Any), ("recentReactions", recentReactions as Any)]) } } @@ -170,7 +170,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .messageReplies(let flags, let replies, let repliesPts, let recentRepliers, let channelId, let maxId, let readMaxId): - return ("messageReplies", [("flags", String(describing: flags)), ("replies", String(describing: replies)), ("repliesPts", String(describing: repliesPts)), ("recentRepliers", String(describing: recentRepliers)), ("channelId", String(describing: channelId)), ("maxId", String(describing: maxId)), ("readMaxId", String(describing: readMaxId))]) + return ("messageReplies", [("flags", flags as Any), ("replies", replies as Any), ("repliesPts", repliesPts as Any), ("recentRepliers", recentRepliers as Any), ("channelId", channelId as Any), ("maxId", maxId as Any), ("readMaxId", readMaxId as Any)]) } } @@ -229,7 +229,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .messageReplyHeader(let flags, let replyToMsgId, let replyToPeerId, let replyToTopId): - return ("messageReplyHeader", [("flags", String(describing: flags)), ("replyToMsgId", String(describing: replyToMsgId)), ("replyToPeerId", String(describing: replyToPeerId)), ("replyToTopId", String(describing: replyToTopId))]) + return ("messageReplyHeader", [("flags", flags as Any), ("replyToMsgId", replyToMsgId as Any), ("replyToPeerId", replyToPeerId as Any), ("replyToTopId", replyToTopId as Any)]) } } @@ -299,11 +299,11 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .messageUserVote(let userId, let option, let date): - return ("messageUserVote", [("userId", String(describing: userId)), ("option", String(describing: option)), ("date", String(describing: date))]) + return ("messageUserVote", [("userId", userId as Any), ("option", option as Any), ("date", date as Any)]) case .messageUserVoteInputOption(let userId, let date): - return ("messageUserVoteInputOption", [("userId", String(describing: userId)), ("date", String(describing: date))]) + return ("messageUserVoteInputOption", [("userId", userId as Any), ("date", date as Any)]) case .messageUserVoteMultiple(let userId, let options, let date): - return ("messageUserVoteMultiple", [("userId", String(describing: userId)), ("options", String(describing: options)), ("date", String(describing: date))]) + return ("messageUserVoteMultiple", [("userId", userId as Any), ("options", options as Any), ("date", date as Any)]) } } @@ -381,7 +381,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .messageViews(let flags, let views, let forwards, let replies): - return ("messageViews", [("flags", String(describing: flags)), ("views", String(describing: views)), ("forwards", String(describing: forwards)), ("replies", String(describing: replies))]) + return ("messageViews", [("flags", flags as Any), ("views", views as Any), ("forwards", forwards as Any), ("replies", replies as Any)]) } } @@ -556,7 +556,7 @@ public extension Api { case .inputMessagesFilterMyMentions: return ("inputMessagesFilterMyMentions", []) case .inputMessagesFilterPhoneCalls(let flags): - return ("inputMessagesFilterPhoneCalls", [("flags", String(describing: flags))]) + return ("inputMessagesFilterPhoneCalls", [("flags", flags as Any)]) case .inputMessagesFilterPhotoVideo: return ("inputMessagesFilterPhotoVideo", []) case .inputMessagesFilterPhotos: @@ -658,7 +658,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .nearestDc(let country, let thisDc, let nearestDc): - return ("nearestDc", [("country", String(describing: country)), ("thisDc", String(describing: thisDc)), ("nearestDc", String(describing: nearestDc))]) + return ("nearestDc", [("country", country as Any), ("thisDc", thisDc as Any), ("nearestDc", nearestDc as Any)]) } } @@ -724,11 +724,11 @@ public extension Api { case .notificationSoundDefault: return ("notificationSoundDefault", []) case .notificationSoundLocal(let title, let data): - return ("notificationSoundLocal", [("title", String(describing: title)), ("data", String(describing: data))]) + return ("notificationSoundLocal", [("title", title as Any), ("data", data as Any)]) case .notificationSoundNone: return ("notificationSoundNone", []) case .notificationSoundRingtone(let id): - return ("notificationSoundRingtone", [("id", String(describing: id))]) + return ("notificationSoundRingtone", [("id", id as Any)]) } } @@ -817,9 +817,9 @@ public extension Api { case .notifyChats: return ("notifyChats", []) case .notifyForumTopic(let peer, let topMsgId): - return ("notifyForumTopic", [("peer", String(describing: peer)), ("topMsgId", String(describing: topMsgId))]) + return ("notifyForumTopic", [("peer", peer as Any), ("topMsgId", topMsgId as Any)]) case .notifyPeer(let peer): - return ("notifyPeer", [("peer", String(describing: peer))]) + return ("notifyPeer", [("peer", peer as Any)]) case .notifyUsers: return ("notifyUsers", []) } diff --git a/submodules/TelegramApi/Sources/Api14.swift b/submodules/TelegramApi/Sources/Api14.swift index 8bd01dfd9c..c62dd8720f 100644 --- a/submodules/TelegramApi/Sources/Api14.swift +++ b/submodules/TelegramApi/Sources/Api14.swift @@ -33,7 +33,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .page(let flags, let url, let blocks, let photos, let documents, let views): - return ("page", [("flags", String(describing: flags)), ("url", String(describing: url)), ("blocks", String(describing: blocks)), ("photos", String(describing: photos)), ("documents", String(describing: documents)), ("views", String(describing: views))]) + return ("page", [("flags", flags as Any), ("url", url as Any), ("blocks", blocks as Any), ("photos", photos as Any), ("documents", documents as Any), ("views", views as Any)]) } } @@ -352,63 +352,63 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .pageBlockAnchor(let name): - return ("pageBlockAnchor", [("name", String(describing: name))]) + return ("pageBlockAnchor", [("name", name as Any)]) case .pageBlockAudio(let audioId, let caption): - return ("pageBlockAudio", [("audioId", String(describing: audioId)), ("caption", String(describing: caption))]) + return ("pageBlockAudio", [("audioId", audioId as Any), ("caption", caption as Any)]) case .pageBlockAuthorDate(let author, let publishedDate): - return ("pageBlockAuthorDate", [("author", String(describing: author)), ("publishedDate", String(describing: publishedDate))]) + return ("pageBlockAuthorDate", [("author", author as Any), ("publishedDate", publishedDate as Any)]) case .pageBlockBlockquote(let text, let caption): - return ("pageBlockBlockquote", [("text", String(describing: text)), ("caption", String(describing: caption))]) + return ("pageBlockBlockquote", [("text", text as Any), ("caption", caption as Any)]) case .pageBlockChannel(let channel): - return ("pageBlockChannel", [("channel", String(describing: channel))]) + return ("pageBlockChannel", [("channel", channel as Any)]) case .pageBlockCollage(let items, let caption): - return ("pageBlockCollage", [("items", String(describing: items)), ("caption", String(describing: caption))]) + return ("pageBlockCollage", [("items", items as Any), ("caption", caption as Any)]) case .pageBlockCover(let cover): - return ("pageBlockCover", [("cover", String(describing: cover))]) + return ("pageBlockCover", [("cover", cover as Any)]) case .pageBlockDetails(let flags, let blocks, let title): - return ("pageBlockDetails", [("flags", String(describing: flags)), ("blocks", String(describing: blocks)), ("title", String(describing: title))]) + return ("pageBlockDetails", [("flags", flags as Any), ("blocks", blocks as Any), ("title", title as Any)]) case .pageBlockDivider: return ("pageBlockDivider", []) case .pageBlockEmbed(let flags, let url, let html, let posterPhotoId, let w, let h, let caption): - return ("pageBlockEmbed", [("flags", String(describing: flags)), ("url", String(describing: url)), ("html", String(describing: html)), ("posterPhotoId", String(describing: posterPhotoId)), ("w", String(describing: w)), ("h", String(describing: h)), ("caption", String(describing: caption))]) + return ("pageBlockEmbed", [("flags", flags as Any), ("url", url as Any), ("html", html as Any), ("posterPhotoId", posterPhotoId as Any), ("w", w as Any), ("h", h as Any), ("caption", caption as Any)]) case .pageBlockEmbedPost(let url, let webpageId, let authorPhotoId, let author, let date, let blocks, let caption): - return ("pageBlockEmbedPost", [("url", String(describing: url)), ("webpageId", String(describing: webpageId)), ("authorPhotoId", String(describing: authorPhotoId)), ("author", String(describing: author)), ("date", String(describing: date)), ("blocks", String(describing: blocks)), ("caption", String(describing: caption))]) + return ("pageBlockEmbedPost", [("url", url as Any), ("webpageId", webpageId as Any), ("authorPhotoId", authorPhotoId as Any), ("author", author as Any), ("date", date as Any), ("blocks", blocks as Any), ("caption", caption as Any)]) case .pageBlockFooter(let text): - return ("pageBlockFooter", [("text", String(describing: text))]) + return ("pageBlockFooter", [("text", text as Any)]) case .pageBlockHeader(let text): - return ("pageBlockHeader", [("text", String(describing: text))]) + return ("pageBlockHeader", [("text", text as Any)]) case .pageBlockKicker(let text): - return ("pageBlockKicker", [("text", String(describing: text))]) + return ("pageBlockKicker", [("text", text as Any)]) case .pageBlockList(let items): - return ("pageBlockList", [("items", String(describing: items))]) + return ("pageBlockList", [("items", items as Any)]) case .pageBlockMap(let geo, let zoom, let w, let h, let caption): - return ("pageBlockMap", [("geo", String(describing: geo)), ("zoom", String(describing: zoom)), ("w", String(describing: w)), ("h", String(describing: h)), ("caption", String(describing: caption))]) + return ("pageBlockMap", [("geo", geo as Any), ("zoom", zoom as Any), ("w", w as Any), ("h", h as Any), ("caption", caption as Any)]) case .pageBlockOrderedList(let items): - return ("pageBlockOrderedList", [("items", String(describing: items))]) + return ("pageBlockOrderedList", [("items", items as Any)]) case .pageBlockParagraph(let text): - return ("pageBlockParagraph", [("text", String(describing: text))]) + return ("pageBlockParagraph", [("text", text as Any)]) case .pageBlockPhoto(let flags, let photoId, let caption, let url, let webpageId): - return ("pageBlockPhoto", [("flags", String(describing: flags)), ("photoId", String(describing: photoId)), ("caption", String(describing: caption)), ("url", String(describing: url)), ("webpageId", String(describing: webpageId))]) + return ("pageBlockPhoto", [("flags", flags as Any), ("photoId", photoId as Any), ("caption", caption as Any), ("url", url as Any), ("webpageId", webpageId as Any)]) case .pageBlockPreformatted(let text, let language): - return ("pageBlockPreformatted", [("text", String(describing: text)), ("language", String(describing: language))]) + return ("pageBlockPreformatted", [("text", text as Any), ("language", language as Any)]) case .pageBlockPullquote(let text, let caption): - return ("pageBlockPullquote", [("text", String(describing: text)), ("caption", String(describing: caption))]) + return ("pageBlockPullquote", [("text", text as Any), ("caption", caption as Any)]) case .pageBlockRelatedArticles(let title, let articles): - return ("pageBlockRelatedArticles", [("title", String(describing: title)), ("articles", String(describing: articles))]) + return ("pageBlockRelatedArticles", [("title", title as Any), ("articles", articles as Any)]) case .pageBlockSlideshow(let items, let caption): - return ("pageBlockSlideshow", [("items", String(describing: items)), ("caption", String(describing: caption))]) + return ("pageBlockSlideshow", [("items", items as Any), ("caption", caption as Any)]) case .pageBlockSubheader(let text): - return ("pageBlockSubheader", [("text", String(describing: text))]) + return ("pageBlockSubheader", [("text", text as Any)]) case .pageBlockSubtitle(let text): - return ("pageBlockSubtitle", [("text", String(describing: text))]) + return ("pageBlockSubtitle", [("text", text as Any)]) case .pageBlockTable(let flags, let title, let rows): - return ("pageBlockTable", [("flags", String(describing: flags)), ("title", String(describing: title)), ("rows", String(describing: rows))]) + return ("pageBlockTable", [("flags", flags as Any), ("title", title as Any), ("rows", rows as Any)]) case .pageBlockTitle(let text): - return ("pageBlockTitle", [("text", String(describing: text))]) + return ("pageBlockTitle", [("text", text as Any)]) case .pageBlockUnsupported: return ("pageBlockUnsupported", []) case .pageBlockVideo(let flags, let videoId, let caption): - return ("pageBlockVideo", [("flags", String(describing: flags)), ("videoId", String(describing: videoId)), ("caption", String(describing: caption))]) + return ("pageBlockVideo", [("flags", flags as Any), ("videoId", videoId as Any), ("caption", caption as Any)]) } } @@ -909,7 +909,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .pageCaption(let text, let credit): - return ("pageCaption", [("text", String(describing: text)), ("credit", String(describing: credit))]) + return ("pageCaption", [("text", text as Any), ("credit", credit as Any)]) } } @@ -963,9 +963,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .pageListItemBlocks(let blocks): - return ("pageListItemBlocks", [("blocks", String(describing: blocks))]) + return ("pageListItemBlocks", [("blocks", blocks as Any)]) case .pageListItemText(let text): - return ("pageListItemText", [("text", String(describing: text))]) + return ("pageListItemText", [("text", text as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api15.swift b/submodules/TelegramApi/Sources/Api15.swift index 167777f326..1ad7545048 100644 --- a/submodules/TelegramApi/Sources/Api15.swift +++ b/submodules/TelegramApi/Sources/Api15.swift @@ -29,9 +29,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .pageListOrderedItemBlocks(let num, let blocks): - return ("pageListOrderedItemBlocks", [("num", String(describing: num)), ("blocks", String(describing: blocks))]) + return ("pageListOrderedItemBlocks", [("num", num as Any), ("blocks", blocks as Any)]) case .pageListOrderedItemText(let num, let text): - return ("pageListOrderedItemText", [("num", String(describing: num)), ("text", String(describing: text))]) + return ("pageListOrderedItemText", [("num", num as Any), ("text", text as Any)]) } } @@ -95,7 +95,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .pageRelatedArticle(let flags, let url, let webpageId, let title, let description, let photoId, let author, let publishedDate): - return ("pageRelatedArticle", [("flags", String(describing: flags)), ("url", String(describing: url)), ("webpageId", String(describing: webpageId)), ("title", String(describing: title)), ("description", String(describing: description)), ("photoId", String(describing: photoId)), ("author", String(describing: author)), ("publishedDate", String(describing: publishedDate))]) + return ("pageRelatedArticle", [("flags", flags as Any), ("url", url as Any), ("webpageId", webpageId as Any), ("title", title as Any), ("description", description as Any), ("photoId", photoId as Any), ("author", author as Any), ("publishedDate", publishedDate as Any)]) } } @@ -155,7 +155,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .pageTableCell(let flags, let text, let colspan, let rowspan): - return ("pageTableCell", [("flags", String(describing: flags)), ("text", String(describing: text)), ("colspan", String(describing: colspan)), ("rowspan", String(describing: rowspan))]) + return ("pageTableCell", [("flags", flags as Any), ("text", text as Any), ("colspan", colspan as Any), ("rowspan", rowspan as Any)]) } } @@ -206,7 +206,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .pageTableRow(let cells): - return ("pageTableRow", [("cells", String(describing: cells))]) + return ("pageTableRow", [("cells", cells as Any)]) } } @@ -254,7 +254,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow(let salt1, let salt2, let g, let p): - return ("passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow", [("salt1", String(describing: salt1)), ("salt2", String(describing: salt2)), ("g", String(describing: g)), ("p", String(describing: p))]) + return ("passwordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow", [("salt1", salt1 as Any), ("salt2", salt2 as Any), ("g", g as Any), ("p", p as Any)]) case .passwordKdfAlgoUnknown: return ("passwordKdfAlgoUnknown", []) } @@ -305,7 +305,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .paymentCharge(let id, let providerChargeId): - return ("paymentCharge", [("id", String(describing: id)), ("providerChargeId", String(describing: providerChargeId))]) + return ("paymentCharge", [("id", id as Any), ("providerChargeId", providerChargeId as Any)]) } } @@ -345,7 +345,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .paymentFormMethod(let url, let title): - return ("paymentFormMethod", [("url", String(describing: url)), ("title", String(describing: title))]) + return ("paymentFormMethod", [("url", url as Any), ("title", title as Any)]) } } @@ -388,7 +388,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .paymentRequestedInfo(let flags, let name, let phone, let email, let shippingAddress): - return ("paymentRequestedInfo", [("flags", String(describing: flags)), ("name", String(describing: name)), ("phone", String(describing: phone)), ("email", String(describing: email)), ("shippingAddress", String(describing: shippingAddress))]) + return ("paymentRequestedInfo", [("flags", flags as Any), ("name", name as Any), ("phone", phone as Any), ("email", email as Any), ("shippingAddress", shippingAddress as Any)]) } } @@ -439,7 +439,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .paymentSavedCredentialsCard(let id, let title): - return ("paymentSavedCredentialsCard", [("id", String(describing: id)), ("title", String(describing: title))]) + return ("paymentSavedCredentialsCard", [("id", id as Any), ("title", title as Any)]) } } @@ -492,11 +492,11 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .peerChannel(let channelId): - return ("peerChannel", [("channelId", String(describing: channelId))]) + return ("peerChannel", [("channelId", channelId as Any)]) case .peerChat(let chatId): - return ("peerChat", [("chatId", String(describing: chatId))]) + return ("peerChat", [("chatId", chatId as Any)]) case .peerUser(let userId): - return ("peerUser", [("userId", String(describing: userId))]) + return ("peerUser", [("userId", userId as Any)]) } } @@ -555,7 +555,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .peerBlocked(let peerId, let date): - return ("peerBlocked", [("peerId", String(describing: peerId)), ("date", String(describing: date))]) + return ("peerBlocked", [("peerId", peerId as Any), ("date", date as Any)]) } } @@ -605,9 +605,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .peerLocated(let peer, let expires, let distance): - return ("peerLocated", [("peer", String(describing: peer)), ("expires", String(describing: expires)), ("distance", String(describing: distance))]) + return ("peerLocated", [("peer", peer as Any), ("expires", expires as Any), ("distance", distance as Any)]) case .peerSelfLocated(let expires): - return ("peerSelfLocated", [("expires", String(describing: expires))]) + return ("peerSelfLocated", [("expires", expires as Any)]) } } @@ -668,7 +668,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .peerNotifySettings(let flags, let showPreviews, let silent, let muteUntil, let iosSound, let androidSound, let otherSound): - return ("peerNotifySettings", [("flags", String(describing: flags)), ("showPreviews", String(describing: showPreviews)), ("silent", String(describing: silent)), ("muteUntil", String(describing: muteUntil)), ("iosSound", String(describing: iosSound)), ("androidSound", String(describing: androidSound)), ("otherSound", String(describing: otherSound))]) + return ("peerNotifySettings", [("flags", flags as Any), ("showPreviews", showPreviews as Any), ("silent", silent as Any), ("muteUntil", muteUntil as Any), ("iosSound", iosSound as Any), ("androidSound", androidSound as Any), ("otherSound", otherSound as Any)]) } } @@ -735,7 +735,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .peerSettings(let flags, let geoDistance, let requestChatTitle, let requestChatDate): - return ("peerSettings", [("flags", String(describing: flags)), ("geoDistance", String(describing: geoDistance)), ("requestChatTitle", String(describing: requestChatTitle)), ("requestChatDate", String(describing: requestChatDate))]) + return ("peerSettings", [("flags", flags as Any), ("geoDistance", geoDistance as Any), ("requestChatTitle", requestChatTitle as Any), ("requestChatDate", requestChatDate as Any)]) } } @@ -853,17 +853,17 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .phoneCall(let flags, let id, let accessHash, let date, let adminId, let participantId, let gAOrB, let keyFingerprint, let `protocol`, let connections, let startDate): - return ("phoneCall", [("flags", String(describing: flags)), ("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("date", String(describing: date)), ("adminId", String(describing: adminId)), ("participantId", String(describing: participantId)), ("gAOrB", String(describing: gAOrB)), ("keyFingerprint", String(describing: keyFingerprint)), ("`protocol`", String(describing: `protocol`)), ("connections", String(describing: connections)), ("startDate", String(describing: startDate))]) + return ("phoneCall", [("flags", flags as Any), ("id", id as Any), ("accessHash", accessHash as Any), ("date", date as Any), ("adminId", adminId as Any), ("participantId", participantId as Any), ("gAOrB", gAOrB as Any), ("keyFingerprint", keyFingerprint as Any), ("`protocol`", `protocol` as Any), ("connections", connections as Any), ("startDate", startDate as Any)]) case .phoneCallAccepted(let flags, let id, let accessHash, let date, let adminId, let participantId, let gB, let `protocol`): - return ("phoneCallAccepted", [("flags", String(describing: flags)), ("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("date", String(describing: date)), ("adminId", String(describing: adminId)), ("participantId", String(describing: participantId)), ("gB", String(describing: gB)), ("`protocol`", String(describing: `protocol`))]) + return ("phoneCallAccepted", [("flags", flags as Any), ("id", id as Any), ("accessHash", accessHash as Any), ("date", date as Any), ("adminId", adminId as Any), ("participantId", participantId as Any), ("gB", gB as Any), ("`protocol`", `protocol` as Any)]) case .phoneCallDiscarded(let flags, let id, let reason, let duration): - return ("phoneCallDiscarded", [("flags", String(describing: flags)), ("id", String(describing: id)), ("reason", String(describing: reason)), ("duration", String(describing: duration))]) + return ("phoneCallDiscarded", [("flags", flags as Any), ("id", id as Any), ("reason", reason as Any), ("duration", duration as Any)]) case .phoneCallEmpty(let id): - return ("phoneCallEmpty", [("id", String(describing: id))]) + return ("phoneCallEmpty", [("id", id as Any)]) case .phoneCallRequested(let flags, let id, let accessHash, let date, let adminId, let participantId, let gAHash, let `protocol`): - return ("phoneCallRequested", [("flags", String(describing: flags)), ("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("date", String(describing: date)), ("adminId", String(describing: adminId)), ("participantId", String(describing: participantId)), ("gAHash", String(describing: gAHash)), ("`protocol`", String(describing: `protocol`))]) + return ("phoneCallRequested", [("flags", flags as Any), ("id", id as Any), ("accessHash", accessHash as Any), ("date", date as Any), ("adminId", adminId as Any), ("participantId", participantId as Any), ("gAHash", gAHash as Any), ("`protocol`", `protocol` as Any)]) case .phoneCallWaiting(let flags, let id, let accessHash, let date, let adminId, let participantId, let `protocol`, let receiveDate): - return ("phoneCallWaiting", [("flags", String(describing: flags)), ("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("date", String(describing: date)), ("adminId", String(describing: adminId)), ("participantId", String(describing: participantId)), ("`protocol`", String(describing: `protocol`)), ("receiveDate", String(describing: receiveDate))]) + return ("phoneCallWaiting", [("flags", flags as Any), ("id", id as Any), ("accessHash", accessHash as Any), ("date", date as Any), ("adminId", adminId as Any), ("participantId", participantId as Any), ("`protocol`", `protocol` as Any), ("receiveDate", receiveDate as Any)]) } } @@ -1139,7 +1139,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .phoneCallProtocol(let flags, let minLayer, let maxLayer, let libraryVersions): - return ("phoneCallProtocol", [("flags", String(describing: flags)), ("minLayer", String(describing: minLayer)), ("maxLayer", String(describing: maxLayer)), ("libraryVersions", String(describing: libraryVersions))]) + return ("phoneCallProtocol", [("flags", flags as Any), ("minLayer", minLayer as Any), ("maxLayer", maxLayer as Any), ("libraryVersions", libraryVersions as Any)]) } } @@ -1204,9 +1204,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .phoneConnection(let flags, let id, let ip, let ipv6, let port, let peerTag): - return ("phoneConnection", [("flags", String(describing: flags)), ("id", String(describing: id)), ("ip", String(describing: ip)), ("ipv6", String(describing: ipv6)), ("port", String(describing: port)), ("peerTag", String(describing: peerTag))]) + return ("phoneConnection", [("flags", flags as Any), ("id", id as Any), ("ip", ip as Any), ("ipv6", ipv6 as Any), ("port", port as Any), ("peerTag", peerTag as Any)]) case .phoneConnectionWebrtc(let flags, let id, let ip, let ipv6, let port, let username, let password): - return ("phoneConnectionWebrtc", [("flags", String(describing: flags)), ("id", String(describing: id)), ("ip", String(describing: ip)), ("ipv6", String(describing: ipv6)), ("port", String(describing: port)), ("username", String(describing: username)), ("password", String(describing: password))]) + return ("phoneConnectionWebrtc", [("flags", flags as Any), ("id", id as Any), ("ip", ip as Any), ("ipv6", ipv6 as Any), ("port", port as Any), ("username", username as Any), ("password", password as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api16.swift b/submodules/TelegramApi/Sources/Api16.swift index 81b23ee6e2..7be386d4cc 100644 --- a/submodules/TelegramApi/Sources/Api16.swift +++ b/submodules/TelegramApi/Sources/Api16.swift @@ -38,9 +38,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .photo(let flags, let id, let accessHash, let fileReference, let date, let sizes, let videoSizes, let dcId): - return ("photo", [("flags", String(describing: flags)), ("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("fileReference", String(describing: fileReference)), ("date", String(describing: date)), ("sizes", String(describing: sizes)), ("videoSizes", String(describing: videoSizes)), ("dcId", String(describing: dcId))]) + return ("photo", [("flags", flags as Any), ("id", id as Any), ("accessHash", accessHash as Any), ("fileReference", fileReference as Any), ("date", date as Any), ("sizes", sizes as Any), ("videoSizes", videoSizes as Any), ("dcId", dcId as Any)]) case .photoEmpty(let id): - return ("photoEmpty", [("id", String(describing: id))]) + return ("photoEmpty", [("id", id as Any)]) } } @@ -162,17 +162,17 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .photoCachedSize(let type, let w, let h, let bytes): - return ("photoCachedSize", [("type", String(describing: type)), ("w", String(describing: w)), ("h", String(describing: h)), ("bytes", String(describing: bytes))]) + return ("photoCachedSize", [("type", type as Any), ("w", w as Any), ("h", h as Any), ("bytes", bytes as Any)]) case .photoPathSize(let type, let bytes): - return ("photoPathSize", [("type", String(describing: type)), ("bytes", String(describing: bytes))]) + return ("photoPathSize", [("type", type as Any), ("bytes", bytes as Any)]) case .photoSize(let type, let w, let h, let size): - return ("photoSize", [("type", String(describing: type)), ("w", String(describing: w)), ("h", String(describing: h)), ("size", String(describing: size))]) + return ("photoSize", [("type", type as Any), ("w", w as Any), ("h", h as Any), ("size", size as Any)]) case .photoSizeEmpty(let type): - return ("photoSizeEmpty", [("type", String(describing: type))]) + return ("photoSizeEmpty", [("type", type as Any)]) case .photoSizeProgressive(let type, let w, let h, let sizes): - return ("photoSizeProgressive", [("type", String(describing: type)), ("w", String(describing: w)), ("h", String(describing: h)), ("sizes", String(describing: sizes))]) + return ("photoSizeProgressive", [("type", type as Any), ("w", w as Any), ("h", h as Any), ("sizes", sizes as Any)]) case .photoStrippedSize(let type, let bytes): - return ("photoStrippedSize", [("type", String(describing: type)), ("bytes", String(describing: bytes))]) + return ("photoStrippedSize", [("type", type as Any), ("bytes", bytes as Any)]) } } @@ -307,7 +307,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .poll(let id, let flags, let question, let answers, let closePeriod, let closeDate): - return ("poll", [("id", String(describing: id)), ("flags", String(describing: flags)), ("question", String(describing: question)), ("answers", String(describing: answers)), ("closePeriod", String(describing: closePeriod)), ("closeDate", String(describing: closeDate))]) + return ("poll", [("id", id as Any), ("flags", flags as Any), ("question", question as Any), ("answers", answers as Any), ("closePeriod", closePeriod as Any), ("closeDate", closeDate as Any)]) } } @@ -361,7 +361,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .pollAnswer(let text, let option): - return ("pollAnswer", [("text", String(describing: text)), ("option", String(describing: option))]) + return ("pollAnswer", [("text", text as Any), ("option", option as Any)]) } } @@ -402,7 +402,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .pollAnswerVoters(let flags, let option, let voters): - return ("pollAnswerVoters", [("flags", String(describing: flags)), ("option", String(describing: option)), ("voters", String(describing: voters))]) + return ("pollAnswerVoters", [("flags", flags as Any), ("option", option as Any), ("voters", voters as Any)]) } } @@ -461,7 +461,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .pollResults(let flags, let results, let totalVoters, let recentVoters, let solution, let solutionEntities): - return ("pollResults", [("flags", String(describing: flags)), ("results", String(describing: results)), ("totalVoters", String(describing: totalVoters)), ("recentVoters", String(describing: recentVoters)), ("solution", String(describing: solution)), ("solutionEntities", String(describing: solutionEntities))]) + return ("pollResults", [("flags", flags as Any), ("results", results as Any), ("totalVoters", totalVoters as Any), ("recentVoters", recentVoters as Any), ("solution", solution as Any), ("solutionEntities", solutionEntities as Any)]) } } @@ -519,7 +519,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .popularContact(let clientId, let importers): - return ("popularContact", [("clientId", String(describing: clientId)), ("importers", String(describing: importers))]) + return ("popularContact", [("clientId", clientId as Any), ("importers", importers as Any)]) } } @@ -563,7 +563,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .postAddress(let streetLine1, let streetLine2, let city, let state, let countryIso2, let postCode): - return ("postAddress", [("streetLine1", String(describing: streetLine1)), ("streetLine2", String(describing: streetLine2)), ("city", String(describing: city)), ("state", String(describing: state)), ("countryIso2", String(describing: countryIso2)), ("postCode", String(describing: postCode))]) + return ("postAddress", [("streetLine1", streetLine1 as Any), ("streetLine2", streetLine2 as Any), ("city", city as Any), ("state", state as Any), ("countryIso2", countryIso2 as Any), ("postCode", postCode as Any)]) } } @@ -619,7 +619,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .premiumGiftOption(let flags, let months, let currency, let amount, let botUrl, let storeProduct): - return ("premiumGiftOption", [("flags", String(describing: flags)), ("months", String(describing: months)), ("currency", String(describing: currency)), ("amount", String(describing: amount)), ("botUrl", String(describing: botUrl)), ("storeProduct", String(describing: storeProduct))]) + return ("premiumGiftOption", [("flags", flags as Any), ("months", months as Any), ("currency", currency as Any), ("amount", amount as Any), ("botUrl", botUrl as Any), ("storeProduct", storeProduct as Any)]) } } @@ -675,7 +675,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .premiumSubscriptionOption(let flags, let months, let currency, let amount, let botUrl, let storeProduct): - return ("premiumSubscriptionOption", [("flags", String(describing: flags)), ("months", String(describing: months)), ("currency", String(describing: currency)), ("amount", String(describing: amount)), ("botUrl", String(describing: botUrl)), ("storeProduct", String(describing: storeProduct))]) + return ("premiumSubscriptionOption", [("flags", flags as Any), ("months", months as Any), ("currency", currency as Any), ("amount", amount as Any), ("botUrl", botUrl as Any), ("storeProduct", storeProduct as Any)]) } } @@ -917,19 +917,19 @@ public extension Api { case .privacyValueAllowAll: return ("privacyValueAllowAll", []) case .privacyValueAllowChatParticipants(let chats): - return ("privacyValueAllowChatParticipants", [("chats", String(describing: chats))]) + return ("privacyValueAllowChatParticipants", [("chats", chats as Any)]) case .privacyValueAllowContacts: return ("privacyValueAllowContacts", []) case .privacyValueAllowUsers(let users): - return ("privacyValueAllowUsers", [("users", String(describing: users))]) + return ("privacyValueAllowUsers", [("users", users as Any)]) case .privacyValueDisallowAll: return ("privacyValueDisallowAll", []) case .privacyValueDisallowChatParticipants(let chats): - return ("privacyValueDisallowChatParticipants", [("chats", String(describing: chats))]) + return ("privacyValueDisallowChatParticipants", [("chats", chats as Any)]) case .privacyValueDisallowContacts: return ("privacyValueDisallowContacts", []) case .privacyValueDisallowUsers(let users): - return ("privacyValueDisallowUsers", [("users", String(describing: users))]) + return ("privacyValueDisallowUsers", [("users", users as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api17.swift b/submodules/TelegramApi/Sources/Api17.swift index ce013ce030..1b151c0e57 100644 --- a/submodules/TelegramApi/Sources/Api17.swift +++ b/submodules/TelegramApi/Sources/Api17.swift @@ -30,9 +30,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .reactionCustomEmoji(let documentId): - return ("reactionCustomEmoji", [("documentId", String(describing: documentId))]) + return ("reactionCustomEmoji", [("documentId", documentId as Any)]) case .reactionEmoji(let emoticon): - return ("reactionEmoji", [("emoticon", String(describing: emoticon))]) + return ("reactionEmoji", [("emoticon", emoticon as Any)]) case .reactionEmpty: return ("reactionEmpty", []) } @@ -87,7 +87,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .reactionCount(let flags, let chosenOrder, let reaction, let count): - return ("reactionCount", [("flags", String(describing: flags)), ("chosenOrder", String(describing: chosenOrder)), ("reaction", String(describing: reaction)), ("count", String(describing: count))]) + return ("reactionCount", [("flags", flags as Any), ("chosenOrder", chosenOrder as Any), ("reaction", reaction as Any), ("count", count as Any)]) } } @@ -135,7 +135,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .receivedNotifyMessage(let id, let flags): - return ("receivedNotifyMessage", [("id", String(describing: id)), ("flags", String(describing: flags))]) + return ("receivedNotifyMessage", [("id", id as Any), ("flags", flags as Any)]) } } @@ -206,15 +206,15 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .recentMeUrlChat(let url, let chatId): - return ("recentMeUrlChat", [("url", String(describing: url)), ("chatId", String(describing: chatId))]) + return ("recentMeUrlChat", [("url", url as Any), ("chatId", chatId as Any)]) case .recentMeUrlChatInvite(let url, let chatInvite): - return ("recentMeUrlChatInvite", [("url", String(describing: url)), ("chatInvite", String(describing: chatInvite))]) + return ("recentMeUrlChatInvite", [("url", url as Any), ("chatInvite", chatInvite as Any)]) case .recentMeUrlStickerSet(let url, let set): - return ("recentMeUrlStickerSet", [("url", String(describing: url)), ("set", String(describing: set))]) + return ("recentMeUrlStickerSet", [("url", url as Any), ("set", set as Any)]) case .recentMeUrlUnknown(let url): - return ("recentMeUrlUnknown", [("url", String(describing: url))]) + return ("recentMeUrlUnknown", [("url", url as Any)]) case .recentMeUrlUser(let url, let userId): - return ("recentMeUrlUser", [("url", String(describing: url)), ("userId", String(describing: userId))]) + return ("recentMeUrlUser", [("url", url as Any), ("userId", userId as Any)]) } } @@ -342,13 +342,13 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .replyInlineMarkup(let rows): - return ("replyInlineMarkup", [("rows", String(describing: rows))]) + return ("replyInlineMarkup", [("rows", rows as Any)]) case .replyKeyboardForceReply(let flags, let placeholder): - return ("replyKeyboardForceReply", [("flags", String(describing: flags)), ("placeholder", String(describing: placeholder))]) + return ("replyKeyboardForceReply", [("flags", flags as Any), ("placeholder", placeholder as Any)]) case .replyKeyboardHide(let flags): - return ("replyKeyboardHide", [("flags", String(describing: flags))]) + return ("replyKeyboardHide", [("flags", flags as Any)]) case .replyKeyboardMarkup(let flags, let rows, let placeholder): - return ("replyKeyboardMarkup", [("flags", String(describing: flags)), ("rows", String(describing: rows)), ("placeholder", String(describing: placeholder))]) + return ("replyKeyboardMarkup", [("flags", flags as Any), ("rows", rows as Any), ("placeholder", placeholder as Any)]) } } @@ -568,7 +568,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .restrictionReason(let platform, let reason, let text): - return ("restrictionReason", [("platform", String(describing: platform)), ("reason", String(describing: reason)), ("text", String(describing: text))]) + return ("restrictionReason", [("platform", platform as Any), ("reason", reason as Any), ("text", text as Any)]) } } @@ -726,37 +726,37 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .textAnchor(let text, let name): - return ("textAnchor", [("text", String(describing: text)), ("name", String(describing: name))]) + return ("textAnchor", [("text", text as Any), ("name", name as Any)]) case .textBold(let text): - return ("textBold", [("text", String(describing: text))]) + return ("textBold", [("text", text as Any)]) case .textConcat(let texts): - return ("textConcat", [("texts", String(describing: texts))]) + return ("textConcat", [("texts", texts as Any)]) case .textEmail(let text, let email): - return ("textEmail", [("text", String(describing: text)), ("email", String(describing: email))]) + return ("textEmail", [("text", text as Any), ("email", email as Any)]) case .textEmpty: return ("textEmpty", []) case .textFixed(let text): - return ("textFixed", [("text", String(describing: text))]) + return ("textFixed", [("text", text as Any)]) case .textImage(let documentId, let w, let h): - return ("textImage", [("documentId", String(describing: documentId)), ("w", String(describing: w)), ("h", String(describing: h))]) + return ("textImage", [("documentId", documentId as Any), ("w", w as Any), ("h", h as Any)]) case .textItalic(let text): - return ("textItalic", [("text", String(describing: text))]) + return ("textItalic", [("text", text as Any)]) case .textMarked(let text): - return ("textMarked", [("text", String(describing: text))]) + return ("textMarked", [("text", text as Any)]) case .textPhone(let text, let phone): - return ("textPhone", [("text", String(describing: text)), ("phone", String(describing: phone))]) + return ("textPhone", [("text", text as Any), ("phone", phone as Any)]) case .textPlain(let text): - return ("textPlain", [("text", String(describing: text))]) + return ("textPlain", [("text", text as Any)]) case .textStrike(let text): - return ("textStrike", [("text", String(describing: text))]) + return ("textStrike", [("text", text as Any)]) case .textSubscript(let text): - return ("textSubscript", [("text", String(describing: text))]) + return ("textSubscript", [("text", text as Any)]) case .textSuperscript(let text): - return ("textSuperscript", [("text", String(describing: text))]) + return ("textSuperscript", [("text", text as Any)]) case .textUnderline(let text): - return ("textUnderline", [("text", String(describing: text))]) + return ("textUnderline", [("text", text as Any)]) case .textUrl(let text, let url, let webpageId): - return ("textUrl", [("text", String(describing: text)), ("url", String(describing: url)), ("webpageId", String(describing: webpageId))]) + return ("textUrl", [("text", text as Any), ("url", url as Any), ("webpageId", webpageId as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api18.swift b/submodules/TelegramApi/Sources/Api18.swift index c76b5fa753..14c977bb4a 100644 --- a/submodules/TelegramApi/Sources/Api18.swift +++ b/submodules/TelegramApi/Sources/Api18.swift @@ -19,7 +19,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .savedPhoneContact(let phone, let firstName, let lastName, let date): - return ("savedPhoneContact", [("phone", String(describing: phone)), ("firstName", String(describing: firstName)), ("lastName", String(describing: lastName)), ("date", String(describing: date))]) + return ("savedPhoneContact", [("phone", phone as Any), ("firstName", firstName as Any), ("lastName", lastName as Any), ("date", date as Any)]) } } @@ -67,7 +67,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .searchResultsCalendarPeriod(let date, let minMsgId, let maxMsgId, let count): - return ("searchResultsCalendarPeriod", [("date", String(describing: date)), ("minMsgId", String(describing: minMsgId)), ("maxMsgId", String(describing: maxMsgId)), ("count", String(describing: count))]) + return ("searchResultsCalendarPeriod", [("date", date as Any), ("minMsgId", minMsgId as Any), ("maxMsgId", maxMsgId as Any), ("count", count as Any)]) } } @@ -114,7 +114,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .searchResultPosition(let msgId, let date, let offset): - return ("searchResultPosition", [("msgId", String(describing: msgId)), ("date", String(describing: date)), ("offset", String(describing: offset))]) + return ("searchResultPosition", [("msgId", msgId as Any), ("date", date as Any), ("offset", offset as Any)]) } } @@ -158,7 +158,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .secureCredentialsEncrypted(let data, let hash, let secret): - return ("secureCredentialsEncrypted", [("data", String(describing: data)), ("hash", String(describing: hash)), ("secret", String(describing: secret))]) + return ("secureCredentialsEncrypted", [("data", data as Any), ("hash", hash as Any), ("secret", secret as Any)]) } } @@ -202,7 +202,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .secureData(let data, let dataHash, let secret): - return ("secureData", [("data", String(describing: data)), ("dataHash", String(describing: dataHash)), ("secret", String(describing: secret))]) + return ("secureData", [("data", data as Any), ("dataHash", dataHash as Any), ("secret", secret as Any)]) } } @@ -257,7 +257,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .secureFile(let id, let accessHash, let size, let dcId, let date, let fileHash, let secret): - return ("secureFile", [("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("size", String(describing: size)), ("dcId", String(describing: dcId)), ("date", String(describing: date)), ("fileHash", String(describing: fileHash)), ("secret", String(describing: secret))]) + return ("secureFile", [("id", id as Any), ("accessHash", accessHash as Any), ("size", size as Any), ("dcId", dcId as Any), ("date", date as Any), ("fileHash", fileHash as Any), ("secret", secret as Any)]) case .secureFileEmpty: return ("secureFileEmpty", []) } @@ -330,9 +330,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .securePasswordKdfAlgoPBKDF2HMACSHA512iter100000(let salt): - return ("securePasswordKdfAlgoPBKDF2HMACSHA512iter100000", [("salt", String(describing: salt))]) + return ("securePasswordKdfAlgoPBKDF2HMACSHA512iter100000", [("salt", salt as Any)]) case .securePasswordKdfAlgoSHA512(let salt): - return ("securePasswordKdfAlgoSHA512", [("salt", String(describing: salt))]) + return ("securePasswordKdfAlgoSHA512", [("salt", salt as Any)]) case .securePasswordKdfAlgoUnknown: return ("securePasswordKdfAlgoUnknown", []) } @@ -391,9 +391,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .securePlainEmail(let email): - return ("securePlainEmail", [("email", String(describing: email))]) + return ("securePlainEmail", [("email", email as Any)]) case .securePlainPhone(let phone): - return ("securePlainPhone", [("phone", String(describing: phone))]) + return ("securePlainPhone", [("phone", phone as Any)]) } } @@ -452,9 +452,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .secureRequiredType(let flags, let type): - return ("secureRequiredType", [("flags", String(describing: flags)), ("type", String(describing: type))]) + return ("secureRequiredType", [("flags", flags as Any), ("type", type as Any)]) case .secureRequiredTypeOneOf(let types): - return ("secureRequiredTypeOneOf", [("types", String(describing: types))]) + return ("secureRequiredTypeOneOf", [("types", types as Any)]) } } @@ -510,7 +510,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .secureSecretSettings(let secureAlgo, let secureSecret, let secureSecretId): - return ("secureSecretSettings", [("secureAlgo", String(describing: secureAlgo)), ("secureSecret", String(describing: secureSecret)), ("secureSecretId", String(describing: secureSecretId))]) + return ("secureSecretSettings", [("secureAlgo", secureAlgo as Any), ("secureSecret", secureSecret as Any), ("secureSecretId", secureSecretId as Any)]) } } @@ -571,7 +571,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .secureValue(let flags, let type, let data, let frontSide, let reverseSide, let selfie, let translation, let files, let plainData, let hash): - return ("secureValue", [("flags", String(describing: flags)), ("type", String(describing: type)), ("data", String(describing: data)), ("frontSide", String(describing: frontSide)), ("reverseSide", String(describing: reverseSide)), ("selfie", String(describing: selfie)), ("translation", String(describing: translation)), ("files", String(describing: files)), ("plainData", String(describing: plainData)), ("hash", String(describing: hash))]) + return ("secureValue", [("flags", flags as Any), ("type", type as Any), ("data", data as Any), ("frontSide", frontSide as Any), ("reverseSide", reverseSide as Any), ("selfie", selfie as Any), ("translation", translation as Any), ("files", files as Any), ("plainData", plainData as Any), ("hash", hash as Any)]) } } @@ -733,23 +733,23 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .secureValueError(let type, let hash, let text): - return ("secureValueError", [("type", String(describing: type)), ("hash", String(describing: hash)), ("text", String(describing: text))]) + return ("secureValueError", [("type", type as Any), ("hash", hash as Any), ("text", text as Any)]) case .secureValueErrorData(let type, let dataHash, let field, let text): - return ("secureValueErrorData", [("type", String(describing: type)), ("dataHash", String(describing: dataHash)), ("field", String(describing: field)), ("text", String(describing: text))]) + return ("secureValueErrorData", [("type", type as Any), ("dataHash", dataHash as Any), ("field", field as Any), ("text", text as Any)]) case .secureValueErrorFile(let type, let fileHash, let text): - return ("secureValueErrorFile", [("type", String(describing: type)), ("fileHash", String(describing: fileHash)), ("text", String(describing: text))]) + return ("secureValueErrorFile", [("type", type as Any), ("fileHash", fileHash as Any), ("text", text as Any)]) case .secureValueErrorFiles(let type, let fileHash, let text): - return ("secureValueErrorFiles", [("type", String(describing: type)), ("fileHash", String(describing: fileHash)), ("text", String(describing: text))]) + return ("secureValueErrorFiles", [("type", type as Any), ("fileHash", fileHash as Any), ("text", text as Any)]) case .secureValueErrorFrontSide(let type, let fileHash, let text): - return ("secureValueErrorFrontSide", [("type", String(describing: type)), ("fileHash", String(describing: fileHash)), ("text", String(describing: text))]) + return ("secureValueErrorFrontSide", [("type", type as Any), ("fileHash", fileHash as Any), ("text", text as Any)]) case .secureValueErrorReverseSide(let type, let fileHash, let text): - return ("secureValueErrorReverseSide", [("type", String(describing: type)), ("fileHash", String(describing: fileHash)), ("text", String(describing: text))]) + return ("secureValueErrorReverseSide", [("type", type as Any), ("fileHash", fileHash as Any), ("text", text as Any)]) case .secureValueErrorSelfie(let type, let fileHash, let text): - return ("secureValueErrorSelfie", [("type", String(describing: type)), ("fileHash", String(describing: fileHash)), ("text", String(describing: text))]) + return ("secureValueErrorSelfie", [("type", type as Any), ("fileHash", fileHash as Any), ("text", text as Any)]) case .secureValueErrorTranslationFile(let type, let fileHash, let text): - return ("secureValueErrorTranslationFile", [("type", String(describing: type)), ("fileHash", String(describing: fileHash)), ("text", String(describing: text))]) + return ("secureValueErrorTranslationFile", [("type", type as Any), ("fileHash", fileHash as Any), ("text", text as Any)]) case .secureValueErrorTranslationFiles(let type, let fileHash, let text): - return ("secureValueErrorTranslationFiles", [("type", String(describing: type)), ("fileHash", String(describing: fileHash)), ("text", String(describing: text))]) + return ("secureValueErrorTranslationFiles", [("type", type as Any), ("fileHash", fileHash as Any), ("text", text as Any)]) } } @@ -953,7 +953,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .secureValueHash(let type, let hash): - return ("secureValueHash", [("type", String(describing: type)), ("hash", String(describing: hash))]) + return ("secureValueHash", [("type", type as Any), ("hash", hash as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api19.swift b/submodules/TelegramApi/Sources/Api19.swift index 9ce012be55..c13f485880 100644 --- a/submodules/TelegramApi/Sources/Api19.swift +++ b/submodules/TelegramApi/Sources/Api19.swift @@ -17,7 +17,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .sendAsPeer(let flags, let peer): - return ("sendAsPeer", [("flags", String(describing: flags)), ("peer", String(describing: peer))]) + return ("sendAsPeer", [("flags", flags as Any), ("peer", peer as Any)]) } } @@ -185,15 +185,15 @@ public extension Api { case .sendMessageChooseStickerAction: return ("sendMessageChooseStickerAction", []) case .sendMessageEmojiInteraction(let emoticon, let msgId, let interaction): - return ("sendMessageEmojiInteraction", [("emoticon", String(describing: emoticon)), ("msgId", String(describing: msgId)), ("interaction", String(describing: interaction))]) + return ("sendMessageEmojiInteraction", [("emoticon", emoticon as Any), ("msgId", msgId as Any), ("interaction", interaction as Any)]) case .sendMessageEmojiInteractionSeen(let emoticon): - return ("sendMessageEmojiInteractionSeen", [("emoticon", String(describing: emoticon))]) + return ("sendMessageEmojiInteractionSeen", [("emoticon", emoticon as Any)]) case .sendMessageGamePlayAction: return ("sendMessageGamePlayAction", []) case .sendMessageGeoLocationAction: return ("sendMessageGeoLocationAction", []) case .sendMessageHistoryImportAction(let progress): - return ("sendMessageHistoryImportAction", [("progress", String(describing: progress))]) + return ("sendMessageHistoryImportAction", [("progress", progress as Any)]) case .sendMessageRecordAudioAction: return ("sendMessageRecordAudioAction", []) case .sendMessageRecordRoundAction: @@ -203,15 +203,15 @@ public extension Api { case .sendMessageTypingAction: return ("sendMessageTypingAction", []) case .sendMessageUploadAudioAction(let progress): - return ("sendMessageUploadAudioAction", [("progress", String(describing: progress))]) + return ("sendMessageUploadAudioAction", [("progress", progress as Any)]) case .sendMessageUploadDocumentAction(let progress): - return ("sendMessageUploadDocumentAction", [("progress", String(describing: progress))]) + return ("sendMessageUploadDocumentAction", [("progress", progress as Any)]) case .sendMessageUploadPhotoAction(let progress): - return ("sendMessageUploadPhotoAction", [("progress", String(describing: progress))]) + return ("sendMessageUploadPhotoAction", [("progress", progress as Any)]) case .sendMessageUploadRoundAction(let progress): - return ("sendMessageUploadRoundAction", [("progress", String(describing: progress))]) + return ("sendMessageUploadRoundAction", [("progress", progress as Any)]) case .sendMessageUploadVideoAction(let progress): - return ("sendMessageUploadVideoAction", [("progress", String(describing: progress))]) + return ("sendMessageUploadVideoAction", [("progress", progress as Any)]) case .speakingInGroupCallAction: return ("speakingInGroupCallAction", []) } @@ -370,7 +370,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .shippingOption(let id, let title, let prices): - return ("shippingOption", [("id", String(describing: id)), ("title", String(describing: title)), ("prices", String(describing: prices))]) + return ("shippingOption", [("id", id as Any), ("title", title as Any), ("prices", prices as Any)]) } } @@ -414,7 +414,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .simpleWebViewResultUrl(let url): - return ("simpleWebViewResultUrl", [("url", String(describing: url))]) + return ("simpleWebViewResultUrl", [("url", url as Any)]) } } @@ -462,7 +462,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .sponsoredMessage(let flags, let randomId, let fromId, let chatInvite, let chatInviteHash, let channelPost, let startParam, let message, let entities): - return ("sponsoredMessage", [("flags", String(describing: flags)), ("randomId", String(describing: randomId)), ("fromId", String(describing: fromId)), ("chatInvite", String(describing: chatInvite)), ("chatInviteHash", String(describing: chatInviteHash)), ("channelPost", String(describing: channelPost)), ("startParam", String(describing: startParam)), ("message", String(describing: message)), ("entities", String(describing: entities))]) + return ("sponsoredMessage", [("flags", flags as Any), ("randomId", randomId as Any), ("fromId", fromId as Any), ("chatInvite", chatInvite as Any), ("chatInviteHash", chatInviteHash as Any), ("channelPost", channelPost as Any), ("startParam", startParam as Any), ("message", message as Any), ("entities", entities as Any)]) } } @@ -529,7 +529,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .statsAbsValueAndPrev(let current, let previous): - return ("statsAbsValueAndPrev", [("current", String(describing: current)), ("previous", String(describing: previous))]) + return ("statsAbsValueAndPrev", [("current", current as Any), ("previous", previous as Any)]) } } @@ -569,7 +569,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .statsDateRangeDays(let minDate, let maxDate): - return ("statsDateRangeDays", [("minDate", String(describing: minDate)), ("maxDate", String(describing: maxDate))]) + return ("statsDateRangeDays", [("minDate", minDate as Any), ("maxDate", maxDate as Any)]) } } @@ -624,11 +624,11 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .statsGraph(let flags, let json, let zoomToken): - return ("statsGraph", [("flags", String(describing: flags)), ("json", String(describing: json)), ("zoomToken", String(describing: zoomToken))]) + return ("statsGraph", [("flags", flags as Any), ("json", json as Any), ("zoomToken", zoomToken as Any)]) case .statsGraphAsync(let token): - return ("statsGraphAsync", [("token", String(describing: token))]) + return ("statsGraphAsync", [("token", token as Any)]) case .statsGraphError(let error): - return ("statsGraphError", [("error", String(describing: error))]) + return ("statsGraphError", [("error", error as Any)]) } } @@ -697,7 +697,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .statsGroupTopAdmin(let userId, let deleted, let kicked, let banned): - return ("statsGroupTopAdmin", [("userId", String(describing: userId)), ("deleted", String(describing: deleted)), ("kicked", String(describing: kicked)), ("banned", String(describing: banned))]) + return ("statsGroupTopAdmin", [("userId", userId as Any), ("deleted", deleted as Any), ("kicked", kicked as Any), ("banned", banned as Any)]) } } @@ -743,7 +743,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .statsGroupTopInviter(let userId, let invitations): - return ("statsGroupTopInviter", [("userId", String(describing: userId)), ("invitations", String(describing: invitations))]) + return ("statsGroupTopInviter", [("userId", userId as Any), ("invitations", invitations as Any)]) } } @@ -784,7 +784,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .statsGroupTopPoster(let userId, let messages, let avgChars): - return ("statsGroupTopPoster", [("userId", String(describing: userId)), ("messages", String(describing: messages)), ("avgChars", String(describing: avgChars))]) + return ("statsGroupTopPoster", [("userId", userId as Any), ("messages", messages as Any), ("avgChars", avgChars as Any)]) } } @@ -827,7 +827,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .statsPercentValue(let part, let total): - return ("statsPercentValue", [("part", String(describing: part)), ("total", String(describing: total))]) + return ("statsPercentValue", [("part", part as Any), ("total", total as Any)]) } } @@ -866,7 +866,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .statsURL(let url): - return ("statsURL", [("url", String(describing: url))]) + return ("statsURL", [("url", url as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api2.swift b/submodules/TelegramApi/Sources/Api2.swift index e492f7be78..c6ec2e7578 100644 --- a/submodules/TelegramApi/Sources/Api2.swift +++ b/submodules/TelegramApi/Sources/Api2.swift @@ -88,17 +88,17 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .botInlineMessageMediaAuto(let flags, let message, let entities, let replyMarkup): - return ("botInlineMessageMediaAuto", [("flags", String(describing: flags)), ("message", String(describing: message)), ("entities", String(describing: entities)), ("replyMarkup", String(describing: replyMarkup))]) + return ("botInlineMessageMediaAuto", [("flags", flags as Any), ("message", message as Any), ("entities", entities as Any), ("replyMarkup", replyMarkup as Any)]) case .botInlineMessageMediaContact(let flags, let phoneNumber, let firstName, let lastName, let vcard, let replyMarkup): - return ("botInlineMessageMediaContact", [("flags", String(describing: flags)), ("phoneNumber", String(describing: phoneNumber)), ("firstName", String(describing: firstName)), ("lastName", String(describing: lastName)), ("vcard", String(describing: vcard)), ("replyMarkup", String(describing: replyMarkup))]) + return ("botInlineMessageMediaContact", [("flags", flags as Any), ("phoneNumber", phoneNumber as Any), ("firstName", firstName as Any), ("lastName", lastName as Any), ("vcard", vcard as Any), ("replyMarkup", replyMarkup as Any)]) case .botInlineMessageMediaGeo(let flags, let geo, let heading, let period, let proximityNotificationRadius, let replyMarkup): - return ("botInlineMessageMediaGeo", [("flags", String(describing: flags)), ("geo", String(describing: geo)), ("heading", String(describing: heading)), ("period", String(describing: period)), ("proximityNotificationRadius", String(describing: proximityNotificationRadius)), ("replyMarkup", String(describing: replyMarkup))]) + return ("botInlineMessageMediaGeo", [("flags", flags as Any), ("geo", geo as Any), ("heading", heading as Any), ("period", period as Any), ("proximityNotificationRadius", proximityNotificationRadius as Any), ("replyMarkup", replyMarkup as Any)]) case .botInlineMessageMediaInvoice(let flags, let title, let description, let photo, let currency, let totalAmount, let replyMarkup): - return ("botInlineMessageMediaInvoice", [("flags", String(describing: flags)), ("title", String(describing: title)), ("description", String(describing: description)), ("photo", String(describing: photo)), ("currency", String(describing: currency)), ("totalAmount", String(describing: totalAmount)), ("replyMarkup", String(describing: replyMarkup))]) + return ("botInlineMessageMediaInvoice", [("flags", flags as Any), ("title", title as Any), ("description", description as Any), ("photo", photo as Any), ("currency", currency as Any), ("totalAmount", totalAmount as Any), ("replyMarkup", replyMarkup as Any)]) case .botInlineMessageMediaVenue(let flags, let geo, let title, let address, let provider, let venueId, let venueType, let replyMarkup): - return ("botInlineMessageMediaVenue", [("flags", String(describing: flags)), ("geo", String(describing: geo)), ("title", String(describing: title)), ("address", String(describing: address)), ("provider", String(describing: provider)), ("venueId", String(describing: venueId)), ("venueType", String(describing: venueType)), ("replyMarkup", String(describing: replyMarkup))]) + return ("botInlineMessageMediaVenue", [("flags", flags as Any), ("geo", geo as Any), ("title", title as Any), ("address", address as Any), ("provider", provider as Any), ("venueId", venueId as Any), ("venueType", venueType as Any), ("replyMarkup", replyMarkup as Any)]) case .botInlineMessageText(let flags, let message, let entities, let replyMarkup): - return ("botInlineMessageText", [("flags", String(describing: flags)), ("message", String(describing: message)), ("entities", String(describing: entities)), ("replyMarkup", String(describing: replyMarkup))]) + return ("botInlineMessageText", [("flags", flags as Any), ("message", message as Any), ("entities", entities as Any), ("replyMarkup", replyMarkup as Any)]) } } @@ -320,9 +320,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .botInlineMediaResult(let flags, let id, let type, let photo, let document, let title, let description, let sendMessage): - return ("botInlineMediaResult", [("flags", String(describing: flags)), ("id", String(describing: id)), ("type", String(describing: type)), ("photo", String(describing: photo)), ("document", String(describing: document)), ("title", String(describing: title)), ("description", String(describing: description)), ("sendMessage", String(describing: sendMessage))]) + return ("botInlineMediaResult", [("flags", flags as Any), ("id", id as Any), ("type", type as Any), ("photo", photo as Any), ("document", document as Any), ("title", title as Any), ("description", description as Any), ("sendMessage", sendMessage as Any)]) case .botInlineResult(let flags, let id, let type, let title, let description, let url, let thumb, let content, let sendMessage): - return ("botInlineResult", [("flags", String(describing: flags)), ("id", String(describing: id)), ("type", String(describing: type)), ("title", String(describing: title)), ("description", String(describing: description)), ("url", String(describing: url)), ("thumb", String(describing: thumb)), ("content", String(describing: content)), ("sendMessage", String(describing: sendMessage))]) + return ("botInlineResult", [("flags", flags as Any), ("id", id as Any), ("type", type as Any), ("title", title as Any), ("description", description as Any), ("url", url as Any), ("thumb", thumb as Any), ("content", content as Any), ("sendMessage", sendMessage as Any)]) } } @@ -441,7 +441,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .botMenuButton(let text, let url): - return ("botMenuButton", [("text", String(describing: text)), ("url", String(describing: url))]) + return ("botMenuButton", [("text", text as Any), ("url", url as Any)]) case .botMenuButtonCommands: return ("botMenuButtonCommands", []) case .botMenuButtonDefault: @@ -494,7 +494,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .cdnConfig(let publicKeys): - return ("cdnConfig", [("publicKeys", String(describing: publicKeys))]) + return ("cdnConfig", [("publicKeys", publicKeys as Any)]) } } @@ -533,7 +533,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .cdnPublicKey(let dcId, let publicKey): - return ("cdnPublicKey", [("dcId", String(describing: dcId)), ("publicKey", String(describing: publicKey))]) + return ("cdnPublicKey", [("dcId", dcId as Any), ("publicKey", publicKey as Any)]) } } @@ -575,7 +575,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .channelAdminLogEvent(let id, let date, let userId, let action): - return ("channelAdminLogEvent", [("id", String(describing: id)), ("date", String(describing: date)), ("userId", String(describing: userId)), ("action", String(describing: action))]) + return ("channelAdminLogEvent", [("id", id as Any), ("date", date as Any), ("userId", userId as Any), ("action", action as Any)]) } } @@ -944,91 +944,91 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .channelAdminLogEventActionChangeAbout(let prevValue, let newValue): - return ("channelAdminLogEventActionChangeAbout", [("prevValue", String(describing: prevValue)), ("newValue", String(describing: newValue))]) + return ("channelAdminLogEventActionChangeAbout", [("prevValue", prevValue as Any), ("newValue", newValue as Any)]) case .channelAdminLogEventActionChangeAvailableReactions(let prevValue, let newValue): - return ("channelAdminLogEventActionChangeAvailableReactions", [("prevValue", String(describing: prevValue)), ("newValue", String(describing: newValue))]) + return ("channelAdminLogEventActionChangeAvailableReactions", [("prevValue", prevValue as Any), ("newValue", newValue as Any)]) case .channelAdminLogEventActionChangeHistoryTTL(let prevValue, let newValue): - return ("channelAdminLogEventActionChangeHistoryTTL", [("prevValue", String(describing: prevValue)), ("newValue", String(describing: newValue))]) + return ("channelAdminLogEventActionChangeHistoryTTL", [("prevValue", prevValue as Any), ("newValue", newValue as Any)]) case .channelAdminLogEventActionChangeLinkedChat(let prevValue, let newValue): - return ("channelAdminLogEventActionChangeLinkedChat", [("prevValue", String(describing: prevValue)), ("newValue", String(describing: newValue))]) + return ("channelAdminLogEventActionChangeLinkedChat", [("prevValue", prevValue as Any), ("newValue", newValue as Any)]) case .channelAdminLogEventActionChangeLocation(let prevValue, let newValue): - return ("channelAdminLogEventActionChangeLocation", [("prevValue", String(describing: prevValue)), ("newValue", String(describing: newValue))]) + return ("channelAdminLogEventActionChangeLocation", [("prevValue", prevValue as Any), ("newValue", newValue as Any)]) case .channelAdminLogEventActionChangePhoto(let prevPhoto, let newPhoto): - return ("channelAdminLogEventActionChangePhoto", [("prevPhoto", String(describing: prevPhoto)), ("newPhoto", String(describing: newPhoto))]) + return ("channelAdminLogEventActionChangePhoto", [("prevPhoto", prevPhoto as Any), ("newPhoto", newPhoto as Any)]) case .channelAdminLogEventActionChangeStickerSet(let prevStickerset, let newStickerset): - return ("channelAdminLogEventActionChangeStickerSet", [("prevStickerset", String(describing: prevStickerset)), ("newStickerset", String(describing: newStickerset))]) + return ("channelAdminLogEventActionChangeStickerSet", [("prevStickerset", prevStickerset as Any), ("newStickerset", newStickerset as Any)]) case .channelAdminLogEventActionChangeTitle(let prevValue, let newValue): - return ("channelAdminLogEventActionChangeTitle", [("prevValue", String(describing: prevValue)), ("newValue", String(describing: newValue))]) + return ("channelAdminLogEventActionChangeTitle", [("prevValue", prevValue as Any), ("newValue", newValue as Any)]) case .channelAdminLogEventActionChangeUsername(let prevValue, let newValue): - return ("channelAdminLogEventActionChangeUsername", [("prevValue", String(describing: prevValue)), ("newValue", String(describing: newValue))]) + return ("channelAdminLogEventActionChangeUsername", [("prevValue", prevValue as Any), ("newValue", newValue as Any)]) case .channelAdminLogEventActionChangeUsernames(let prevValue, let newValue): - return ("channelAdminLogEventActionChangeUsernames", [("prevValue", String(describing: prevValue)), ("newValue", String(describing: newValue))]) + return ("channelAdminLogEventActionChangeUsernames", [("prevValue", prevValue as Any), ("newValue", newValue as Any)]) case .channelAdminLogEventActionCreateTopic(let topic): - return ("channelAdminLogEventActionCreateTopic", [("topic", String(describing: topic))]) + return ("channelAdminLogEventActionCreateTopic", [("topic", topic as Any)]) case .channelAdminLogEventActionDefaultBannedRights(let prevBannedRights, let newBannedRights): - return ("channelAdminLogEventActionDefaultBannedRights", [("prevBannedRights", String(describing: prevBannedRights)), ("newBannedRights", String(describing: newBannedRights))]) + return ("channelAdminLogEventActionDefaultBannedRights", [("prevBannedRights", prevBannedRights as Any), ("newBannedRights", newBannedRights as Any)]) case .channelAdminLogEventActionDeleteMessage(let message): - return ("channelAdminLogEventActionDeleteMessage", [("message", String(describing: message))]) + return ("channelAdminLogEventActionDeleteMessage", [("message", message as Any)]) case .channelAdminLogEventActionDeleteTopic(let topic): - return ("channelAdminLogEventActionDeleteTopic", [("topic", String(describing: topic))]) + return ("channelAdminLogEventActionDeleteTopic", [("topic", topic as Any)]) case .channelAdminLogEventActionDiscardGroupCall(let call): - return ("channelAdminLogEventActionDiscardGroupCall", [("call", String(describing: call))]) + return ("channelAdminLogEventActionDiscardGroupCall", [("call", call as Any)]) case .channelAdminLogEventActionEditMessage(let prevMessage, let newMessage): - return ("channelAdminLogEventActionEditMessage", [("prevMessage", String(describing: prevMessage)), ("newMessage", String(describing: newMessage))]) + return ("channelAdminLogEventActionEditMessage", [("prevMessage", prevMessage as Any), ("newMessage", newMessage as Any)]) case .channelAdminLogEventActionEditTopic(let prevTopic, let newTopic): - return ("channelAdminLogEventActionEditTopic", [("prevTopic", String(describing: prevTopic)), ("newTopic", String(describing: newTopic))]) + return ("channelAdminLogEventActionEditTopic", [("prevTopic", prevTopic as Any), ("newTopic", newTopic as Any)]) case .channelAdminLogEventActionExportedInviteDelete(let invite): - return ("channelAdminLogEventActionExportedInviteDelete", [("invite", String(describing: invite))]) + return ("channelAdminLogEventActionExportedInviteDelete", [("invite", invite as Any)]) case .channelAdminLogEventActionExportedInviteEdit(let prevInvite, let newInvite): - return ("channelAdminLogEventActionExportedInviteEdit", [("prevInvite", String(describing: prevInvite)), ("newInvite", String(describing: newInvite))]) + return ("channelAdminLogEventActionExportedInviteEdit", [("prevInvite", prevInvite as Any), ("newInvite", newInvite as Any)]) case .channelAdminLogEventActionExportedInviteRevoke(let invite): - return ("channelAdminLogEventActionExportedInviteRevoke", [("invite", String(describing: invite))]) + return ("channelAdminLogEventActionExportedInviteRevoke", [("invite", invite as Any)]) case .channelAdminLogEventActionParticipantInvite(let participant): - return ("channelAdminLogEventActionParticipantInvite", [("participant", String(describing: participant))]) + return ("channelAdminLogEventActionParticipantInvite", [("participant", participant as Any)]) case .channelAdminLogEventActionParticipantJoin: return ("channelAdminLogEventActionParticipantJoin", []) case .channelAdminLogEventActionParticipantJoinByInvite(let invite): - return ("channelAdminLogEventActionParticipantJoinByInvite", [("invite", String(describing: invite))]) + return ("channelAdminLogEventActionParticipantJoinByInvite", [("invite", invite as Any)]) case .channelAdminLogEventActionParticipantJoinByRequest(let invite, let approvedBy): - return ("channelAdminLogEventActionParticipantJoinByRequest", [("invite", String(describing: invite)), ("approvedBy", String(describing: approvedBy))]) + return ("channelAdminLogEventActionParticipantJoinByRequest", [("invite", invite as Any), ("approvedBy", approvedBy as Any)]) case .channelAdminLogEventActionParticipantLeave: return ("channelAdminLogEventActionParticipantLeave", []) case .channelAdminLogEventActionParticipantMute(let participant): - return ("channelAdminLogEventActionParticipantMute", [("participant", String(describing: participant))]) + return ("channelAdminLogEventActionParticipantMute", [("participant", participant as Any)]) case .channelAdminLogEventActionParticipantToggleAdmin(let prevParticipant, let newParticipant): - return ("channelAdminLogEventActionParticipantToggleAdmin", [("prevParticipant", String(describing: prevParticipant)), ("newParticipant", String(describing: newParticipant))]) + return ("channelAdminLogEventActionParticipantToggleAdmin", [("prevParticipant", prevParticipant as Any), ("newParticipant", newParticipant as Any)]) case .channelAdminLogEventActionParticipantToggleBan(let prevParticipant, let newParticipant): - return ("channelAdminLogEventActionParticipantToggleBan", [("prevParticipant", String(describing: prevParticipant)), ("newParticipant", String(describing: newParticipant))]) + return ("channelAdminLogEventActionParticipantToggleBan", [("prevParticipant", prevParticipant as Any), ("newParticipant", newParticipant as Any)]) case .channelAdminLogEventActionParticipantUnmute(let participant): - return ("channelAdminLogEventActionParticipantUnmute", [("participant", String(describing: participant))]) + return ("channelAdminLogEventActionParticipantUnmute", [("participant", participant as Any)]) case .channelAdminLogEventActionParticipantVolume(let participant): - return ("channelAdminLogEventActionParticipantVolume", [("participant", String(describing: participant))]) + return ("channelAdminLogEventActionParticipantVolume", [("participant", participant as Any)]) case .channelAdminLogEventActionPinTopic(let flags, let prevTopic, let newTopic): - return ("channelAdminLogEventActionPinTopic", [("flags", String(describing: flags)), ("prevTopic", String(describing: prevTopic)), ("newTopic", String(describing: newTopic))]) + return ("channelAdminLogEventActionPinTopic", [("flags", flags as Any), ("prevTopic", prevTopic as Any), ("newTopic", newTopic as Any)]) case .channelAdminLogEventActionSendMessage(let message): - return ("channelAdminLogEventActionSendMessage", [("message", String(describing: message))]) + return ("channelAdminLogEventActionSendMessage", [("message", message as Any)]) case .channelAdminLogEventActionStartGroupCall(let call): - return ("channelAdminLogEventActionStartGroupCall", [("call", String(describing: call))]) + return ("channelAdminLogEventActionStartGroupCall", [("call", call as Any)]) case .channelAdminLogEventActionStopPoll(let message): - return ("channelAdminLogEventActionStopPoll", [("message", String(describing: message))]) + return ("channelAdminLogEventActionStopPoll", [("message", message as Any)]) case .channelAdminLogEventActionToggleAntiSpam(let newValue): - return ("channelAdminLogEventActionToggleAntiSpam", [("newValue", String(describing: newValue))]) + return ("channelAdminLogEventActionToggleAntiSpam", [("newValue", newValue as Any)]) case .channelAdminLogEventActionToggleForum(let newValue): - return ("channelAdminLogEventActionToggleForum", [("newValue", String(describing: newValue))]) + return ("channelAdminLogEventActionToggleForum", [("newValue", newValue as Any)]) case .channelAdminLogEventActionToggleGroupCallSetting(let joinMuted): - return ("channelAdminLogEventActionToggleGroupCallSetting", [("joinMuted", String(describing: joinMuted))]) + return ("channelAdminLogEventActionToggleGroupCallSetting", [("joinMuted", joinMuted as Any)]) case .channelAdminLogEventActionToggleInvites(let newValue): - return ("channelAdminLogEventActionToggleInvites", [("newValue", String(describing: newValue))]) + return ("channelAdminLogEventActionToggleInvites", [("newValue", newValue as Any)]) case .channelAdminLogEventActionToggleNoForwards(let newValue): - return ("channelAdminLogEventActionToggleNoForwards", [("newValue", String(describing: newValue))]) + return ("channelAdminLogEventActionToggleNoForwards", [("newValue", newValue as Any)]) case .channelAdminLogEventActionTogglePreHistoryHidden(let newValue): - return ("channelAdminLogEventActionTogglePreHistoryHidden", [("newValue", String(describing: newValue))]) + return ("channelAdminLogEventActionTogglePreHistoryHidden", [("newValue", newValue as Any)]) case .channelAdminLogEventActionToggleSignatures(let newValue): - return ("channelAdminLogEventActionToggleSignatures", [("newValue", String(describing: newValue))]) + return ("channelAdminLogEventActionToggleSignatures", [("newValue", newValue as Any)]) case .channelAdminLogEventActionToggleSlowMode(let prevValue, let newValue): - return ("channelAdminLogEventActionToggleSlowMode", [("prevValue", String(describing: prevValue)), ("newValue", String(describing: newValue))]) + return ("channelAdminLogEventActionToggleSlowMode", [("prevValue", prevValue as Any), ("newValue", newValue as Any)]) case .channelAdminLogEventActionUpdatePinned(let message): - return ("channelAdminLogEventActionUpdatePinned", [("message", String(describing: message))]) + return ("channelAdminLogEventActionUpdatePinned", [("message", message as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api20.swift b/submodules/TelegramApi/Sources/Api20.swift index 9d016b2a92..7b7c1f3515 100644 --- a/submodules/TelegramApi/Sources/Api20.swift +++ b/submodules/TelegramApi/Sources/Api20.swift @@ -21,7 +21,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .stickerKeyword(let documentId, let keyword): - return ("stickerKeyword", [("documentId", String(describing: documentId)), ("keyword", String(describing: keyword))]) + return ("stickerKeyword", [("documentId", documentId as Any), ("keyword", keyword as Any)]) } } @@ -67,7 +67,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .stickerPack(let emoticon, let documents): - return ("stickerPack", [("emoticon", String(describing: emoticon)), ("documents", String(describing: documents))]) + return ("stickerPack", [("emoticon", emoticon as Any), ("documents", documents as Any)]) } } @@ -123,7 +123,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .stickerSet(let flags, let installedDate, let id, let accessHash, let title, let shortName, let thumbs, let thumbDcId, let thumbVersion, let thumbDocumentId, let count, let hash): - return ("stickerSet", [("flags", String(describing: flags)), ("installedDate", String(describing: installedDate)), ("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("title", String(describing: title)), ("shortName", String(describing: shortName)), ("thumbs", String(describing: thumbs)), ("thumbDcId", String(describing: thumbDcId)), ("thumbVersion", String(describing: thumbVersion)), ("thumbDocumentId", String(describing: thumbDocumentId)), ("count", String(describing: count)), ("hash", String(describing: hash))]) + return ("stickerSet", [("flags", flags as Any), ("installedDate", installedDate as Any), ("id", id as Any), ("accessHash", accessHash as Any), ("title", title as Any), ("shortName", shortName as Any), ("thumbs", thumbs as Any), ("thumbDcId", thumbDcId as Any), ("thumbVersion", thumbVersion as Any), ("thumbDocumentId", thumbDocumentId as Any), ("count", count as Any), ("hash", hash as Any)]) } } @@ -229,11 +229,11 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .stickerSetCovered(let set, let cover): - return ("stickerSetCovered", [("set", String(describing: set)), ("cover", String(describing: cover))]) + return ("stickerSetCovered", [("set", set as Any), ("cover", cover as Any)]) case .stickerSetFullCovered(let set, let packs, let keywords, let documents): - return ("stickerSetFullCovered", [("set", String(describing: set)), ("packs", String(describing: packs)), ("keywords", String(describing: keywords)), ("documents", String(describing: documents))]) + return ("stickerSetFullCovered", [("set", set as Any), ("packs", packs as Any), ("keywords", keywords as Any), ("documents", documents as Any)]) case .stickerSetMultiCovered(let set, let covers): - return ("stickerSetMultiCovered", [("set", String(describing: set)), ("covers", String(describing: covers))]) + return ("stickerSetMultiCovered", [("set", set as Any), ("covers", covers as Any)]) } } @@ -334,7 +334,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .theme(let flags, let id, let accessHash, let slug, let title, let document, let settings, let emoticon, let installsCount): - return ("theme", [("flags", String(describing: flags)), ("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("slug", String(describing: slug)), ("title", String(describing: title)), ("document", String(describing: document)), ("settings", String(describing: settings)), ("emoticon", String(describing: emoticon)), ("installsCount", String(describing: installsCount))]) + return ("theme", [("flags", flags as Any), ("id", id as Any), ("accessHash", accessHash as Any), ("slug", slug as Any), ("title", title as Any), ("document", document as Any), ("settings", settings as Any), ("emoticon", emoticon as Any), ("installsCount", installsCount as Any)]) } } @@ -407,7 +407,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .themeSettings(let flags, let baseTheme, let accentColor, let outboxAccentColor, let messageColors, let wallpaper): - return ("themeSettings", [("flags", String(describing: flags)), ("baseTheme", String(describing: baseTheme)), ("accentColor", String(describing: accentColor)), ("outboxAccentColor", String(describing: outboxAccentColor)), ("messageColors", String(describing: messageColors)), ("wallpaper", String(describing: wallpaper))]) + return ("themeSettings", [("flags", flags as Any), ("baseTheme", baseTheme as Any), ("accentColor", accentColor as Any), ("outboxAccentColor", outboxAccentColor as Any), ("messageColors", messageColors as Any), ("wallpaper", wallpaper as Any)]) } } @@ -465,7 +465,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .topPeer(let peer, let rating): - return ("topPeer", [("peer", String(describing: peer)), ("rating", String(describing: rating))]) + return ("topPeer", [("peer", peer as Any), ("rating", rating as Any)]) } } @@ -624,7 +624,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .topPeerCategoryPeers(let category, let count, let peers): - return ("topPeerCategoryPeers", [("category", String(describing: category)), ("count", String(describing: count)), ("peers", String(describing: peers))]) + return ("topPeerCategoryPeers", [("category", category as Any), ("count", count as Any), ("peers", peers as Any)]) } } @@ -1721,185 +1721,185 @@ public extension Api { case .updateAttachMenuBots: return ("updateAttachMenuBots", []) case .updateBotCallbackQuery(let flags, let queryId, let userId, let peer, let msgId, let chatInstance, let data, let gameShortName): - return ("updateBotCallbackQuery", [("flags", String(describing: flags)), ("queryId", String(describing: queryId)), ("userId", String(describing: userId)), ("peer", String(describing: peer)), ("msgId", String(describing: msgId)), ("chatInstance", String(describing: chatInstance)), ("data", String(describing: data)), ("gameShortName", String(describing: gameShortName))]) + return ("updateBotCallbackQuery", [("flags", flags as Any), ("queryId", queryId as Any), ("userId", userId as Any), ("peer", peer as Any), ("msgId", msgId as Any), ("chatInstance", chatInstance as Any), ("data", data as Any), ("gameShortName", gameShortName as Any)]) case .updateBotChatInviteRequester(let peer, let date, let userId, let about, let invite, let qts): - return ("updateBotChatInviteRequester", [("peer", String(describing: peer)), ("date", String(describing: date)), ("userId", String(describing: userId)), ("about", String(describing: about)), ("invite", String(describing: invite)), ("qts", String(describing: qts))]) + return ("updateBotChatInviteRequester", [("peer", peer as Any), ("date", date as Any), ("userId", userId as Any), ("about", about as Any), ("invite", invite as Any), ("qts", qts as Any)]) case .updateBotCommands(let peer, let botId, let commands): - return ("updateBotCommands", [("peer", String(describing: peer)), ("botId", String(describing: botId)), ("commands", String(describing: commands))]) + return ("updateBotCommands", [("peer", peer as Any), ("botId", botId as Any), ("commands", commands as Any)]) case .updateBotInlineQuery(let flags, let queryId, let userId, let query, let geo, let peerType, let offset): - return ("updateBotInlineQuery", [("flags", String(describing: flags)), ("queryId", String(describing: queryId)), ("userId", String(describing: userId)), ("query", String(describing: query)), ("geo", String(describing: geo)), ("peerType", String(describing: peerType)), ("offset", String(describing: offset))]) + return ("updateBotInlineQuery", [("flags", flags as Any), ("queryId", queryId as Any), ("userId", userId as Any), ("query", query as Any), ("geo", geo as Any), ("peerType", peerType as Any), ("offset", offset as Any)]) case .updateBotInlineSend(let flags, let userId, let query, let geo, let id, let msgId): - return ("updateBotInlineSend", [("flags", String(describing: flags)), ("userId", String(describing: userId)), ("query", String(describing: query)), ("geo", String(describing: geo)), ("id", String(describing: id)), ("msgId", String(describing: msgId))]) + return ("updateBotInlineSend", [("flags", flags as Any), ("userId", userId as Any), ("query", query as Any), ("geo", geo as Any), ("id", id as Any), ("msgId", msgId as Any)]) case .updateBotMenuButton(let botId, let button): - return ("updateBotMenuButton", [("botId", String(describing: botId)), ("button", String(describing: button))]) + return ("updateBotMenuButton", [("botId", botId as Any), ("button", button as Any)]) case .updateBotPrecheckoutQuery(let flags, let queryId, let userId, let payload, let info, let shippingOptionId, let currency, let totalAmount): - return ("updateBotPrecheckoutQuery", [("flags", String(describing: flags)), ("queryId", String(describing: queryId)), ("userId", String(describing: userId)), ("payload", String(describing: payload)), ("info", String(describing: info)), ("shippingOptionId", String(describing: shippingOptionId)), ("currency", String(describing: currency)), ("totalAmount", String(describing: totalAmount))]) + return ("updateBotPrecheckoutQuery", [("flags", flags as Any), ("queryId", queryId as Any), ("userId", userId as Any), ("payload", payload as Any), ("info", info as Any), ("shippingOptionId", shippingOptionId as Any), ("currency", currency as Any), ("totalAmount", totalAmount as Any)]) case .updateBotShippingQuery(let queryId, let userId, let payload, let shippingAddress): - return ("updateBotShippingQuery", [("queryId", String(describing: queryId)), ("userId", String(describing: userId)), ("payload", String(describing: payload)), ("shippingAddress", String(describing: shippingAddress))]) + return ("updateBotShippingQuery", [("queryId", queryId as Any), ("userId", userId as Any), ("payload", payload as Any), ("shippingAddress", shippingAddress as Any)]) case .updateBotStopped(let userId, let date, let stopped, let qts): - return ("updateBotStopped", [("userId", String(describing: userId)), ("date", String(describing: date)), ("stopped", String(describing: stopped)), ("qts", String(describing: qts))]) + return ("updateBotStopped", [("userId", userId as Any), ("date", date as Any), ("stopped", stopped as Any), ("qts", qts as Any)]) case .updateBotWebhookJSON(let data): - return ("updateBotWebhookJSON", [("data", String(describing: data))]) + return ("updateBotWebhookJSON", [("data", data as Any)]) case .updateBotWebhookJSONQuery(let queryId, let data, let timeout): - return ("updateBotWebhookJSONQuery", [("queryId", String(describing: queryId)), ("data", String(describing: data)), ("timeout", String(describing: timeout))]) + return ("updateBotWebhookJSONQuery", [("queryId", queryId as Any), ("data", data as Any), ("timeout", timeout as Any)]) case .updateChannel(let channelId): - return ("updateChannel", [("channelId", String(describing: channelId))]) + return ("updateChannel", [("channelId", channelId as Any)]) case .updateChannelAvailableMessages(let channelId, let availableMinId): - return ("updateChannelAvailableMessages", [("channelId", String(describing: channelId)), ("availableMinId", String(describing: availableMinId))]) + return ("updateChannelAvailableMessages", [("channelId", channelId as Any), ("availableMinId", availableMinId as Any)]) case .updateChannelMessageForwards(let channelId, let id, let forwards): - return ("updateChannelMessageForwards", [("channelId", String(describing: channelId)), ("id", String(describing: id)), ("forwards", String(describing: forwards))]) + return ("updateChannelMessageForwards", [("channelId", channelId as Any), ("id", id as Any), ("forwards", forwards as Any)]) case .updateChannelMessageViews(let channelId, let id, let views): - return ("updateChannelMessageViews", [("channelId", String(describing: channelId)), ("id", String(describing: id)), ("views", String(describing: views))]) + return ("updateChannelMessageViews", [("channelId", channelId as Any), ("id", id as Any), ("views", views as Any)]) case .updateChannelParticipant(let flags, let channelId, let date, let actorId, let userId, let prevParticipant, let newParticipant, let invite, let qts): - return ("updateChannelParticipant", [("flags", String(describing: flags)), ("channelId", String(describing: channelId)), ("date", String(describing: date)), ("actorId", String(describing: actorId)), ("userId", String(describing: userId)), ("prevParticipant", String(describing: prevParticipant)), ("newParticipant", String(describing: newParticipant)), ("invite", String(describing: invite)), ("qts", String(describing: qts))]) + return ("updateChannelParticipant", [("flags", flags as Any), ("channelId", channelId as Any), ("date", date as Any), ("actorId", actorId as Any), ("userId", userId as Any), ("prevParticipant", prevParticipant as Any), ("newParticipant", newParticipant as Any), ("invite", invite as Any), ("qts", qts as Any)]) case .updateChannelPinnedTopic(let flags, let channelId, let topicId): - return ("updateChannelPinnedTopic", [("flags", String(describing: flags)), ("channelId", String(describing: channelId)), ("topicId", String(describing: topicId))]) + return ("updateChannelPinnedTopic", [("flags", flags as Any), ("channelId", channelId as Any), ("topicId", topicId as Any)]) case .updateChannelPinnedTopics(let flags, let channelId, let order): - return ("updateChannelPinnedTopics", [("flags", String(describing: flags)), ("channelId", String(describing: channelId)), ("order", String(describing: order))]) + return ("updateChannelPinnedTopics", [("flags", flags as Any), ("channelId", channelId as Any), ("order", order as Any)]) case .updateChannelReadMessagesContents(let flags, let channelId, let topMsgId, let messages): - return ("updateChannelReadMessagesContents", [("flags", String(describing: flags)), ("channelId", String(describing: channelId)), ("topMsgId", String(describing: topMsgId)), ("messages", String(describing: messages))]) + return ("updateChannelReadMessagesContents", [("flags", flags as Any), ("channelId", channelId as Any), ("topMsgId", topMsgId as Any), ("messages", messages as Any)]) case .updateChannelTooLong(let flags, let channelId, let pts): - return ("updateChannelTooLong", [("flags", String(describing: flags)), ("channelId", String(describing: channelId)), ("pts", String(describing: pts))]) + return ("updateChannelTooLong", [("flags", flags as Any), ("channelId", channelId as Any), ("pts", pts as Any)]) case .updateChannelUserTyping(let flags, let channelId, let topMsgId, let fromId, let action): - return ("updateChannelUserTyping", [("flags", String(describing: flags)), ("channelId", String(describing: channelId)), ("topMsgId", String(describing: topMsgId)), ("fromId", String(describing: fromId)), ("action", String(describing: action))]) + return ("updateChannelUserTyping", [("flags", flags as Any), ("channelId", channelId as Any), ("topMsgId", topMsgId as Any), ("fromId", fromId as Any), ("action", action as Any)]) case .updateChannelWebPage(let channelId, let webpage, let pts, let ptsCount): - return ("updateChannelWebPage", [("channelId", String(describing: channelId)), ("webpage", String(describing: webpage)), ("pts", String(describing: pts)), ("ptsCount", String(describing: ptsCount))]) + return ("updateChannelWebPage", [("channelId", channelId as Any), ("webpage", webpage as Any), ("pts", pts as Any), ("ptsCount", ptsCount as Any)]) case .updateChat(let chatId): - return ("updateChat", [("chatId", String(describing: chatId))]) + return ("updateChat", [("chatId", chatId as Any)]) case .updateChatDefaultBannedRights(let peer, let defaultBannedRights, let version): - return ("updateChatDefaultBannedRights", [("peer", String(describing: peer)), ("defaultBannedRights", String(describing: defaultBannedRights)), ("version", String(describing: version))]) + return ("updateChatDefaultBannedRights", [("peer", peer as Any), ("defaultBannedRights", defaultBannedRights as Any), ("version", version as Any)]) case .updateChatParticipant(let flags, let chatId, let date, let actorId, let userId, let prevParticipant, let newParticipant, let invite, let qts): - return ("updateChatParticipant", [("flags", String(describing: flags)), ("chatId", String(describing: chatId)), ("date", String(describing: date)), ("actorId", String(describing: actorId)), ("userId", String(describing: userId)), ("prevParticipant", String(describing: prevParticipant)), ("newParticipant", String(describing: newParticipant)), ("invite", String(describing: invite)), ("qts", String(describing: qts))]) + return ("updateChatParticipant", [("flags", flags as Any), ("chatId", chatId as Any), ("date", date as Any), ("actorId", actorId as Any), ("userId", userId as Any), ("prevParticipant", prevParticipant as Any), ("newParticipant", newParticipant as Any), ("invite", invite as Any), ("qts", qts as Any)]) case .updateChatParticipantAdd(let chatId, let userId, let inviterId, let date, let version): - return ("updateChatParticipantAdd", [("chatId", String(describing: chatId)), ("userId", String(describing: userId)), ("inviterId", String(describing: inviterId)), ("date", String(describing: date)), ("version", String(describing: version))]) + return ("updateChatParticipantAdd", [("chatId", chatId as Any), ("userId", userId as Any), ("inviterId", inviterId as Any), ("date", date as Any), ("version", version as Any)]) case .updateChatParticipantAdmin(let chatId, let userId, let isAdmin, let version): - return ("updateChatParticipantAdmin", [("chatId", String(describing: chatId)), ("userId", String(describing: userId)), ("isAdmin", String(describing: isAdmin)), ("version", String(describing: version))]) + return ("updateChatParticipantAdmin", [("chatId", chatId as Any), ("userId", userId as Any), ("isAdmin", isAdmin as Any), ("version", version as Any)]) case .updateChatParticipantDelete(let chatId, let userId, let version): - return ("updateChatParticipantDelete", [("chatId", String(describing: chatId)), ("userId", String(describing: userId)), ("version", String(describing: version))]) + return ("updateChatParticipantDelete", [("chatId", chatId as Any), ("userId", userId as Any), ("version", version as Any)]) case .updateChatParticipants(let participants): - return ("updateChatParticipants", [("participants", String(describing: participants))]) + return ("updateChatParticipants", [("participants", participants as Any)]) case .updateChatUserTyping(let chatId, let fromId, let action): - return ("updateChatUserTyping", [("chatId", String(describing: chatId)), ("fromId", String(describing: fromId)), ("action", String(describing: action))]) + return ("updateChatUserTyping", [("chatId", chatId as Any), ("fromId", fromId as Any), ("action", action as Any)]) case .updateConfig: return ("updateConfig", []) case .updateContactsReset: return ("updateContactsReset", []) case .updateDcOptions(let dcOptions): - return ("updateDcOptions", [("dcOptions", String(describing: dcOptions))]) + return ("updateDcOptions", [("dcOptions", dcOptions as Any)]) case .updateDeleteChannelMessages(let channelId, let messages, let pts, let ptsCount): - return ("updateDeleteChannelMessages", [("channelId", String(describing: channelId)), ("messages", String(describing: messages)), ("pts", String(describing: pts)), ("ptsCount", String(describing: ptsCount))]) + return ("updateDeleteChannelMessages", [("channelId", channelId as Any), ("messages", messages as Any), ("pts", pts as Any), ("ptsCount", ptsCount as Any)]) case .updateDeleteMessages(let messages, let pts, let ptsCount): - return ("updateDeleteMessages", [("messages", String(describing: messages)), ("pts", String(describing: pts)), ("ptsCount", String(describing: ptsCount))]) + return ("updateDeleteMessages", [("messages", messages as Any), ("pts", pts as Any), ("ptsCount", ptsCount as Any)]) case .updateDeleteScheduledMessages(let peer, let messages): - return ("updateDeleteScheduledMessages", [("peer", String(describing: peer)), ("messages", String(describing: messages))]) + return ("updateDeleteScheduledMessages", [("peer", peer as Any), ("messages", messages as Any)]) case .updateDialogFilter(let flags, let id, let filter): - return ("updateDialogFilter", [("flags", String(describing: flags)), ("id", String(describing: id)), ("filter", String(describing: filter))]) + return ("updateDialogFilter", [("flags", flags as Any), ("id", id as Any), ("filter", filter as Any)]) case .updateDialogFilterOrder(let order): - return ("updateDialogFilterOrder", [("order", String(describing: order))]) + return ("updateDialogFilterOrder", [("order", order as Any)]) case .updateDialogFilters: return ("updateDialogFilters", []) case .updateDialogPinned(let flags, let folderId, let peer): - return ("updateDialogPinned", [("flags", String(describing: flags)), ("folderId", String(describing: folderId)), ("peer", String(describing: peer))]) + return ("updateDialogPinned", [("flags", flags as Any), ("folderId", folderId as Any), ("peer", peer as Any)]) case .updateDialogUnreadMark(let flags, let peer): - return ("updateDialogUnreadMark", [("flags", String(describing: flags)), ("peer", String(describing: peer))]) + return ("updateDialogUnreadMark", [("flags", flags as Any), ("peer", peer as Any)]) case .updateDraftMessage(let flags, let peer, let topMsgId, let draft): - return ("updateDraftMessage", [("flags", String(describing: flags)), ("peer", String(describing: peer)), ("topMsgId", String(describing: topMsgId)), ("draft", String(describing: draft))]) + return ("updateDraftMessage", [("flags", flags as Any), ("peer", peer as Any), ("topMsgId", topMsgId as Any), ("draft", draft as Any)]) case .updateEditChannelMessage(let message, let pts, let ptsCount): - return ("updateEditChannelMessage", [("message", String(describing: message)), ("pts", String(describing: pts)), ("ptsCount", String(describing: ptsCount))]) + return ("updateEditChannelMessage", [("message", message as Any), ("pts", pts as Any), ("ptsCount", ptsCount as Any)]) case .updateEditMessage(let message, let pts, let ptsCount): - return ("updateEditMessage", [("message", String(describing: message)), ("pts", String(describing: pts)), ("ptsCount", String(describing: ptsCount))]) + return ("updateEditMessage", [("message", message as Any), ("pts", pts as Any), ("ptsCount", ptsCount as Any)]) case .updateEncryptedChatTyping(let chatId): - return ("updateEncryptedChatTyping", [("chatId", String(describing: chatId))]) + return ("updateEncryptedChatTyping", [("chatId", chatId as Any)]) case .updateEncryptedMessagesRead(let chatId, let maxDate, let date): - return ("updateEncryptedMessagesRead", [("chatId", String(describing: chatId)), ("maxDate", String(describing: maxDate)), ("date", String(describing: date))]) + return ("updateEncryptedMessagesRead", [("chatId", chatId as Any), ("maxDate", maxDate as Any), ("date", date as Any)]) case .updateEncryption(let chat, let date): - return ("updateEncryption", [("chat", String(describing: chat)), ("date", String(describing: date))]) + return ("updateEncryption", [("chat", chat as Any), ("date", date as Any)]) case .updateFavedStickers: return ("updateFavedStickers", []) case .updateFolderPeers(let folderPeers, let pts, let ptsCount): - return ("updateFolderPeers", [("folderPeers", String(describing: folderPeers)), ("pts", String(describing: pts)), ("ptsCount", String(describing: ptsCount))]) + return ("updateFolderPeers", [("folderPeers", folderPeers as Any), ("pts", pts as Any), ("ptsCount", ptsCount as Any)]) case .updateGeoLiveViewed(let peer, let msgId): - return ("updateGeoLiveViewed", [("peer", String(describing: peer)), ("msgId", String(describing: msgId))]) + return ("updateGeoLiveViewed", [("peer", peer as Any), ("msgId", msgId as Any)]) case .updateGroupCall(let chatId, let call): - return ("updateGroupCall", [("chatId", String(describing: chatId)), ("call", String(describing: call))]) + return ("updateGroupCall", [("chatId", chatId as Any), ("call", call as Any)]) case .updateGroupCallConnection(let flags, let params): - return ("updateGroupCallConnection", [("flags", String(describing: flags)), ("params", String(describing: params))]) + return ("updateGroupCallConnection", [("flags", flags as Any), ("params", params as Any)]) case .updateGroupCallParticipants(let call, let participants, let version): - return ("updateGroupCallParticipants", [("call", String(describing: call)), ("participants", String(describing: participants)), ("version", String(describing: version))]) + return ("updateGroupCallParticipants", [("call", call as Any), ("participants", participants as Any), ("version", version as Any)]) case .updateInlineBotCallbackQuery(let flags, let queryId, let userId, let msgId, let chatInstance, let data, let gameShortName): - return ("updateInlineBotCallbackQuery", [("flags", String(describing: flags)), ("queryId", String(describing: queryId)), ("userId", String(describing: userId)), ("msgId", String(describing: msgId)), ("chatInstance", String(describing: chatInstance)), ("data", String(describing: data)), ("gameShortName", String(describing: gameShortName))]) + return ("updateInlineBotCallbackQuery", [("flags", flags as Any), ("queryId", queryId as Any), ("userId", userId as Any), ("msgId", msgId as Any), ("chatInstance", chatInstance as Any), ("data", data as Any), ("gameShortName", gameShortName as Any)]) case .updateLangPack(let difference): - return ("updateLangPack", [("difference", String(describing: difference))]) + return ("updateLangPack", [("difference", difference as Any)]) case .updateLangPackTooLong(let langCode): - return ("updateLangPackTooLong", [("langCode", String(describing: langCode))]) + return ("updateLangPackTooLong", [("langCode", langCode as Any)]) case .updateLoginToken: return ("updateLoginToken", []) case .updateMessageExtendedMedia(let peer, let msgId, let extendedMedia): - return ("updateMessageExtendedMedia", [("peer", String(describing: peer)), ("msgId", String(describing: msgId)), ("extendedMedia", String(describing: extendedMedia))]) + return ("updateMessageExtendedMedia", [("peer", peer as Any), ("msgId", msgId as Any), ("extendedMedia", extendedMedia as Any)]) case .updateMessageID(let id, let randomId): - return ("updateMessageID", [("id", String(describing: id)), ("randomId", String(describing: randomId))]) + return ("updateMessageID", [("id", id as Any), ("randomId", randomId as Any)]) case .updateMessagePoll(let flags, let pollId, let poll, let results): - return ("updateMessagePoll", [("flags", String(describing: flags)), ("pollId", String(describing: pollId)), ("poll", String(describing: poll)), ("results", String(describing: results))]) + return ("updateMessagePoll", [("flags", flags as Any), ("pollId", pollId as Any), ("poll", poll as Any), ("results", results as Any)]) case .updateMessagePollVote(let pollId, let userId, let options, let qts): - return ("updateMessagePollVote", [("pollId", String(describing: pollId)), ("userId", String(describing: userId)), ("options", String(describing: options)), ("qts", String(describing: qts))]) + return ("updateMessagePollVote", [("pollId", pollId as Any), ("userId", userId as Any), ("options", options as Any), ("qts", qts as Any)]) case .updateMessageReactions(let flags, let peer, let msgId, let topMsgId, let reactions): - return ("updateMessageReactions", [("flags", String(describing: flags)), ("peer", String(describing: peer)), ("msgId", String(describing: msgId)), ("topMsgId", String(describing: topMsgId)), ("reactions", String(describing: reactions))]) + return ("updateMessageReactions", [("flags", flags as Any), ("peer", peer as Any), ("msgId", msgId as Any), ("topMsgId", topMsgId as Any), ("reactions", reactions as Any)]) case .updateMoveStickerSetToTop(let flags, let stickerset): - return ("updateMoveStickerSetToTop", [("flags", String(describing: flags)), ("stickerset", String(describing: stickerset))]) + return ("updateMoveStickerSetToTop", [("flags", flags as Any), ("stickerset", stickerset as Any)]) case .updateNewChannelMessage(let message, let pts, let ptsCount): - return ("updateNewChannelMessage", [("message", String(describing: message)), ("pts", String(describing: pts)), ("ptsCount", String(describing: ptsCount))]) + return ("updateNewChannelMessage", [("message", message as Any), ("pts", pts as Any), ("ptsCount", ptsCount as Any)]) case .updateNewEncryptedMessage(let message, let qts): - return ("updateNewEncryptedMessage", [("message", String(describing: message)), ("qts", String(describing: qts))]) + return ("updateNewEncryptedMessage", [("message", message as Any), ("qts", qts as Any)]) case .updateNewMessage(let message, let pts, let ptsCount): - return ("updateNewMessage", [("message", String(describing: message)), ("pts", String(describing: pts)), ("ptsCount", String(describing: ptsCount))]) + return ("updateNewMessage", [("message", message as Any), ("pts", pts as Any), ("ptsCount", ptsCount as Any)]) case .updateNewScheduledMessage(let message): - return ("updateNewScheduledMessage", [("message", String(describing: message))]) + return ("updateNewScheduledMessage", [("message", message as Any)]) case .updateNewStickerSet(let stickerset): - return ("updateNewStickerSet", [("stickerset", String(describing: stickerset))]) + return ("updateNewStickerSet", [("stickerset", stickerset as Any)]) case .updateNotifySettings(let peer, let notifySettings): - return ("updateNotifySettings", [("peer", String(describing: peer)), ("notifySettings", String(describing: notifySettings))]) + return ("updateNotifySettings", [("peer", peer as Any), ("notifySettings", notifySettings as Any)]) case .updatePeerBlocked(let peerId, let blocked): - return ("updatePeerBlocked", [("peerId", String(describing: peerId)), ("blocked", String(describing: blocked))]) + return ("updatePeerBlocked", [("peerId", peerId as Any), ("blocked", blocked as Any)]) case .updatePeerHistoryTTL(let flags, let peer, let ttlPeriod): - return ("updatePeerHistoryTTL", [("flags", String(describing: flags)), ("peer", String(describing: peer)), ("ttlPeriod", String(describing: ttlPeriod))]) + return ("updatePeerHistoryTTL", [("flags", flags as Any), ("peer", peer as Any), ("ttlPeriod", ttlPeriod as Any)]) case .updatePeerLocated(let peers): - return ("updatePeerLocated", [("peers", String(describing: peers))]) + return ("updatePeerLocated", [("peers", peers as Any)]) case .updatePeerSettings(let peer, let settings): - return ("updatePeerSettings", [("peer", String(describing: peer)), ("settings", String(describing: settings))]) + return ("updatePeerSettings", [("peer", peer as Any), ("settings", settings as Any)]) case .updatePendingJoinRequests(let peer, let requestsPending, let recentRequesters): - return ("updatePendingJoinRequests", [("peer", String(describing: peer)), ("requestsPending", String(describing: requestsPending)), ("recentRequesters", String(describing: recentRequesters))]) + return ("updatePendingJoinRequests", [("peer", peer as Any), ("requestsPending", requestsPending as Any), ("recentRequesters", recentRequesters as Any)]) case .updatePhoneCall(let phoneCall): - return ("updatePhoneCall", [("phoneCall", String(describing: phoneCall))]) + return ("updatePhoneCall", [("phoneCall", phoneCall as Any)]) case .updatePhoneCallSignalingData(let phoneCallId, let data): - return ("updatePhoneCallSignalingData", [("phoneCallId", String(describing: phoneCallId)), ("data", String(describing: data))]) + return ("updatePhoneCallSignalingData", [("phoneCallId", phoneCallId as Any), ("data", data as Any)]) case .updatePinnedChannelMessages(let flags, let channelId, let messages, let pts, let ptsCount): - return ("updatePinnedChannelMessages", [("flags", String(describing: flags)), ("channelId", String(describing: channelId)), ("messages", String(describing: messages)), ("pts", String(describing: pts)), ("ptsCount", String(describing: ptsCount))]) + return ("updatePinnedChannelMessages", [("flags", flags as Any), ("channelId", channelId as Any), ("messages", messages as Any), ("pts", pts as Any), ("ptsCount", ptsCount as Any)]) case .updatePinnedDialogs(let flags, let folderId, let order): - return ("updatePinnedDialogs", [("flags", String(describing: flags)), ("folderId", String(describing: folderId)), ("order", String(describing: order))]) + return ("updatePinnedDialogs", [("flags", flags as Any), ("folderId", folderId as Any), ("order", order as Any)]) case .updatePinnedMessages(let flags, let peer, let messages, let pts, let ptsCount): - return ("updatePinnedMessages", [("flags", String(describing: flags)), ("peer", String(describing: peer)), ("messages", String(describing: messages)), ("pts", String(describing: pts)), ("ptsCount", String(describing: ptsCount))]) + return ("updatePinnedMessages", [("flags", flags as Any), ("peer", peer as Any), ("messages", messages as Any), ("pts", pts as Any), ("ptsCount", ptsCount as Any)]) case .updatePrivacy(let key, let rules): - return ("updatePrivacy", [("key", String(describing: key)), ("rules", String(describing: rules))]) + return ("updatePrivacy", [("key", key as Any), ("rules", rules as Any)]) case .updatePtsChanged: return ("updatePtsChanged", []) case .updateReadChannelDiscussionInbox(let flags, let channelId, let topMsgId, let readMaxId, let broadcastId, let broadcastPost): - return ("updateReadChannelDiscussionInbox", [("flags", String(describing: flags)), ("channelId", String(describing: channelId)), ("topMsgId", String(describing: topMsgId)), ("readMaxId", String(describing: readMaxId)), ("broadcastId", String(describing: broadcastId)), ("broadcastPost", String(describing: broadcastPost))]) + return ("updateReadChannelDiscussionInbox", [("flags", flags as Any), ("channelId", channelId as Any), ("topMsgId", topMsgId as Any), ("readMaxId", readMaxId as Any), ("broadcastId", broadcastId as Any), ("broadcastPost", broadcastPost as Any)]) case .updateReadChannelDiscussionOutbox(let channelId, let topMsgId, let readMaxId): - return ("updateReadChannelDiscussionOutbox", [("channelId", String(describing: channelId)), ("topMsgId", String(describing: topMsgId)), ("readMaxId", String(describing: readMaxId))]) + return ("updateReadChannelDiscussionOutbox", [("channelId", channelId as Any), ("topMsgId", topMsgId as Any), ("readMaxId", readMaxId as Any)]) case .updateReadChannelInbox(let flags, let folderId, let channelId, let maxId, let stillUnreadCount, let pts): - return ("updateReadChannelInbox", [("flags", String(describing: flags)), ("folderId", String(describing: folderId)), ("channelId", String(describing: channelId)), ("maxId", String(describing: maxId)), ("stillUnreadCount", String(describing: stillUnreadCount)), ("pts", String(describing: pts))]) + return ("updateReadChannelInbox", [("flags", flags as Any), ("folderId", folderId as Any), ("channelId", channelId as Any), ("maxId", maxId as Any), ("stillUnreadCount", stillUnreadCount as Any), ("pts", pts as Any)]) case .updateReadChannelOutbox(let channelId, let maxId): - return ("updateReadChannelOutbox", [("channelId", String(describing: channelId)), ("maxId", String(describing: maxId))]) + return ("updateReadChannelOutbox", [("channelId", channelId as Any), ("maxId", maxId as Any)]) case .updateReadFeaturedEmojiStickers: return ("updateReadFeaturedEmojiStickers", []) case .updateReadFeaturedStickers: return ("updateReadFeaturedStickers", []) case .updateReadHistoryInbox(let flags, let folderId, let peer, let maxId, let stillUnreadCount, let pts, let ptsCount): - return ("updateReadHistoryInbox", [("flags", String(describing: flags)), ("folderId", String(describing: folderId)), ("peer", String(describing: peer)), ("maxId", String(describing: maxId)), ("stillUnreadCount", String(describing: stillUnreadCount)), ("pts", String(describing: pts)), ("ptsCount", String(describing: ptsCount))]) + return ("updateReadHistoryInbox", [("flags", flags as Any), ("folderId", folderId as Any), ("peer", peer as Any), ("maxId", maxId as Any), ("stillUnreadCount", stillUnreadCount as Any), ("pts", pts as Any), ("ptsCount", ptsCount as Any)]) case .updateReadHistoryOutbox(let peer, let maxId, let pts, let ptsCount): - return ("updateReadHistoryOutbox", [("peer", String(describing: peer)), ("maxId", String(describing: maxId)), ("pts", String(describing: pts)), ("ptsCount", String(describing: ptsCount))]) + return ("updateReadHistoryOutbox", [("peer", peer as Any), ("maxId", maxId as Any), ("pts", pts as Any), ("ptsCount", ptsCount as Any)]) case .updateReadMessagesContents(let messages, let pts, let ptsCount): - return ("updateReadMessagesContents", [("messages", String(describing: messages)), ("pts", String(describing: pts)), ("ptsCount", String(describing: ptsCount))]) + return ("updateReadMessagesContents", [("messages", messages as Any), ("pts", pts as Any), ("ptsCount", ptsCount as Any)]) case .updateRecentEmojiStatuses: return ("updateRecentEmojiStatuses", []) case .updateRecentReactions: @@ -1911,31 +1911,31 @@ public extension Api { case .updateSavedRingtones: return ("updateSavedRingtones", []) case .updateServiceNotification(let flags, let inboxDate, let type, let message, let media, let entities): - return ("updateServiceNotification", [("flags", String(describing: flags)), ("inboxDate", String(describing: inboxDate)), ("type", String(describing: type)), ("message", String(describing: message)), ("media", String(describing: media)), ("entities", String(describing: entities))]) + return ("updateServiceNotification", [("flags", flags as Any), ("inboxDate", inboxDate as Any), ("type", type as Any), ("message", message as Any), ("media", media as Any), ("entities", entities as Any)]) case .updateStickerSets(let flags): - return ("updateStickerSets", [("flags", String(describing: flags))]) + return ("updateStickerSets", [("flags", flags as Any)]) case .updateStickerSetsOrder(let flags, let order): - return ("updateStickerSetsOrder", [("flags", String(describing: flags)), ("order", String(describing: order))]) + return ("updateStickerSetsOrder", [("flags", flags as Any), ("order", order as Any)]) case .updateTheme(let theme): - return ("updateTheme", [("theme", String(describing: theme))]) + return ("updateTheme", [("theme", theme as Any)]) case .updateTranscribedAudio(let flags, let peer, let msgId, let transcriptionId, let text): - return ("updateTranscribedAudio", [("flags", String(describing: flags)), ("peer", String(describing: peer)), ("msgId", String(describing: msgId)), ("transcriptionId", String(describing: transcriptionId)), ("text", String(describing: text))]) + return ("updateTranscribedAudio", [("flags", flags as Any), ("peer", peer as Any), ("msgId", msgId as Any), ("transcriptionId", transcriptionId as Any), ("text", text as Any)]) case .updateUserEmojiStatus(let userId, let emojiStatus): - return ("updateUserEmojiStatus", [("userId", String(describing: userId)), ("emojiStatus", String(describing: emojiStatus))]) + return ("updateUserEmojiStatus", [("userId", userId as Any), ("emojiStatus", emojiStatus as Any)]) case .updateUserName(let userId, let firstName, let lastName, let usernames): - return ("updateUserName", [("userId", String(describing: userId)), ("firstName", String(describing: firstName)), ("lastName", String(describing: lastName)), ("usernames", String(describing: usernames))]) + return ("updateUserName", [("userId", userId as Any), ("firstName", firstName as Any), ("lastName", lastName as Any), ("usernames", usernames as Any)]) case .updateUserPhone(let userId, let phone): - return ("updateUserPhone", [("userId", String(describing: userId)), ("phone", String(describing: phone))]) + return ("updateUserPhone", [("userId", userId as Any), ("phone", phone as Any)]) case .updateUserPhoto(let userId, let date, let photo, let previous): - return ("updateUserPhoto", [("userId", String(describing: userId)), ("date", String(describing: date)), ("photo", String(describing: photo)), ("previous", String(describing: previous))]) + return ("updateUserPhoto", [("userId", userId as Any), ("date", date as Any), ("photo", photo as Any), ("previous", previous as Any)]) case .updateUserStatus(let userId, let status): - return ("updateUserStatus", [("userId", String(describing: userId)), ("status", String(describing: status))]) + return ("updateUserStatus", [("userId", userId as Any), ("status", status as Any)]) case .updateUserTyping(let userId, let action): - return ("updateUserTyping", [("userId", String(describing: userId)), ("action", String(describing: action))]) + return ("updateUserTyping", [("userId", userId as Any), ("action", action as Any)]) case .updateWebPage(let webpage, let pts, let ptsCount): - return ("updateWebPage", [("webpage", String(describing: webpage)), ("pts", String(describing: pts)), ("ptsCount", String(describing: ptsCount))]) + return ("updateWebPage", [("webpage", webpage as Any), ("pts", pts as Any), ("ptsCount", ptsCount as Any)]) case .updateWebViewResultSent(let queryId): - return ("updateWebViewResultSent", [("queryId", String(describing: queryId))]) + return ("updateWebViewResultSent", [("queryId", queryId as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api21.swift b/submodules/TelegramApi/Sources/Api21.swift index 8ddbc6c472..b5885f7aff 100644 --- a/submodules/TelegramApi/Sources/Api21.swift +++ b/submodules/TelegramApi/Sources/Api21.swift @@ -134,17 +134,17 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .updateShort(let update, let date): - return ("updateShort", [("update", String(describing: update)), ("date", String(describing: date))]) + return ("updateShort", [("update", update as Any), ("date", date as Any)]) case .updateShortChatMessage(let flags, let id, let fromId, let chatId, let message, let pts, let ptsCount, let date, let fwdFrom, let viaBotId, let replyTo, let entities, let ttlPeriod): - return ("updateShortChatMessage", [("flags", String(describing: flags)), ("id", String(describing: id)), ("fromId", String(describing: fromId)), ("chatId", String(describing: chatId)), ("message", String(describing: message)), ("pts", String(describing: pts)), ("ptsCount", String(describing: ptsCount)), ("date", String(describing: date)), ("fwdFrom", String(describing: fwdFrom)), ("viaBotId", String(describing: viaBotId)), ("replyTo", String(describing: replyTo)), ("entities", String(describing: entities)), ("ttlPeriod", String(describing: ttlPeriod))]) + return ("updateShortChatMessage", [("flags", flags as Any), ("id", id as Any), ("fromId", fromId as Any), ("chatId", chatId as Any), ("message", message as Any), ("pts", pts as Any), ("ptsCount", ptsCount as Any), ("date", date as Any), ("fwdFrom", fwdFrom as Any), ("viaBotId", viaBotId as Any), ("replyTo", replyTo as Any), ("entities", entities as Any), ("ttlPeriod", ttlPeriod as Any)]) case .updateShortMessage(let flags, let id, let userId, let message, let pts, let ptsCount, let date, let fwdFrom, let viaBotId, let replyTo, let entities, let ttlPeriod): - return ("updateShortMessage", [("flags", String(describing: flags)), ("id", String(describing: id)), ("userId", String(describing: userId)), ("message", String(describing: message)), ("pts", String(describing: pts)), ("ptsCount", String(describing: ptsCount)), ("date", String(describing: date)), ("fwdFrom", String(describing: fwdFrom)), ("viaBotId", String(describing: viaBotId)), ("replyTo", String(describing: replyTo)), ("entities", String(describing: entities)), ("ttlPeriod", String(describing: ttlPeriod))]) + return ("updateShortMessage", [("flags", flags as Any), ("id", id as Any), ("userId", userId as Any), ("message", message as Any), ("pts", pts as Any), ("ptsCount", ptsCount as Any), ("date", date as Any), ("fwdFrom", fwdFrom as Any), ("viaBotId", viaBotId as Any), ("replyTo", replyTo as Any), ("entities", entities as Any), ("ttlPeriod", ttlPeriod as Any)]) case .updateShortSentMessage(let flags, let id, let pts, let ptsCount, let date, let media, let entities, let ttlPeriod): - return ("updateShortSentMessage", [("flags", String(describing: flags)), ("id", String(describing: id)), ("pts", String(describing: pts)), ("ptsCount", String(describing: ptsCount)), ("date", String(describing: date)), ("media", String(describing: media)), ("entities", String(describing: entities)), ("ttlPeriod", String(describing: ttlPeriod))]) + return ("updateShortSentMessage", [("flags", flags as Any), ("id", id as Any), ("pts", pts as Any), ("ptsCount", ptsCount as Any), ("date", date as Any), ("media", media as Any), ("entities", entities as Any), ("ttlPeriod", ttlPeriod as Any)]) case .updates(let updates, let users, let chats, let date, let seq): - return ("updates", [("updates", String(describing: updates)), ("users", String(describing: users)), ("chats", String(describing: chats)), ("date", String(describing: date)), ("seq", String(describing: seq))]) + return ("updates", [("updates", updates as Any), ("users", users as Any), ("chats", chats as Any), ("date", date as Any), ("seq", seq as Any)]) case .updatesCombined(let updates, let users, let chats, let date, let seqStart, let seq): - return ("updatesCombined", [("updates", String(describing: updates)), ("users", String(describing: users)), ("chats", String(describing: chats)), ("date", String(describing: date)), ("seqStart", String(describing: seqStart)), ("seq", String(describing: seq))]) + return ("updatesCombined", [("updates", updates as Any), ("users", users as Any), ("chats", chats as Any), ("date", date as Any), ("seqStart", seqStart as Any), ("seq", seq as Any)]) case .updatesTooLong: return ("updatesTooLong", []) } @@ -406,11 +406,11 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .urlAuthResultAccepted(let url): - return ("urlAuthResultAccepted", [("url", String(describing: url))]) + return ("urlAuthResultAccepted", [("url", url as Any)]) case .urlAuthResultDefault: return ("urlAuthResultDefault", []) case .urlAuthResultRequest(let flags, let bot, let domain): - return ("urlAuthResultRequest", [("flags", String(describing: flags)), ("bot", String(describing: bot)), ("domain", String(describing: domain))]) + return ("urlAuthResultRequest", [("flags", flags as Any), ("bot", bot as Any), ("domain", domain as Any)]) } } @@ -498,9 +498,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .user(let flags, let flags2, let id, let accessHash, let firstName, let lastName, let username, let phone, let photo, let status, let botInfoVersion, let restrictionReason, let botInlinePlaceholder, let langCode, let emojiStatus, let usernames): - return ("user", [("flags", String(describing: flags)), ("flags2", String(describing: flags2)), ("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("firstName", String(describing: firstName)), ("lastName", String(describing: lastName)), ("username", String(describing: username)), ("phone", String(describing: phone)), ("photo", String(describing: photo)), ("status", String(describing: status)), ("botInfoVersion", String(describing: botInfoVersion)), ("restrictionReason", String(describing: restrictionReason)), ("botInlinePlaceholder", String(describing: botInlinePlaceholder)), ("langCode", String(describing: langCode)), ("emojiStatus", String(describing: emojiStatus)), ("usernames", String(describing: usernames))]) + return ("user", [("flags", flags as Any), ("flags2", flags2 as Any), ("id", id as Any), ("accessHash", accessHash as Any), ("firstName", firstName as Any), ("lastName", lastName as Any), ("username", username as Any), ("phone", phone as Any), ("photo", photo as Any), ("status", status as Any), ("botInfoVersion", botInfoVersion as Any), ("restrictionReason", restrictionReason as Any), ("botInlinePlaceholder", botInlinePlaceholder as Any), ("langCode", langCode as Any), ("emojiStatus", emojiStatus as Any), ("usernames", usernames as Any)]) case .userEmpty(let id): - return ("userEmpty", [("id", String(describing: id))]) + return ("userEmpty", [("id", id as Any)]) } } @@ -623,7 +623,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .userFull(let flags, let id, let about, let settings, let personalPhoto, let profilePhoto, let fallbackPhoto, let notifySettings, let botInfo, let pinnedMsgId, let commonChatsCount, let folderId, let ttlPeriod, let themeEmoticon, let privateForwardName, let botGroupAdminRights, let botBroadcastAdminRights, let premiumGifts): - return ("userFull", [("flags", String(describing: flags)), ("id", String(describing: id)), ("about", String(describing: about)), ("settings", String(describing: settings)), ("personalPhoto", String(describing: personalPhoto)), ("profilePhoto", String(describing: profilePhoto)), ("fallbackPhoto", String(describing: fallbackPhoto)), ("notifySettings", String(describing: notifySettings)), ("botInfo", String(describing: botInfo)), ("pinnedMsgId", String(describing: pinnedMsgId)), ("commonChatsCount", String(describing: commonChatsCount)), ("folderId", String(describing: folderId)), ("ttlPeriod", String(describing: ttlPeriod)), ("themeEmoticon", String(describing: themeEmoticon)), ("privateForwardName", String(describing: privateForwardName)), ("botGroupAdminRights", String(describing: botGroupAdminRights)), ("botBroadcastAdminRights", String(describing: botBroadcastAdminRights)), ("premiumGifts", String(describing: premiumGifts))]) + return ("userFull", [("flags", flags as Any), ("id", id as Any), ("about", about as Any), ("settings", settings as Any), ("personalPhoto", personalPhoto as Any), ("profilePhoto", profilePhoto as Any), ("fallbackPhoto", fallbackPhoto as Any), ("notifySettings", notifySettings as Any), ("botInfo", botInfo as Any), ("pinnedMsgId", pinnedMsgId as Any), ("commonChatsCount", commonChatsCount as Any), ("folderId", folderId as Any), ("ttlPeriod", ttlPeriod as Any), ("themeEmoticon", themeEmoticon as Any), ("privateForwardName", privateForwardName as Any), ("botGroupAdminRights", botGroupAdminRights as Any), ("botBroadcastAdminRights", botBroadcastAdminRights as Any), ("premiumGifts", premiumGifts as Any)]) } } @@ -738,7 +738,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .userProfilePhoto(let flags, let photoId, let strippedThumb, let dcId): - return ("userProfilePhoto", [("flags", String(describing: flags)), ("photoId", String(describing: photoId)), ("strippedThumb", String(describing: strippedThumb)), ("dcId", String(describing: dcId))]) + return ("userProfilePhoto", [("flags", flags as Any), ("photoId", photoId as Any), ("strippedThumb", strippedThumb as Any), ("dcId", dcId as Any)]) case .userProfilePhotoEmpty: return ("userProfilePhotoEmpty", []) } @@ -829,9 +829,9 @@ public extension Api { case .userStatusLastWeek: return ("userStatusLastWeek", []) case .userStatusOffline(let wasOnline): - return ("userStatusOffline", [("wasOnline", String(describing: wasOnline))]) + return ("userStatusOffline", [("wasOnline", wasOnline as Any)]) case .userStatusOnline(let expires): - return ("userStatusOnline", [("expires", String(describing: expires))]) + return ("userStatusOnline", [("expires", expires as Any)]) case .userStatusRecently: return ("userStatusRecently", []) } @@ -893,7 +893,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .username(let flags, let username): - return ("username", [("flags", String(describing: flags)), ("username", String(describing: username))]) + return ("username", [("flags", flags as Any), ("username", username as Any)]) } } @@ -937,7 +937,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .videoSize(let flags, let type, let w, let h, let size, let videoStartTs): - return ("videoSize", [("flags", String(describing: flags)), ("type", String(describing: type)), ("w", String(describing: w)), ("h", String(describing: h)), ("size", String(describing: size)), ("videoStartTs", String(describing: videoStartTs))]) + return ("videoSize", [("flags", flags as Any), ("type", type as Any), ("w", w as Any), ("h", h as Any), ("size", size as Any), ("videoStartTs", videoStartTs as Any)]) } } @@ -1002,9 +1002,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .wallPaper(let id, let flags, let accessHash, let slug, let document, let settings): - return ("wallPaper", [("id", String(describing: id)), ("flags", String(describing: flags)), ("accessHash", String(describing: accessHash)), ("slug", String(describing: slug)), ("document", String(describing: document)), ("settings", String(describing: settings))]) + return ("wallPaper", [("id", id as Any), ("flags", flags as Any), ("accessHash", accessHash as Any), ("slug", slug as Any), ("document", document as Any), ("settings", settings as Any)]) case .wallPaperNoFile(let id, let flags, let settings): - return ("wallPaperNoFile", [("id", String(describing: id)), ("flags", String(describing: flags)), ("settings", String(describing: settings))]) + return ("wallPaperNoFile", [("id", id as Any), ("flags", flags as Any), ("settings", settings as Any)]) } } @@ -1084,7 +1084,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .wallPaperSettings(let flags, let backgroundColor, let secondBackgroundColor, let thirdBackgroundColor, let fourthBackgroundColor, let intensity, let rotation): - return ("wallPaperSettings", [("flags", String(describing: flags)), ("backgroundColor", String(describing: backgroundColor)), ("secondBackgroundColor", String(describing: secondBackgroundColor)), ("thirdBackgroundColor", String(describing: thirdBackgroundColor)), ("fourthBackgroundColor", String(describing: fourthBackgroundColor)), ("intensity", String(describing: intensity)), ("rotation", String(describing: rotation))]) + return ("wallPaperSettings", [("flags", flags as Any), ("backgroundColor", backgroundColor as Any), ("secondBackgroundColor", secondBackgroundColor as Any), ("thirdBackgroundColor", thirdBackgroundColor as Any), ("fourthBackgroundColor", fourthBackgroundColor as Any), ("intensity", intensity as Any), ("rotation", rotation as Any)]) } } @@ -1146,7 +1146,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .webAuthorization(let hash, let botId, let domain, let browser, let platform, let dateCreated, let dateActive, let ip, let region): - return ("webAuthorization", [("hash", String(describing: hash)), ("botId", String(describing: botId)), ("domain", String(describing: domain)), ("browser", String(describing: browser)), ("platform", String(describing: platform)), ("dateCreated", String(describing: dateCreated)), ("dateActive", String(describing: dateActive)), ("ip", String(describing: ip)), ("region", String(describing: region))]) + return ("webAuthorization", [("hash", hash as Any), ("botId", botId as Any), ("domain", domain as Any), ("browser", browser as Any), ("platform", platform as Any), ("dateCreated", dateCreated as Any), ("dateActive", dateActive as Any), ("ip", ip as Any), ("region", region as Any)]) } } @@ -1228,9 +1228,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .webDocument(let url, let accessHash, let size, let mimeType, let attributes): - return ("webDocument", [("url", String(describing: url)), ("accessHash", String(describing: accessHash)), ("size", String(describing: size)), ("mimeType", String(describing: mimeType)), ("attributes", String(describing: attributes))]) + return ("webDocument", [("url", url as Any), ("accessHash", accessHash as Any), ("size", size as Any), ("mimeType", mimeType as Any), ("attributes", attributes as Any)]) case .webDocumentNoProxy(let url, let size, let mimeType, let attributes): - return ("webDocumentNoProxy", [("url", String(describing: url)), ("size", String(describing: size)), ("mimeType", String(describing: mimeType)), ("attributes", String(describing: attributes))]) + return ("webDocumentNoProxy", [("url", url as Any), ("size", size as Any), ("mimeType", mimeType as Any), ("attributes", attributes as Any)]) } } @@ -1347,13 +1347,13 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .webPage(let flags, let id, let url, let displayUrl, let hash, let type, let siteName, let title, let description, let photo, let embedUrl, let embedType, let embedWidth, let embedHeight, let duration, let author, let document, let cachedPage, let attributes): - return ("webPage", [("flags", String(describing: flags)), ("id", String(describing: id)), ("url", String(describing: url)), ("displayUrl", String(describing: displayUrl)), ("hash", String(describing: hash)), ("type", String(describing: type)), ("siteName", String(describing: siteName)), ("title", String(describing: title)), ("description", String(describing: description)), ("photo", String(describing: photo)), ("embedUrl", String(describing: embedUrl)), ("embedType", String(describing: embedType)), ("embedWidth", String(describing: embedWidth)), ("embedHeight", String(describing: embedHeight)), ("duration", String(describing: duration)), ("author", String(describing: author)), ("document", String(describing: document)), ("cachedPage", String(describing: cachedPage)), ("attributes", String(describing: attributes))]) + return ("webPage", [("flags", flags as Any), ("id", id as Any), ("url", url as Any), ("displayUrl", displayUrl as Any), ("hash", hash as Any), ("type", type as Any), ("siteName", siteName as Any), ("title", title as Any), ("description", description as Any), ("photo", photo as Any), ("embedUrl", embedUrl as Any), ("embedType", embedType as Any), ("embedWidth", embedWidth as Any), ("embedHeight", embedHeight as Any), ("duration", duration as Any), ("author", author as Any), ("document", document as Any), ("cachedPage", cachedPage as Any), ("attributes", attributes as Any)]) case .webPageEmpty(let id): - return ("webPageEmpty", [("id", String(describing: id))]) + return ("webPageEmpty", [("id", id as Any)]) case .webPageNotModified(let flags, let cachedPageViews): - return ("webPageNotModified", [("flags", String(describing: flags)), ("cachedPageViews", String(describing: cachedPageViews))]) + return ("webPageNotModified", [("flags", flags as Any), ("cachedPageViews", cachedPageViews as Any)]) case .webPagePending(let id, let date): - return ("webPagePending", [("id", String(describing: id)), ("date", String(describing: date))]) + return ("webPagePending", [("id", id as Any), ("date", date as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api22.swift b/submodules/TelegramApi/Sources/Api22.swift index ac607defc4..1e09defc19 100644 --- a/submodules/TelegramApi/Sources/Api22.swift +++ b/submodules/TelegramApi/Sources/Api22.swift @@ -22,7 +22,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .webPageAttributeTheme(let flags, let documents, let settings): - return ("webPageAttributeTheme", [("flags", String(describing: flags)), ("documents", String(describing: documents)), ("settings", String(describing: settings))]) + return ("webPageAttributeTheme", [("flags", flags as Any), ("documents", documents as Any), ("settings", settings as Any)]) } } @@ -69,7 +69,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .webViewMessageSent(let flags, let msgId): - return ("webViewMessageSent", [("flags", String(describing: flags)), ("msgId", String(describing: msgId))]) + return ("webViewMessageSent", [("flags", flags as Any), ("msgId", msgId as Any)]) } } @@ -111,7 +111,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .webViewResultUrl(let queryId, let url): - return ("webViewResultUrl", [("queryId", String(describing: queryId)), ("url", String(describing: url))]) + return ("webViewResultUrl", [("queryId", queryId as Any), ("url", url as Any)]) } } @@ -171,7 +171,7 @@ public extension Api.account { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .authorizationForm(let flags, let requiredTypes, let values, let errors, let users, let privacyPolicyUrl): - return ("authorizationForm", [("flags", String(describing: flags)), ("requiredTypes", String(describing: requiredTypes)), ("values", String(describing: values)), ("errors", String(describing: errors)), ("users", String(describing: users)), ("privacyPolicyUrl", String(describing: privacyPolicyUrl))]) + return ("authorizationForm", [("flags", flags as Any), ("requiredTypes", requiredTypes as Any), ("values", values as Any), ("errors", errors as Any), ("users", users as Any), ("privacyPolicyUrl", privacyPolicyUrl as Any)]) } } @@ -235,7 +235,7 @@ public extension Api.account { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .authorizations(let authorizationTtlDays, let authorizations): - return ("authorizations", [("authorizationTtlDays", String(describing: authorizationTtlDays)), ("authorizations", String(describing: authorizations))]) + return ("authorizations", [("authorizationTtlDays", authorizationTtlDays as Any), ("authorizations", authorizations as Any)]) } } @@ -278,7 +278,7 @@ public extension Api.account { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .autoDownloadSettings(let low, let medium, let high): - return ("autoDownloadSettings", [("low", String(describing: low)), ("medium", String(describing: medium)), ("high", String(describing: high))]) + return ("autoDownloadSettings", [("low", low as Any), ("medium", medium as Any), ("high", high as Any)]) } } @@ -326,7 +326,7 @@ public extension Api.account { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .contentSettings(let flags): - return ("contentSettings", [("flags", String(describing: flags))]) + return ("contentSettings", [("flags", flags as Any)]) } } @@ -370,9 +370,9 @@ public extension Api.account { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .emailVerified(let email): - return ("emailVerified", [("email", String(describing: email))]) + return ("emailVerified", [("email", email as Any)]) case .emailVerifiedLogin(let email, let sentCode): - return ("emailVerifiedLogin", [("email", String(describing: email)), ("sentCode", String(describing: sentCode))]) + return ("emailVerifiedLogin", [("email", email as Any), ("sentCode", sentCode as Any)]) } } @@ -436,7 +436,7 @@ public extension Api.account { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .emojiStatuses(let hash, let statuses): - return ("emojiStatuses", [("hash", String(describing: hash)), ("statuses", String(describing: statuses))]) + return ("emojiStatuses", [("hash", hash as Any), ("statuses", statuses as Any)]) case .emojiStatusesNotModified: return ("emojiStatusesNotModified", []) } @@ -492,7 +492,7 @@ public extension Api.account { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .password(let flags, let currentAlgo, let srpB, let srpId, let hint, let emailUnconfirmedPattern, let newAlgo, let newSecureAlgo, let secureRandom, let pendingResetDate, let loginEmailPattern): - return ("password", [("flags", String(describing: flags)), ("currentAlgo", String(describing: currentAlgo)), ("srpB", String(describing: srpB)), ("srpId", String(describing: srpId)), ("hint", String(describing: hint)), ("emailUnconfirmedPattern", String(describing: emailUnconfirmedPattern)), ("newAlgo", String(describing: newAlgo)), ("newSecureAlgo", String(describing: newSecureAlgo)), ("secureRandom", String(describing: secureRandom)), ("pendingResetDate", String(describing: pendingResetDate)), ("loginEmailPattern", String(describing: loginEmailPattern))]) + return ("password", [("flags", flags as Any), ("currentAlgo", currentAlgo as Any), ("srpB", srpB as Any), ("srpId", srpId as Any), ("hint", hint as Any), ("emailUnconfirmedPattern", emailUnconfirmedPattern as Any), ("newAlgo", newAlgo as Any), ("newSecureAlgo", newSecureAlgo as Any), ("secureRandom", secureRandom as Any), ("pendingResetDate", pendingResetDate as Any), ("loginEmailPattern", loginEmailPattern as Any)]) } } @@ -569,7 +569,7 @@ public extension Api.account { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .passwordInputSettings(let flags, let newAlgo, let newPasswordHash, let hint, let email, let newSecureSettings): - return ("passwordInputSettings", [("flags", String(describing: flags)), ("newAlgo", String(describing: newAlgo)), ("newPasswordHash", String(describing: newPasswordHash)), ("hint", String(describing: hint)), ("email", String(describing: email)), ("newSecureSettings", String(describing: newSecureSettings))]) + return ("passwordInputSettings", [("flags", flags as Any), ("newAlgo", newAlgo as Any), ("newPasswordHash", newPasswordHash as Any), ("hint", hint as Any), ("email", email as Any), ("newSecureSettings", newSecureSettings as Any)]) } } @@ -626,7 +626,7 @@ public extension Api.account { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .passwordSettings(let flags, let email, let secureSettings): - return ("passwordSettings", [("flags", String(describing: flags)), ("email", String(describing: email)), ("secureSettings", String(describing: secureSettings))]) + return ("passwordSettings", [("flags", flags as Any), ("email", email as Any), ("secureSettings", secureSettings as Any)]) } } @@ -684,7 +684,7 @@ public extension Api.account { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .privacyRules(let rules, let chats, let users): - return ("privacyRules", [("rules", String(describing: rules)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("privacyRules", [("rules", rules as Any), ("chats", chats as Any), ("users", users as Any)]) } } @@ -746,11 +746,11 @@ public extension Api.account { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .resetPasswordFailedWait(let retryDate): - return ("resetPasswordFailedWait", [("retryDate", String(describing: retryDate))]) + return ("resetPasswordFailedWait", [("retryDate", retryDate as Any)]) case .resetPasswordOk: return ("resetPasswordOk", []) case .resetPasswordRequestedWait(let untilDate): - return ("resetPasswordRequestedWait", [("untilDate", String(describing: untilDate))]) + return ("resetPasswordRequestedWait", [("untilDate", untilDate as Any)]) } } @@ -809,7 +809,7 @@ public extension Api.account { case .savedRingtone: return ("savedRingtone", []) case .savedRingtoneConverted(let document): - return ("savedRingtoneConverted", [("document", String(describing: document))]) + return ("savedRingtoneConverted", [("document", document as Any)]) } } @@ -862,7 +862,7 @@ public extension Api.account { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .savedRingtones(let hash, let ringtones): - return ("savedRingtones", [("hash", String(describing: hash)), ("ringtones", String(describing: ringtones))]) + return ("savedRingtones", [("hash", hash as Any), ("ringtones", ringtones as Any)]) case .savedRingtonesNotModified: return ("savedRingtonesNotModified", []) } @@ -909,7 +909,7 @@ public extension Api.account { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .sentEmailCode(let emailPattern, let length): - return ("sentEmailCode", [("emailPattern", String(describing: emailPattern)), ("length", String(describing: length))]) + return ("sentEmailCode", [("emailPattern", emailPattern as Any), ("length", length as Any)]) } } @@ -948,7 +948,7 @@ public extension Api.account { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .takeout(let id): - return ("takeout", [("id", String(describing: id))]) + return ("takeout", [("id", id as Any)]) } } @@ -996,7 +996,7 @@ public extension Api.account { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .themes(let hash, let themes): - return ("themes", [("hash", String(describing: hash)), ("themes", String(describing: themes))]) + return ("themes", [("hash", hash as Any), ("themes", themes as Any)]) case .themesNotModified: return ("themesNotModified", []) } @@ -1043,7 +1043,7 @@ public extension Api.account { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .tmpPassword(let tmpPassword, let validUntil): - return ("tmpPassword", [("tmpPassword", String(describing: tmpPassword)), ("validUntil", String(describing: validUntil))]) + return ("tmpPassword", [("tmpPassword", tmpPassword as Any), ("validUntil", validUntil as Any)]) } } @@ -1094,7 +1094,7 @@ public extension Api.account { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .wallPapers(let hash, let wallpapers): - return ("wallPapers", [("hash", String(describing: hash)), ("wallpapers", String(describing: wallpapers))]) + return ("wallPapers", [("hash", hash as Any), ("wallpapers", wallpapers as Any)]) case .wallPapersNotModified: return ("wallPapersNotModified", []) } @@ -1149,7 +1149,7 @@ public extension Api.account { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .webAuthorizations(let authorizations, let users): - return ("webAuthorizations", [("authorizations", String(describing: authorizations)), ("users", String(describing: users))]) + return ("webAuthorizations", [("authorizations", authorizations as Any), ("users", users as Any)]) } } @@ -1203,9 +1203,9 @@ public extension Api.auth { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .authorization(let flags, let otherwiseReloginDays, let tmpSessions, let user): - return ("authorization", [("flags", String(describing: flags)), ("otherwiseReloginDays", String(describing: otherwiseReloginDays)), ("tmpSessions", String(describing: tmpSessions)), ("user", String(describing: user))]) + return ("authorization", [("flags", flags as Any), ("otherwiseReloginDays", otherwiseReloginDays as Any), ("tmpSessions", tmpSessions as Any), ("user", user as Any)]) case .authorizationSignUpRequired(let flags, let termsOfService): - return ("authorizationSignUpRequired", [("flags", String(describing: flags)), ("termsOfService", String(describing: termsOfService))]) + return ("authorizationSignUpRequired", [("flags", flags as Any), ("termsOfService", termsOfService as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api23.swift b/submodules/TelegramApi/Sources/Api23.swift index b84c84469b..10408368cb 100644 --- a/submodules/TelegramApi/Sources/Api23.swift +++ b/submodules/TelegramApi/Sources/Api23.swift @@ -93,7 +93,7 @@ public extension Api.auth { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .exportedAuthorization(let id, let bytes): - return ("exportedAuthorization", [("id", String(describing: id)), ("bytes", String(describing: bytes))]) + return ("exportedAuthorization", [("id", id as Any), ("bytes", bytes as Any)]) } } @@ -133,7 +133,7 @@ public extension Api.auth { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .loggedOut(let flags, let futureAuthToken): - return ("loggedOut", [("flags", String(describing: flags)), ("futureAuthToken", String(describing: futureAuthToken))]) + return ("loggedOut", [("flags", flags as Any), ("futureAuthToken", futureAuthToken as Any)]) } } @@ -188,11 +188,11 @@ public extension Api.auth { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .loginToken(let expires, let token): - return ("loginToken", [("expires", String(describing: expires)), ("token", String(describing: token))]) + return ("loginToken", [("expires", expires as Any), ("token", token as Any)]) case .loginTokenMigrateTo(let dcId, let token): - return ("loginTokenMigrateTo", [("dcId", String(describing: dcId)), ("token", String(describing: token))]) + return ("loginTokenMigrateTo", [("dcId", dcId as Any), ("token", token as Any)]) case .loginTokenSuccess(let authorization): - return ("loginTokenSuccess", [("authorization", String(describing: authorization))]) + return ("loginTokenSuccess", [("authorization", authorization as Any)]) } } @@ -258,7 +258,7 @@ public extension Api.auth { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .passwordRecovery(let emailPattern): - return ("passwordRecovery", [("emailPattern", String(describing: emailPattern))]) + return ("passwordRecovery", [("emailPattern", emailPattern as Any)]) } } @@ -298,7 +298,7 @@ public extension Api.auth { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .sentCode(let flags, let type, let phoneCodeHash, let nextType, let timeout): - return ("sentCode", [("flags", String(describing: flags)), ("type", String(describing: type)), ("phoneCodeHash", String(describing: phoneCodeHash)), ("nextType", String(describing: nextType)), ("timeout", String(describing: timeout))]) + return ("sentCode", [("flags", flags as Any), ("type", type as Any), ("phoneCodeHash", phoneCodeHash as Any), ("nextType", nextType as Any), ("timeout", timeout as Any)]) } } @@ -404,21 +404,21 @@ public extension Api.auth { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .sentCodeTypeApp(let length): - return ("sentCodeTypeApp", [("length", String(describing: length))]) + return ("sentCodeTypeApp", [("length", length as Any)]) case .sentCodeTypeCall(let length): - return ("sentCodeTypeCall", [("length", String(describing: length))]) + return ("sentCodeTypeCall", [("length", length as Any)]) case .sentCodeTypeEmailCode(let flags, let emailPattern, let length, let nextPhoneLoginDate): - return ("sentCodeTypeEmailCode", [("flags", String(describing: flags)), ("emailPattern", String(describing: emailPattern)), ("length", String(describing: length)), ("nextPhoneLoginDate", String(describing: nextPhoneLoginDate))]) + return ("sentCodeTypeEmailCode", [("flags", flags as Any), ("emailPattern", emailPattern as Any), ("length", length as Any), ("nextPhoneLoginDate", nextPhoneLoginDate as Any)]) case .sentCodeTypeFlashCall(let pattern): - return ("sentCodeTypeFlashCall", [("pattern", String(describing: pattern))]) + return ("sentCodeTypeFlashCall", [("pattern", pattern as Any)]) case .sentCodeTypeFragmentSms(let url, let length): - return ("sentCodeTypeFragmentSms", [("url", String(describing: url)), ("length", String(describing: length))]) + return ("sentCodeTypeFragmentSms", [("url", url as Any), ("length", length as Any)]) case .sentCodeTypeMissedCall(let prefix, let length): - return ("sentCodeTypeMissedCall", [("prefix", String(describing: prefix)), ("length", String(describing: length))]) + return ("sentCodeTypeMissedCall", [("prefix", prefix as Any), ("length", length as Any)]) case .sentCodeTypeSetUpEmailRequired(let flags): - return ("sentCodeTypeSetUpEmailRequired", [("flags", String(describing: flags))]) + return ("sentCodeTypeSetUpEmailRequired", [("flags", flags as Any)]) case .sentCodeTypeSms(let length): - return ("sentCodeTypeSms", [("length", String(describing: length))]) + return ("sentCodeTypeSms", [("length", length as Any)]) } } @@ -560,7 +560,7 @@ public extension Api.channels { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .adminLogResults(let events, let chats, let users): - return ("adminLogResults", [("events", String(describing: events)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("adminLogResults", [("events", events as Any), ("chats", chats as Any), ("users", users as Any)]) } } @@ -618,7 +618,7 @@ public extension Api.channels { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .channelParticipant(let participant, let chats, let users): - return ("channelParticipant", [("participant", String(describing: participant)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("channelParticipant", [("participant", participant as Any), ("chats", chats as Any), ("users", users as Any)]) } } @@ -688,7 +688,7 @@ public extension Api.channels { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .channelParticipants(let count, let participants, let chats, let users): - return ("channelParticipants", [("count", String(describing: count)), ("participants", String(describing: participants)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("channelParticipants", [("count", count as Any), ("participants", participants as Any), ("chats", chats as Any), ("users", users as Any)]) case .channelParticipantsNotModified: return ("channelParticipantsNotModified", []) } @@ -758,7 +758,7 @@ public extension Api.channels { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .sendAsPeers(let peers, let chats, let users): - return ("sendAsPeers", [("peers", String(describing: peers)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("sendAsPeers", [("peers", peers as Any), ("chats", chats as Any), ("users", users as Any)]) } } @@ -842,9 +842,9 @@ public extension Api.contacts { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .blocked(let blocked, let chats, let users): - return ("blocked", [("blocked", String(describing: blocked)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("blocked", [("blocked", blocked as Any), ("chats", chats as Any), ("users", users as Any)]) case .blockedSlice(let count, let blocked, let chats, let users): - return ("blockedSlice", [("count", String(describing: count)), ("blocked", String(describing: blocked)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("blockedSlice", [("count", count as Any), ("blocked", blocked as Any), ("chats", chats as Any), ("users", users as Any)]) } } @@ -935,7 +935,7 @@ public extension Api.contacts { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .contacts(let contacts, let savedCount, let users): - return ("contacts", [("contacts", String(describing: contacts)), ("savedCount", String(describing: savedCount)), ("users", String(describing: users))]) + return ("contacts", [("contacts", contacts as Any), ("savedCount", savedCount as Any), ("users", users as Any)]) case .contactsNotModified: return ("contactsNotModified", []) } @@ -1005,7 +1005,7 @@ public extension Api.contacts { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .found(let myResults, let results, let chats, let users): - return ("found", [("myResults", String(describing: myResults)), ("results", String(describing: results)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("found", [("myResults", myResults as Any), ("results", results as Any), ("chats", chats as Any), ("users", users as Any)]) } } @@ -1077,7 +1077,7 @@ public extension Api.contacts { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .importedContacts(let imported, let popularInvites, let retryContacts, let users): - return ("importedContacts", [("imported", String(describing: imported)), ("popularInvites", String(describing: popularInvites)), ("retryContacts", String(describing: retryContacts)), ("users", String(describing: users))]) + return ("importedContacts", [("imported", imported as Any), ("popularInvites", popularInvites as Any), ("retryContacts", retryContacts as Any), ("users", users as Any)]) } } @@ -1140,7 +1140,7 @@ public extension Api.contacts { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .resolvedPeer(let peer, let chats, let users): - return ("resolvedPeer", [("peer", String(describing: peer)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("resolvedPeer", [("peer", peer as Any), ("chats", chats as Any), ("users", users as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api24.swift b/submodules/TelegramApi/Sources/Api24.swift index fa5f9162c9..0934ea5662 100644 --- a/submodules/TelegramApi/Sources/Api24.swift +++ b/submodules/TelegramApi/Sources/Api24.swift @@ -44,7 +44,7 @@ public extension Api.contacts { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .topPeers(let categories, let chats, let users): - return ("topPeers", [("categories", String(describing: categories)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("topPeers", [("categories", categories as Any), ("chats", chats as Any), ("users", users as Any)]) case .topPeersDisabled: return ("topPeersDisabled", []) case .topPeersNotModified: @@ -120,7 +120,7 @@ public extension Api.help { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .appUpdate(let flags, let id, let version, let text, let entities, let document, let url, let sticker): - return ("appUpdate", [("flags", String(describing: flags)), ("id", String(describing: id)), ("version", String(describing: version)), ("text", String(describing: text)), ("entities", String(describing: entities)), ("document", String(describing: document)), ("url", String(describing: url)), ("sticker", String(describing: sticker))]) + return ("appUpdate", [("flags", flags as Any), ("id", id as Any), ("version", version as Any), ("text", text as Any), ("entities", entities as Any), ("document", document as Any), ("url", url as Any), ("sticker", sticker as Any)]) case .noAppUpdate: return ("noAppUpdate", []) } @@ -200,7 +200,7 @@ public extension Api.help { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .countriesList(let countries, let hash): - return ("countriesList", [("countries", String(describing: countries)), ("hash", String(describing: hash))]) + return ("countriesList", [("countries", countries as Any), ("hash", hash as Any)]) case .countriesListNotModified: return ("countriesListNotModified", []) } @@ -254,7 +254,7 @@ public extension Api.help { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .country(let flags, let iso2, let defaultName, let name, let countryCodes): - return ("country", [("flags", String(describing: flags)), ("iso2", String(describing: iso2)), ("defaultName", String(describing: defaultName)), ("name", String(describing: name)), ("countryCodes", String(describing: countryCodes))]) + return ("country", [("flags", flags as Any), ("iso2", iso2 as Any), ("defaultName", defaultName as Any), ("name", name as Any), ("countryCodes", countryCodes as Any)]) } } @@ -315,7 +315,7 @@ public extension Api.help { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .countryCode(let flags, let countryCode, let prefixes, let patterns): - return ("countryCode", [("flags", String(describing: flags)), ("countryCode", String(describing: countryCode)), ("prefixes", String(describing: prefixes)), ("patterns", String(describing: patterns))]) + return ("countryCode", [("flags", flags as Any), ("countryCode", countryCode as Any), ("prefixes", prefixes as Any), ("patterns", patterns as Any)]) } } @@ -377,7 +377,7 @@ public extension Api.help { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .deepLinkInfo(let flags, let message, let entities): - return ("deepLinkInfo", [("flags", String(describing: flags)), ("message", String(describing: message)), ("entities", String(describing: entities))]) + return ("deepLinkInfo", [("flags", flags as Any), ("message", message as Any), ("entities", entities as Any)]) case .deepLinkInfoEmpty: return ("deepLinkInfoEmpty", []) } @@ -426,7 +426,7 @@ public extension Api.help { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inviteText(let message): - return ("inviteText", [("message", String(describing: message))]) + return ("inviteText", [("message", message as Any)]) } } @@ -470,7 +470,7 @@ public extension Api.help { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .passportConfig(let hash, let countriesLangs): - return ("passportConfig", [("hash", String(describing: hash)), ("countriesLangs", String(describing: countriesLangs))]) + return ("passportConfig", [("hash", hash as Any), ("countriesLangs", countriesLangs as Any)]) case .passportConfigNotModified: return ("passportConfigNotModified", []) } @@ -541,7 +541,7 @@ public extension Api.help { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .premiumPromo(let statusText, let statusEntities, let videoSections, let videos, let periodOptions, let users): - return ("premiumPromo", [("statusText", String(describing: statusText)), ("statusEntities", String(describing: statusEntities)), ("videoSections", String(describing: videoSections)), ("videos", String(describing: videos)), ("periodOptions", String(describing: periodOptions)), ("users", String(describing: users))]) + return ("premiumPromo", [("statusText", statusText as Any), ("statusEntities", statusEntities as Any), ("videoSections", videoSections as Any), ("videos", videos as Any), ("periodOptions", periodOptions as Any), ("users", users as Any)]) } } @@ -623,9 +623,9 @@ public extension Api.help { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .promoData(let flags, let expires, let peer, let chats, let users, let psaType, let psaMessage): - return ("promoData", [("flags", String(describing: flags)), ("expires", String(describing: expires)), ("peer", String(describing: peer)), ("chats", String(describing: chats)), ("users", String(describing: users)), ("psaType", String(describing: psaType)), ("psaMessage", String(describing: psaMessage))]) + return ("promoData", [("flags", flags as Any), ("expires", expires as Any), ("peer", peer as Any), ("chats", chats as Any), ("users", users as Any), ("psaType", psaType as Any), ("psaMessage", psaMessage as Any)]) case .promoDataEmpty(let expires): - return ("promoDataEmpty", [("expires", String(describing: expires))]) + return ("promoDataEmpty", [("expires", expires as Any)]) } } @@ -710,7 +710,7 @@ public extension Api.help { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .recentMeUrls(let urls, let chats, let users): - return ("recentMeUrls", [("urls", String(describing: urls)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("recentMeUrls", [("urls", urls as Any), ("chats", chats as Any), ("users", users as Any)]) } } @@ -759,7 +759,7 @@ public extension Api.help { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .support(let phoneNumber, let user): - return ("support", [("phoneNumber", String(describing: phoneNumber)), ("user", String(describing: user))]) + return ("support", [("phoneNumber", phoneNumber as Any), ("user", user as Any)]) } } @@ -800,7 +800,7 @@ public extension Api.help { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .supportName(let name): - return ("supportName", [("name", String(describing: name))]) + return ("supportName", [("name", name as Any)]) } } @@ -844,7 +844,7 @@ public extension Api.help { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .termsOfService(let flags, let id, let text, let entities, let minAgeConfirm): - return ("termsOfService", [("flags", String(describing: flags)), ("id", String(describing: id)), ("text", String(describing: text)), ("entities", String(describing: entities)), ("minAgeConfirm", String(describing: minAgeConfirm))]) + return ("termsOfService", [("flags", flags as Any), ("id", id as Any), ("text", text as Any), ("entities", entities as Any), ("minAgeConfirm", minAgeConfirm as Any)]) } } @@ -904,9 +904,9 @@ public extension Api.help { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .termsOfServiceUpdate(let expires, let termsOfService): - return ("termsOfServiceUpdate", [("expires", String(describing: expires)), ("termsOfService", String(describing: termsOfService))]) + return ("termsOfServiceUpdate", [("expires", expires as Any), ("termsOfService", termsOfService as Any)]) case .termsOfServiceUpdateEmpty(let expires): - return ("termsOfServiceUpdateEmpty", [("expires", String(describing: expires))]) + return ("termsOfServiceUpdateEmpty", [("expires", expires as Any)]) } } @@ -972,7 +972,7 @@ public extension Api.help { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .userInfo(let message, let entities, let author, let date): - return ("userInfo", [("message", String(describing: message)), ("entities", String(describing: entities)), ("author", String(describing: author)), ("date", String(describing: date))]) + return ("userInfo", [("message", message as Any), ("entities", entities as Any), ("author", author as Any), ("date", date as Any)]) case .userInfoEmpty: return ("userInfoEmpty", []) } @@ -1031,7 +1031,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .affectedFoundMessages(let pts, let ptsCount, let offset, let messages): - return ("affectedFoundMessages", [("pts", String(describing: pts)), ("ptsCount", String(describing: ptsCount)), ("offset", String(describing: offset)), ("messages", String(describing: messages))]) + return ("affectedFoundMessages", [("pts", pts as Any), ("ptsCount", ptsCount as Any), ("offset", offset as Any), ("messages", messages as Any)]) } } @@ -1080,7 +1080,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .affectedHistory(let pts, let ptsCount, let offset): - return ("affectedHistory", [("pts", String(describing: pts)), ("ptsCount", String(describing: ptsCount)), ("offset", String(describing: offset))]) + return ("affectedHistory", [("pts", pts as Any), ("ptsCount", ptsCount as Any), ("offset", offset as Any)]) } } @@ -1123,7 +1123,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .affectedMessages(let pts, let ptsCount): - return ("affectedMessages", [("pts", String(describing: pts)), ("ptsCount", String(describing: ptsCount))]) + return ("affectedMessages", [("pts", pts as Any), ("ptsCount", ptsCount as Any)]) } } @@ -1174,7 +1174,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .allStickers(let hash, let sets): - return ("allStickers", [("hash", String(describing: hash)), ("sets", String(describing: sets))]) + return ("allStickers", [("hash", hash as Any), ("sets", sets as Any)]) case .allStickersNotModified: return ("allStickersNotModified", []) } @@ -1225,7 +1225,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .archivedStickers(let count, let sets): - return ("archivedStickers", [("count", String(describing: count)), ("sets", String(describing: sets))]) + return ("archivedStickers", [("count", count as Any), ("sets", sets as Any)]) } } @@ -1278,7 +1278,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .availableReactions(let hash, let reactions): - return ("availableReactions", [("hash", String(describing: hash)), ("reactions", String(describing: reactions))]) + return ("availableReactions", [("hash", hash as Any), ("reactions", reactions as Any)]) case .availableReactionsNotModified: return ("availableReactionsNotModified", []) } diff --git a/submodules/TelegramApi/Sources/Api25.swift b/submodules/TelegramApi/Sources/Api25.swift index 2be1f04d09..0dde8a5bff 100644 --- a/submodules/TelegramApi/Sources/Api25.swift +++ b/submodules/TelegramApi/Sources/Api25.swift @@ -19,7 +19,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .botCallbackAnswer(let flags, let message, let url, let cacheTime): - return ("botCallbackAnswer", [("flags", String(describing: flags)), ("message", String(describing: message)), ("url", String(describing: url)), ("cacheTime", String(describing: cacheTime))]) + return ("botCallbackAnswer", [("flags", flags as Any), ("message", message as Any), ("url", url as Any), ("cacheTime", cacheTime as Any)]) } } @@ -78,7 +78,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .botResults(let flags, let queryId, let nextOffset, let switchPm, let results, let cacheTime, let users): - return ("botResults", [("flags", String(describing: flags)), ("queryId", String(describing: queryId)), ("nextOffset", String(describing: nextOffset)), ("switchPm", String(describing: switchPm)), ("results", String(describing: results)), ("cacheTime", String(describing: cacheTime)), ("users", String(describing: users))]) + return ("botResults", [("flags", flags as Any), ("queryId", queryId as Any), ("nextOffset", nextOffset as Any), ("switchPm", switchPm as Any), ("results", results as Any), ("cacheTime", cacheTime as Any), ("users", users as Any)]) } } @@ -147,7 +147,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .chatAdminsWithInvites(let admins, let users): - return ("chatAdminsWithInvites", [("admins", String(describing: admins)), ("users", String(describing: users))]) + return ("chatAdminsWithInvites", [("admins", admins as Any), ("users", users as Any)]) } } @@ -200,7 +200,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .chatFull(let fullChat, let chats, let users): - return ("chatFull", [("fullChat", String(describing: fullChat)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("chatFull", [("fullChat", fullChat as Any), ("chats", chats as Any), ("users", users as Any)]) } } @@ -258,7 +258,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .chatInviteImporters(let count, let importers, let users): - return ("chatInviteImporters", [("count", String(describing: count)), ("importers", String(describing: importers)), ("users", String(describing: users))]) + return ("chatInviteImporters", [("count", count as Any), ("importers", importers as Any), ("users", users as Any)]) } } @@ -320,9 +320,9 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .chats(let chats): - return ("chats", [("chats", String(describing: chats))]) + return ("chats", [("chats", chats as Any)]) case .chatsSlice(let count, let chats): - return ("chatsSlice", [("count", String(describing: count)), ("chats", String(describing: chats))]) + return ("chatsSlice", [("count", count as Any), ("chats", chats as Any)]) } } @@ -376,7 +376,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .checkedHistoryImportPeer(let confirmText): - return ("checkedHistoryImportPeer", [("confirmText", String(describing: confirmText))]) + return ("checkedHistoryImportPeer", [("confirmText", confirmText as Any)]) } } @@ -422,9 +422,9 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .dhConfig(let g, let p, let version, let random): - return ("dhConfig", [("g", String(describing: g)), ("p", String(describing: p)), ("version", String(describing: version)), ("random", String(describing: random))]) + return ("dhConfig", [("g", g as Any), ("p", p as Any), ("version", version as Any), ("random", random as Any)]) case .dhConfigNotModified(let random): - return ("dhConfigNotModified", [("random", String(describing: random))]) + return ("dhConfigNotModified", [("random", random as Any)]) } } @@ -533,11 +533,11 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .dialogs(let dialogs, let messages, let chats, let users): - return ("dialogs", [("dialogs", String(describing: dialogs)), ("messages", String(describing: messages)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("dialogs", [("dialogs", dialogs as Any), ("messages", messages as Any), ("chats", chats as Any), ("users", users as Any)]) case .dialogsNotModified(let count): - return ("dialogsNotModified", [("count", String(describing: count))]) + return ("dialogsNotModified", [("count", count as Any)]) case .dialogsSlice(let count, let dialogs, let messages, let chats, let users): - return ("dialogsSlice", [("count", String(describing: count)), ("dialogs", String(describing: dialogs)), ("messages", String(describing: messages)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("dialogsSlice", [("count", count as Any), ("dialogs", dialogs as Any), ("messages", messages as Any), ("chats", chats as Any), ("users", users as Any)]) } } @@ -651,7 +651,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .discussionMessage(let flags, let messages, let maxId, let readInboxMaxId, let readOutboxMaxId, let unreadCount, let chats, let users): - return ("discussionMessage", [("flags", String(describing: flags)), ("messages", String(describing: messages)), ("maxId", String(describing: maxId)), ("readInboxMaxId", String(describing: readInboxMaxId)), ("readOutboxMaxId", String(describing: readOutboxMaxId)), ("unreadCount", String(describing: unreadCount)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("discussionMessage", [("flags", flags as Any), ("messages", messages as Any), ("maxId", maxId as Any), ("readInboxMaxId", readInboxMaxId as Any), ("readOutboxMaxId", readOutboxMaxId as Any), ("unreadCount", unreadCount as Any), ("chats", chats as Any), ("users", users as Any)]) } } @@ -732,9 +732,9 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .exportedChatInvite(let invite, let users): - return ("exportedChatInvite", [("invite", String(describing: invite)), ("users", String(describing: users))]) + return ("exportedChatInvite", [("invite", invite as Any), ("users", users as Any)]) case .exportedChatInviteReplaced(let invite, let newInvite, let users): - return ("exportedChatInviteReplaced", [("invite", String(describing: invite)), ("newInvite", String(describing: newInvite)), ("users", String(describing: users))]) + return ("exportedChatInviteReplaced", [("invite", invite as Any), ("newInvite", newInvite as Any), ("users", users as Any)]) } } @@ -810,7 +810,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .exportedChatInvites(let count, let invites, let users): - return ("exportedChatInvites", [("count", String(describing: count)), ("invites", String(describing: invites)), ("users", String(describing: users))]) + return ("exportedChatInvites", [("count", count as Any), ("invites", invites as Any), ("users", users as Any)]) } } @@ -873,7 +873,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .favedStickers(let hash, let packs, let stickers): - return ("favedStickers", [("hash", String(describing: hash)), ("packs", String(describing: packs)), ("stickers", String(describing: stickers))]) + return ("favedStickers", [("hash", hash as Any), ("packs", packs as Any), ("stickers", stickers as Any)]) case .favedStickersNotModified: return ("favedStickersNotModified", []) } @@ -943,9 +943,9 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .featuredStickers(let flags, let hash, let count, let sets, let unread): - return ("featuredStickers", [("flags", String(describing: flags)), ("hash", String(describing: hash)), ("count", String(describing: count)), ("sets", String(describing: sets)), ("unread", String(describing: unread))]) + return ("featuredStickers", [("flags", flags as Any), ("hash", hash as Any), ("count", count as Any), ("sets", sets as Any), ("unread", unread as Any)]) case .featuredStickersNotModified(let count): - return ("featuredStickersNotModified", [("count", String(describing: count))]) + return ("featuredStickersNotModified", [("count", count as Any)]) } } @@ -1030,7 +1030,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .forumTopics(let flags, let count, let topics, let messages, let chats, let users, let pts): - return ("forumTopics", [("flags", String(describing: flags)), ("count", String(describing: count)), ("topics", String(describing: topics)), ("messages", String(describing: messages)), ("chats", String(describing: chats)), ("users", String(describing: users)), ("pts", String(describing: pts))]) + return ("forumTopics", [("flags", flags as Any), ("count", count as Any), ("topics", topics as Any), ("messages", messages as Any), ("chats", chats as Any), ("users", users as Any), ("pts", pts as Any)]) } } @@ -1104,7 +1104,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .foundStickerSets(let hash, let sets): - return ("foundStickerSets", [("hash", String(describing: hash)), ("sets", String(describing: sets))]) + return ("foundStickerSets", [("hash", hash as Any), ("sets", sets as Any)]) case .foundStickerSetsNotModified: return ("foundStickerSetsNotModified", []) } @@ -1159,7 +1159,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .highScores(let scores, let users): - return ("highScores", [("scores", String(describing: scores)), ("users", String(describing: users))]) + return ("highScores", [("scores", scores as Any), ("users", users as Any)]) } } @@ -1202,7 +1202,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .historyImport(let id): - return ("historyImport", [("id", String(describing: id))]) + return ("historyImport", [("id", id as Any)]) } } @@ -1239,7 +1239,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .historyImportParsed(let flags, let title): - return ("historyImportParsed", [("flags", String(describing: flags)), ("title", String(describing: title))]) + return ("historyImportParsed", [("flags", flags as Any), ("title", title as Any)]) } } @@ -1292,7 +1292,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inactiveChats(let dates, let chats, let users): - return ("inactiveChats", [("dates", String(describing: dates)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("inactiveChats", [("dates", dates as Any), ("chats", chats as Any), ("users", users as Any)]) } } @@ -1340,7 +1340,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .messageEditData(let flags): - return ("messageEditData", [("flags", String(describing: flags))]) + return ("messageEditData", [("flags", flags as Any)]) } } @@ -1393,7 +1393,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .messageReactionsList(let flags, let count, let reactions, let chats, let users, let nextOffset): - return ("messageReactionsList", [("flags", String(describing: flags)), ("count", String(describing: count)), ("reactions", String(describing: reactions)), ("chats", String(describing: chats)), ("users", String(describing: users)), ("nextOffset", String(describing: nextOffset))]) + return ("messageReactionsList", [("flags", flags as Any), ("count", count as Any), ("reactions", reactions as Any), ("chats", chats as Any), ("users", users as Any), ("nextOffset", nextOffset as Any)]) } } @@ -1464,7 +1464,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .messageViews(let views, let chats, let users): - return ("messageViews", [("views", String(describing: views)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("messageViews", [("views", views as Any), ("chats", chats as Any), ("users", users as Any)]) } } @@ -1588,13 +1588,13 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .channelMessages(let flags, let pts, let count, let offsetIdOffset, let messages, let topics, let chats, let users): - return ("channelMessages", [("flags", String(describing: flags)), ("pts", String(describing: pts)), ("count", String(describing: count)), ("offsetIdOffset", String(describing: offsetIdOffset)), ("messages", String(describing: messages)), ("topics", String(describing: topics)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("channelMessages", [("flags", flags as Any), ("pts", pts as Any), ("count", count as Any), ("offsetIdOffset", offsetIdOffset as Any), ("messages", messages as Any), ("topics", topics as Any), ("chats", chats as Any), ("users", users as Any)]) case .messages(let messages, let chats, let users): - return ("messages", [("messages", String(describing: messages)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("messages", [("messages", messages as Any), ("chats", chats as Any), ("users", users as Any)]) case .messagesNotModified(let count): - return ("messagesNotModified", [("count", String(describing: count))]) + return ("messagesNotModified", [("count", count as Any)]) case .messagesSlice(let flags, let count, let nextRate, let offsetIdOffset, let messages, let chats, let users): - return ("messagesSlice", [("flags", String(describing: flags)), ("count", String(describing: count)), ("nextRate", String(describing: nextRate)), ("offsetIdOffset", String(describing: offsetIdOffset)), ("messages", String(describing: messages)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("messagesSlice", [("flags", flags as Any), ("count", count as Any), ("nextRate", nextRate as Any), ("offsetIdOffset", offsetIdOffset as Any), ("messages", messages as Any), ("chats", chats as Any), ("users", users as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api26.swift b/submodules/TelegramApi/Sources/Api26.swift index 13950c1d1b..04a7bd362c 100644 --- a/submodules/TelegramApi/Sources/Api26.swift +++ b/submodules/TelegramApi/Sources/Api26.swift @@ -36,7 +36,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .peerDialogs(let dialogs, let messages, let chats, let users, let state): - return ("peerDialogs", [("dialogs", String(describing: dialogs)), ("messages", String(describing: messages)), ("chats", String(describing: chats)), ("users", String(describing: users)), ("state", String(describing: state))]) + return ("peerDialogs", [("dialogs", dialogs as Any), ("messages", messages as Any), ("chats", chats as Any), ("users", users as Any), ("state", state as Any)]) } } @@ -104,7 +104,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .peerSettings(let settings, let chats, let users): - return ("peerSettings", [("settings", String(describing: settings)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("peerSettings", [("settings", settings as Any), ("chats", chats as Any), ("users", users as Any)]) } } @@ -164,7 +164,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .reactions(let hash, let reactions): - return ("reactions", [("hash", String(describing: hash)), ("reactions", String(describing: reactions))]) + return ("reactions", [("hash", hash as Any), ("reactions", reactions as Any)]) case .reactionsNotModified: return ("reactionsNotModified", []) } @@ -232,7 +232,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .recentStickers(let hash, let packs, let stickers, let dates): - return ("recentStickers", [("hash", String(describing: hash)), ("packs", String(describing: packs)), ("stickers", String(describing: stickers)), ("dates", String(describing: dates))]) + return ("recentStickers", [("hash", hash as Any), ("packs", packs as Any), ("stickers", stickers as Any), ("dates", dates as Any)]) case .recentStickersNotModified: return ("recentStickersNotModified", []) } @@ -300,7 +300,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .savedGifs(let hash, let gifs): - return ("savedGifs", [("hash", String(describing: hash)), ("gifs", String(describing: gifs))]) + return ("savedGifs", [("hash", hash as Any), ("gifs", gifs as Any)]) case .savedGifsNotModified: return ("savedGifsNotModified", []) } @@ -348,7 +348,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .searchCounter(let flags, let filter, let count): - return ("searchCounter", [("flags", String(describing: flags)), ("filter", String(describing: filter)), ("count", String(describing: count))]) + return ("searchCounter", [("flags", flags as Any), ("filter", filter as Any), ("count", count as Any)]) } } @@ -416,7 +416,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .searchResultsCalendar(let flags, let count, let minDate, let minMsgId, let offsetIdOffset, let periods, let messages, let chats, let users): - return ("searchResultsCalendar", [("flags", String(describing: flags)), ("count", String(describing: count)), ("minDate", String(describing: minDate)), ("minMsgId", String(describing: minMsgId)), ("offsetIdOffset", String(describing: offsetIdOffset)), ("periods", String(describing: periods)), ("messages", String(describing: messages)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("searchResultsCalendar", [("flags", flags as Any), ("count", count as Any), ("minDate", minDate as Any), ("minMsgId", minMsgId as Any), ("offsetIdOffset", offsetIdOffset as Any), ("periods", periods as Any), ("messages", messages as Any), ("chats", chats as Any), ("users", users as Any)]) } } @@ -489,7 +489,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .searchResultsPositions(let count, let positions): - return ("searchResultsPositions", [("count", String(describing: count)), ("positions", String(describing: positions))]) + return ("searchResultsPositions", [("count", count as Any), ("positions", positions as Any)]) } } @@ -538,9 +538,9 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .sentEncryptedFile(let date, let file): - return ("sentEncryptedFile", [("date", String(describing: date)), ("file", String(describing: file))]) + return ("sentEncryptedFile", [("date", date as Any), ("file", file as Any)]) case .sentEncryptedMessage(let date): - return ("sentEncryptedMessage", [("date", String(describing: date))]) + return ("sentEncryptedMessage", [("date", date as Any)]) } } @@ -615,7 +615,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .sponsoredMessages(let flags, let postsBetween, let messages, let chats, let users): - return ("sponsoredMessages", [("flags", String(describing: flags)), ("postsBetween", String(describing: postsBetween)), ("messages", String(describing: messages)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("sponsoredMessages", [("flags", flags as Any), ("postsBetween", postsBetween as Any), ("messages", messages as Any), ("chats", chats as Any), ("users", users as Any)]) case .sponsoredMessagesEmpty: return ("sponsoredMessagesEmpty", []) } @@ -696,7 +696,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .stickerSet(let set, let packs, let keywords, let documents): - return ("stickerSet", [("set", String(describing: set)), ("packs", String(describing: packs)), ("keywords", String(describing: keywords)), ("documents", String(describing: documents))]) + return ("stickerSet", [("set", set as Any), ("packs", packs as Any), ("keywords", keywords as Any), ("documents", documents as Any)]) case .stickerSetNotModified: return ("stickerSetNotModified", []) } @@ -765,7 +765,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .stickerSetInstallResultArchive(let sets): - return ("stickerSetInstallResultArchive", [("sets", String(describing: sets))]) + return ("stickerSetInstallResultArchive", [("sets", sets as Any)]) case .stickerSetInstallResultSuccess: return ("stickerSetInstallResultSuccess", []) } @@ -820,7 +820,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .stickers(let hash, let stickers): - return ("stickers", [("hash", String(describing: hash)), ("stickers", String(describing: stickers))]) + return ("stickers", [("hash", hash as Any), ("stickers", stickers as Any)]) case .stickersNotModified: return ("stickersNotModified", []) } @@ -868,7 +868,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .transcribedAudio(let flags, let transcriptionId, let text): - return ("transcribedAudio", [("flags", String(describing: flags)), ("transcriptionId", String(describing: transcriptionId)), ("text", String(describing: text))]) + return ("transcribedAudio", [("flags", flags as Any), ("transcriptionId", transcriptionId as Any), ("text", text as Any)]) } } @@ -919,7 +919,7 @@ public extension Api.messages { case .translateNoResult: return ("translateNoResult", []) case .translateResultText(let text): - return ("translateResultText", [("text", String(describing: text))]) + return ("translateResultText", [("text", text as Any)]) } } @@ -970,7 +970,7 @@ public extension Api.messages { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .votesList(let flags, let count, let votes, let users, let nextOffset): - return ("votesList", [("flags", String(describing: flags)), ("count", String(describing: count)), ("votes", String(describing: votes)), ("users", String(describing: users)), ("nextOffset", String(describing: nextOffset))]) + return ("votesList", [("flags", flags as Any), ("count", count as Any), ("votes", votes as Any), ("users", users as Any), ("nextOffset", nextOffset as Any)]) } } @@ -1027,7 +1027,7 @@ public extension Api.payments { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .bankCardData(let title, let openUrls): - return ("bankCardData", [("title", String(describing: title)), ("openUrls", String(describing: openUrls))]) + return ("bankCardData", [("title", title as Any), ("openUrls", openUrls as Any)]) } } @@ -1068,7 +1068,7 @@ public extension Api.payments { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .exportedInvoice(let url): - return ("exportedInvoice", [("url", String(describing: url))]) + return ("exportedInvoice", [("url", url as Any)]) } } @@ -1130,7 +1130,7 @@ public extension Api.payments { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .paymentForm(let flags, let formId, let botId, let title, let description, let photo, let invoice, let providerId, let url, let nativeProvider, let nativeParams, let additionalMethods, let savedInfo, let savedCredentials, let users): - return ("paymentForm", [("flags", String(describing: flags)), ("formId", String(describing: formId)), ("botId", String(describing: botId)), ("title", String(describing: title)), ("description", String(describing: description)), ("photo", String(describing: photo)), ("invoice", String(describing: invoice)), ("providerId", String(describing: providerId)), ("url", String(describing: url)), ("nativeProvider", String(describing: nativeProvider)), ("nativeParams", String(describing: nativeParams)), ("additionalMethods", String(describing: additionalMethods)), ("savedInfo", String(describing: savedInfo)), ("savedCredentials", String(describing: savedCredentials)), ("users", String(describing: users))]) + return ("paymentForm", [("flags", flags as Any), ("formId", formId as Any), ("botId", botId as Any), ("title", title as Any), ("description", description as Any), ("photo", photo as Any), ("invoice", invoice as Any), ("providerId", providerId as Any), ("url", url as Any), ("nativeProvider", nativeProvider as Any), ("nativeParams", nativeParams as Any), ("additionalMethods", additionalMethods as Any), ("savedInfo", savedInfo as Any), ("savedCredentials", savedCredentials as Any), ("users", users as Any)]) } } @@ -1240,7 +1240,7 @@ public extension Api.payments { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .paymentReceipt(let flags, let date, let botId, let providerId, let title, let description, let photo, let invoice, let info, let shipping, let tipAmount, let currency, let totalAmount, let credentialsTitle, let users): - return ("paymentReceipt", [("flags", String(describing: flags)), ("date", String(describing: date)), ("botId", String(describing: botId)), ("providerId", String(describing: providerId)), ("title", String(describing: title)), ("description", String(describing: description)), ("photo", String(describing: photo)), ("invoice", String(describing: invoice)), ("info", String(describing: info)), ("shipping", String(describing: shipping)), ("tipAmount", String(describing: tipAmount)), ("currency", String(describing: currency)), ("totalAmount", String(describing: totalAmount)), ("credentialsTitle", String(describing: credentialsTitle)), ("users", String(describing: users))]) + return ("paymentReceipt", [("flags", flags as Any), ("date", date as Any), ("botId", botId as Any), ("providerId", providerId as Any), ("title", title as Any), ("description", description as Any), ("photo", photo as Any), ("invoice", invoice as Any), ("info", info as Any), ("shipping", shipping as Any), ("tipAmount", tipAmount as Any), ("currency", currency as Any), ("totalAmount", totalAmount as Any), ("credentialsTitle", credentialsTitle as Any), ("users", users as Any)]) } } @@ -1335,9 +1335,9 @@ public extension Api.payments { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .paymentResult(let updates): - return ("paymentResult", [("updates", String(describing: updates))]) + return ("paymentResult", [("updates", updates as Any)]) case .paymentVerificationNeeded(let url): - return ("paymentVerificationNeeded", [("url", String(describing: url))]) + return ("paymentVerificationNeeded", [("url", url as Any)]) } } @@ -1387,7 +1387,7 @@ public extension Api.payments { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .savedInfo(let flags, let savedInfo): - return ("savedInfo", [("flags", String(describing: flags)), ("savedInfo", String(describing: savedInfo))]) + return ("savedInfo", [("flags", flags as Any), ("savedInfo", savedInfo as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api27.swift b/submodules/TelegramApi/Sources/Api27.swift index f01e761167..f6509a4c29 100644 --- a/submodules/TelegramApi/Sources/Api27.swift +++ b/submodules/TelegramApi/Sources/Api27.swift @@ -22,7 +22,7 @@ public extension Api.payments { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .validatedRequestedInfo(let flags, let id, let shippingOptions): - return ("validatedRequestedInfo", [("flags", String(describing: flags)), ("id", String(describing: id)), ("shippingOptions", String(describing: shippingOptions))]) + return ("validatedRequestedInfo", [("flags", flags as Any), ("id", id as Any), ("shippingOptions", shippingOptions as Any)]) } } @@ -66,7 +66,7 @@ public extension Api.phone { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .exportedGroupCallInvite(let link): - return ("exportedGroupCallInvite", [("link", String(describing: link))]) + return ("exportedGroupCallInvite", [("link", link as Any)]) } } @@ -118,7 +118,7 @@ public extension Api.phone { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .groupCall(let call, let participants, let participantsNextOffset, let chats, let users): - return ("groupCall", [("call", String(describing: call)), ("participants", String(describing: participants)), ("participantsNextOffset", String(describing: participantsNextOffset)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("groupCall", [("call", call as Any), ("participants", participants as Any), ("participantsNextOffset", participantsNextOffset as Any), ("chats", chats as Any), ("users", users as Any)]) } } @@ -178,7 +178,7 @@ public extension Api.phone { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .groupCallStreamChannels(let channels): - return ("groupCallStreamChannels", [("channels", String(describing: channels))]) + return ("groupCallStreamChannels", [("channels", channels as Any)]) } } @@ -217,7 +217,7 @@ public extension Api.phone { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .groupCallStreamRtmpUrl(let url, let key): - return ("groupCallStreamRtmpUrl", [("url", String(describing: url)), ("key", String(describing: key))]) + return ("groupCallStreamRtmpUrl", [("url", url as Any), ("key", key as Any)]) } } @@ -273,7 +273,7 @@ public extension Api.phone { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .groupParticipants(let count, let participants, let nextOffset, let chats, let users, let version): - return ("groupParticipants", [("count", String(describing: count)), ("participants", String(describing: participants)), ("nextOffset", String(describing: nextOffset)), ("chats", String(describing: chats)), ("users", String(describing: users)), ("version", String(describing: version))]) + return ("groupParticipants", [("count", count as Any), ("participants", participants as Any), ("nextOffset", nextOffset as Any), ("chats", chats as Any), ("users", users as Any), ("version", version as Any)]) } } @@ -344,7 +344,7 @@ public extension Api.phone { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .joinAsPeers(let peers, let chats, let users): - return ("joinAsPeers", [("peers", String(describing: peers)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("joinAsPeers", [("peers", peers as Any), ("chats", chats as Any), ("users", users as Any)]) } } @@ -397,7 +397,7 @@ public extension Api.phone { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .phoneCall(let phoneCall, let users): - return ("phoneCall", [("phoneCall", String(describing: phoneCall)), ("users", String(describing: users))]) + return ("phoneCall", [("phoneCall", phoneCall as Any), ("users", users as Any)]) } } @@ -445,7 +445,7 @@ public extension Api.photos { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .photo(let photo, let users): - return ("photo", [("photo", String(describing: photo)), ("users", String(describing: users))]) + return ("photo", [("photo", photo as Any), ("users", users as Any)]) } } @@ -514,9 +514,9 @@ public extension Api.photos { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .photos(let photos, let users): - return ("photos", [("photos", String(describing: photos)), ("users", String(describing: users))]) + return ("photos", [("photos", photos as Any), ("users", users as Any)]) case .photosSlice(let count, let photos, let users): - return ("photosSlice", [("count", String(describing: count)), ("photos", String(describing: photos)), ("users", String(describing: users))]) + return ("photosSlice", [("count", count as Any), ("photos", photos as Any), ("users", users as Any)]) } } @@ -598,7 +598,7 @@ public extension Api.stats { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .broadcastStats(let period, let followers, let viewsPerPost, let sharesPerPost, let enabledNotifications, let growthGraph, let followersGraph, let muteGraph, let topHoursGraph, let interactionsGraph, let ivInteractionsGraph, let viewsBySourceGraph, let newFollowersBySourceGraph, let languagesGraph, let recentMessageInteractions): - return ("broadcastStats", [("period", String(describing: period)), ("followers", String(describing: followers)), ("viewsPerPost", String(describing: viewsPerPost)), ("sharesPerPost", String(describing: sharesPerPost)), ("enabledNotifications", String(describing: enabledNotifications)), ("growthGraph", String(describing: growthGraph)), ("followersGraph", String(describing: followersGraph)), ("muteGraph", String(describing: muteGraph)), ("topHoursGraph", String(describing: topHoursGraph)), ("interactionsGraph", String(describing: interactionsGraph)), ("ivInteractionsGraph", String(describing: ivInteractionsGraph)), ("viewsBySourceGraph", String(describing: viewsBySourceGraph)), ("newFollowersBySourceGraph", String(describing: newFollowersBySourceGraph)), ("languagesGraph", String(describing: languagesGraph)), ("recentMessageInteractions", String(describing: recentMessageInteractions))]) + return ("broadcastStats", [("period", period as Any), ("followers", followers as Any), ("viewsPerPost", viewsPerPost as Any), ("sharesPerPost", sharesPerPost as Any), ("enabledNotifications", enabledNotifications as Any), ("growthGraph", growthGraph as Any), ("followersGraph", followersGraph as Any), ("muteGraph", muteGraph as Any), ("topHoursGraph", topHoursGraph as Any), ("interactionsGraph", interactionsGraph as Any), ("ivInteractionsGraph", ivInteractionsGraph as Any), ("viewsBySourceGraph", viewsBySourceGraph as Any), ("newFollowersBySourceGraph", newFollowersBySourceGraph as Any), ("languagesGraph", languagesGraph as Any), ("recentMessageInteractions", recentMessageInteractions as Any)]) } } @@ -738,7 +738,7 @@ public extension Api.stats { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .megagroupStats(let period, let members, let messages, let viewers, let posters, let growthGraph, let membersGraph, let newMembersBySourceGraph, let languagesGraph, let messagesGraph, let actionsGraph, let topHoursGraph, let weekdaysGraph, let topPosters, let topAdmins, let topInviters, let users): - return ("megagroupStats", [("period", String(describing: period)), ("members", String(describing: members)), ("messages", String(describing: messages)), ("viewers", String(describing: viewers)), ("posters", String(describing: posters)), ("growthGraph", String(describing: growthGraph)), ("membersGraph", String(describing: membersGraph)), ("newMembersBySourceGraph", String(describing: newMembersBySourceGraph)), ("languagesGraph", String(describing: languagesGraph)), ("messagesGraph", String(describing: messagesGraph)), ("actionsGraph", String(describing: actionsGraph)), ("topHoursGraph", String(describing: topHoursGraph)), ("weekdaysGraph", String(describing: weekdaysGraph)), ("topPosters", String(describing: topPosters)), ("topAdmins", String(describing: topAdmins)), ("topInviters", String(describing: topInviters)), ("users", String(describing: users))]) + return ("megagroupStats", [("period", period as Any), ("members", members as Any), ("messages", messages as Any), ("viewers", viewers as Any), ("posters", posters as Any), ("growthGraph", growthGraph as Any), ("membersGraph", membersGraph as Any), ("newMembersBySourceGraph", newMembersBySourceGraph as Any), ("languagesGraph", languagesGraph as Any), ("messagesGraph", messagesGraph as Any), ("actionsGraph", actionsGraph as Any), ("topHoursGraph", topHoursGraph as Any), ("weekdaysGraph", weekdaysGraph as Any), ("topPosters", topPosters as Any), ("topAdmins", topAdmins as Any), ("topInviters", topInviters as Any), ("users", users as Any)]) } } @@ -856,7 +856,7 @@ public extension Api.stats { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .messageStats(let viewsGraph): - return ("messageStats", [("viewsGraph", String(describing: viewsGraph))]) + return ("messageStats", [("viewsGraph", viewsGraph as Any)]) } } @@ -894,7 +894,7 @@ public extension Api.stickers { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .suggestedShortName(let shortName): - return ("suggestedShortName", [("shortName", String(describing: shortName))]) + return ("suggestedShortName", [("shortName", shortName as Any)]) } } @@ -1121,11 +1121,11 @@ public extension Api.updates { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .channelDifference(let flags, let pts, let timeout, let newMessages, let otherUpdates, let chats, let users): - return ("channelDifference", [("flags", String(describing: flags)), ("pts", String(describing: pts)), ("timeout", String(describing: timeout)), ("newMessages", String(describing: newMessages)), ("otherUpdates", String(describing: otherUpdates)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("channelDifference", [("flags", flags as Any), ("pts", pts as Any), ("timeout", timeout as Any), ("newMessages", newMessages as Any), ("otherUpdates", otherUpdates as Any), ("chats", chats as Any), ("users", users as Any)]) case .channelDifferenceEmpty(let flags, let pts, let timeout): - return ("channelDifferenceEmpty", [("flags", String(describing: flags)), ("pts", String(describing: pts)), ("timeout", String(describing: timeout))]) + return ("channelDifferenceEmpty", [("flags", flags as Any), ("pts", pts as Any), ("timeout", timeout as Any)]) case .channelDifferenceTooLong(let flags, let timeout, let dialog, let messages, let chats, let users): - return ("channelDifferenceTooLong", [("flags", String(describing: flags)), ("timeout", String(describing: timeout)), ("dialog", String(describing: dialog)), ("messages", String(describing: messages)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("channelDifferenceTooLong", [("flags", flags as Any), ("timeout", timeout as Any), ("dialog", dialog as Any), ("messages", messages as Any), ("chats", chats as Any), ("users", users as Any)]) } } @@ -1310,13 +1310,13 @@ public extension Api.updates { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .difference(let newMessages, let newEncryptedMessages, let otherUpdates, let chats, let users, let state): - return ("difference", [("newMessages", String(describing: newMessages)), ("newEncryptedMessages", String(describing: newEncryptedMessages)), ("otherUpdates", String(describing: otherUpdates)), ("chats", String(describing: chats)), ("users", String(describing: users)), ("state", String(describing: state))]) + return ("difference", [("newMessages", newMessages as Any), ("newEncryptedMessages", newEncryptedMessages as Any), ("otherUpdates", otherUpdates as Any), ("chats", chats as Any), ("users", users as Any), ("state", state as Any)]) case .differenceEmpty(let date, let seq): - return ("differenceEmpty", [("date", String(describing: date)), ("seq", String(describing: seq))]) + return ("differenceEmpty", [("date", date as Any), ("seq", seq as Any)]) case .differenceSlice(let newMessages, let newEncryptedMessages, let otherUpdates, let chats, let users, let intermediateState): - return ("differenceSlice", [("newMessages", String(describing: newMessages)), ("newEncryptedMessages", String(describing: newEncryptedMessages)), ("otherUpdates", String(describing: otherUpdates)), ("chats", String(describing: chats)), ("users", String(describing: users)), ("intermediateState", String(describing: intermediateState))]) + return ("differenceSlice", [("newMessages", newMessages as Any), ("newEncryptedMessages", newEncryptedMessages as Any), ("otherUpdates", otherUpdates as Any), ("chats", chats as Any), ("users", users as Any), ("intermediateState", intermediateState as Any)]) case .differenceTooLong(let pts): - return ("differenceTooLong", [("pts", String(describing: pts))]) + return ("differenceTooLong", [("pts", pts as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api28.swift b/submodules/TelegramApi/Sources/Api28.swift index f82d172400..a2670b0450 100644 --- a/submodules/TelegramApi/Sources/Api28.swift +++ b/submodules/TelegramApi/Sources/Api28.swift @@ -20,7 +20,7 @@ public extension Api.updates { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .state(let pts, let qts, let date, let seq, let unreadCount): - return ("state", [("pts", String(describing: pts)), ("qts", String(describing: qts)), ("date", String(describing: date)), ("seq", String(describing: seq)), ("unreadCount", String(describing: unreadCount))]) + return ("state", [("pts", pts as Any), ("qts", qts as Any), ("date", date as Any), ("seq", seq as Any), ("unreadCount", unreadCount as Any)]) } } @@ -75,9 +75,9 @@ public extension Api.upload { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .cdnFile(let bytes): - return ("cdnFile", [("bytes", String(describing: bytes))]) + return ("cdnFile", [("bytes", bytes as Any)]) case .cdnFileReuploadNeeded(let requestToken): - return ("cdnFileReuploadNeeded", [("requestToken", String(describing: requestToken))]) + return ("cdnFileReuploadNeeded", [("requestToken", requestToken as Any)]) } } @@ -141,9 +141,9 @@ public extension Api.upload { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .file(let type, let mtime, let bytes): - return ("file", [("type", String(describing: type)), ("mtime", String(describing: mtime)), ("bytes", String(describing: bytes))]) + return ("file", [("type", type as Any), ("mtime", mtime as Any), ("bytes", bytes as Any)]) case .fileCdnRedirect(let dcId, let fileToken, let encryptionKey, let encryptionIv, let fileHashes): - return ("fileCdnRedirect", [("dcId", String(describing: dcId)), ("fileToken", String(describing: fileToken)), ("encryptionKey", String(describing: encryptionKey)), ("encryptionIv", String(describing: encryptionIv)), ("fileHashes", String(describing: fileHashes))]) + return ("fileCdnRedirect", [("dcId", dcId as Any), ("fileToken", fileToken as Any), ("encryptionKey", encryptionKey as Any), ("encryptionIv", encryptionIv as Any), ("fileHashes", fileHashes as Any)]) } } @@ -216,7 +216,7 @@ public extension Api.upload { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .webFile(let size, let mimeType, let fileType, let mtime, let bytes): - return ("webFile", [("size", String(describing: size)), ("mimeType", String(describing: mimeType)), ("fileType", String(describing: fileType)), ("mtime", String(describing: mtime)), ("bytes", String(describing: bytes))]) + return ("webFile", [("size", size as Any), ("mimeType", mimeType as Any), ("fileType", fileType as Any), ("mtime", mtime as Any), ("bytes", bytes as Any)]) } } @@ -276,7 +276,7 @@ public extension Api.users { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .userFull(let fullUser, let chats, let users): - return ("userFull", [("fullUser", String(describing: fullUser)), ("chats", String(describing: chats)), ("users", String(describing: users))]) + return ("userFull", [("fullUser", fullUser as Any), ("chats", chats as Any), ("users", users as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api3.swift b/submodules/TelegramApi/Sources/Api3.swift index 0c497a877f..6635c7318d 100644 --- a/submodules/TelegramApi/Sources/Api3.swift +++ b/submodules/TelegramApi/Sources/Api3.swift @@ -16,7 +16,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .channelAdminLogEventsFilter(let flags): - return ("channelAdminLogEventsFilter", [("flags", String(describing: flags))]) + return ("channelAdminLogEventsFilter", [("flags", flags as Any)]) } } @@ -60,7 +60,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .channelLocation(let geoPoint, let address): - return ("channelLocation", [("geoPoint", String(describing: geoPoint)), ("address", String(describing: address))]) + return ("channelLocation", [("geoPoint", geoPoint as Any), ("address", address as Any)]) case .channelLocationEmpty: return ("channelLocationEmpty", []) } @@ -118,7 +118,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .channelMessagesFilter(let flags, let ranges): - return ("channelMessagesFilter", [("flags", String(describing: flags)), ("ranges", String(describing: ranges))]) + return ("channelMessagesFilter", [("flags", flags as Any), ("ranges", ranges as Any)]) case .channelMessagesFilterEmpty: return ("channelMessagesFilterEmpty", []) } @@ -216,17 +216,17 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .channelParticipant(let userId, let date): - return ("channelParticipant", [("userId", String(describing: userId)), ("date", String(describing: date))]) + return ("channelParticipant", [("userId", userId as Any), ("date", date as Any)]) case .channelParticipantAdmin(let flags, let userId, let inviterId, let promotedBy, let date, let adminRights, let rank): - return ("channelParticipantAdmin", [("flags", String(describing: flags)), ("userId", String(describing: userId)), ("inviterId", String(describing: inviterId)), ("promotedBy", String(describing: promotedBy)), ("date", String(describing: date)), ("adminRights", String(describing: adminRights)), ("rank", String(describing: rank))]) + return ("channelParticipantAdmin", [("flags", flags as Any), ("userId", userId as Any), ("inviterId", inviterId as Any), ("promotedBy", promotedBy as Any), ("date", date as Any), ("adminRights", adminRights as Any), ("rank", rank as Any)]) case .channelParticipantBanned(let flags, let peer, let kickedBy, let date, let bannedRights): - return ("channelParticipantBanned", [("flags", String(describing: flags)), ("peer", String(describing: peer)), ("kickedBy", String(describing: kickedBy)), ("date", String(describing: date)), ("bannedRights", String(describing: bannedRights))]) + return ("channelParticipantBanned", [("flags", flags as Any), ("peer", peer as Any), ("kickedBy", kickedBy as Any), ("date", date as Any), ("bannedRights", bannedRights as Any)]) case .channelParticipantCreator(let flags, let userId, let adminRights, let rank): - return ("channelParticipantCreator", [("flags", String(describing: flags)), ("userId", String(describing: userId)), ("adminRights", String(describing: adminRights)), ("rank", String(describing: rank))]) + return ("channelParticipantCreator", [("flags", flags as Any), ("userId", userId as Any), ("adminRights", adminRights as Any), ("rank", rank as Any)]) case .channelParticipantLeft(let peer): - return ("channelParticipantLeft", [("peer", String(describing: peer))]) + return ("channelParticipantLeft", [("peer", peer as Any)]) case .channelParticipantSelf(let flags, let userId, let inviterId, let date): - return ("channelParticipantSelf", [("flags", String(describing: flags)), ("userId", String(describing: userId)), ("inviterId", String(describing: inviterId)), ("date", String(describing: date))]) + return ("channelParticipantSelf", [("flags", flags as Any), ("userId", userId as Any), ("inviterId", inviterId as Any), ("date", date as Any)]) } } @@ -431,19 +431,19 @@ public extension Api { case .channelParticipantsAdmins: return ("channelParticipantsAdmins", []) case .channelParticipantsBanned(let q): - return ("channelParticipantsBanned", [("q", String(describing: q))]) + return ("channelParticipantsBanned", [("q", q as Any)]) case .channelParticipantsBots: return ("channelParticipantsBots", []) case .channelParticipantsContacts(let q): - return ("channelParticipantsContacts", [("q", String(describing: q))]) + return ("channelParticipantsContacts", [("q", q as Any)]) case .channelParticipantsKicked(let q): - return ("channelParticipantsKicked", [("q", String(describing: q))]) + return ("channelParticipantsKicked", [("q", q as Any)]) case .channelParticipantsMentions(let flags, let q, let topMsgId): - return ("channelParticipantsMentions", [("flags", String(describing: flags)), ("q", String(describing: q)), ("topMsgId", String(describing: topMsgId))]) + return ("channelParticipantsMentions", [("flags", flags as Any), ("q", q as Any), ("topMsgId", topMsgId as Any)]) case .channelParticipantsRecent: return ("channelParticipantsRecent", []) case .channelParticipantsSearch(let q): - return ("channelParticipantsSearch", [("q", String(describing: q))]) + return ("channelParticipantsSearch", [("q", q as Any)]) } } @@ -601,15 +601,15 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .channel(let flags, let flags2, let id, let accessHash, let title, let username, let photo, let date, let restrictionReason, let adminRights, let bannedRights, let defaultBannedRights, let participantsCount, let usernames): - return ("channel", [("flags", String(describing: flags)), ("flags2", String(describing: flags2)), ("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("title", String(describing: title)), ("username", String(describing: username)), ("photo", String(describing: photo)), ("date", String(describing: date)), ("restrictionReason", String(describing: restrictionReason)), ("adminRights", String(describing: adminRights)), ("bannedRights", String(describing: bannedRights)), ("defaultBannedRights", String(describing: defaultBannedRights)), ("participantsCount", String(describing: participantsCount)), ("usernames", String(describing: usernames))]) + return ("channel", [("flags", flags as Any), ("flags2", flags2 as Any), ("id", id as Any), ("accessHash", accessHash as Any), ("title", title as Any), ("username", username as Any), ("photo", photo as Any), ("date", date as Any), ("restrictionReason", restrictionReason as Any), ("adminRights", adminRights as Any), ("bannedRights", bannedRights as Any), ("defaultBannedRights", defaultBannedRights as Any), ("participantsCount", participantsCount as Any), ("usernames", usernames as Any)]) case .channelForbidden(let flags, let id, let accessHash, let title, let untilDate): - return ("channelForbidden", [("flags", String(describing: flags)), ("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("title", String(describing: title)), ("untilDate", String(describing: untilDate))]) + return ("channelForbidden", [("flags", flags as Any), ("id", id as Any), ("accessHash", accessHash as Any), ("title", title as Any), ("untilDate", untilDate as Any)]) case .chat(let flags, let id, let title, let photo, let participantsCount, let date, let version, let migratedTo, let adminRights, let defaultBannedRights): - return ("chat", [("flags", String(describing: flags)), ("id", String(describing: id)), ("title", String(describing: title)), ("photo", String(describing: photo)), ("participantsCount", String(describing: participantsCount)), ("date", String(describing: date)), ("version", String(describing: version)), ("migratedTo", String(describing: migratedTo)), ("adminRights", String(describing: adminRights)), ("defaultBannedRights", String(describing: defaultBannedRights))]) + return ("chat", [("flags", flags as Any), ("id", id as Any), ("title", title as Any), ("photo", photo as Any), ("participantsCount", participantsCount as Any), ("date", date as Any), ("version", version as Any), ("migratedTo", migratedTo as Any), ("adminRights", adminRights as Any), ("defaultBannedRights", defaultBannedRights as Any)]) case .chatEmpty(let id): - return ("chatEmpty", [("id", String(describing: id))]) + return ("chatEmpty", [("id", id as Any)]) case .chatForbidden(let id, let title): - return ("chatForbidden", [("id", String(describing: id)), ("title", String(describing: title))]) + return ("chatForbidden", [("id", id as Any), ("title", title as Any)]) } } @@ -790,7 +790,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .chatAdminRights(let flags): - return ("chatAdminRights", [("flags", String(describing: flags))]) + return ("chatAdminRights", [("flags", flags as Any)]) } } @@ -828,7 +828,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .chatAdminWithInvites(let adminId, let invitesCount, let revokedInvitesCount): - return ("chatAdminWithInvites", [("adminId", String(describing: adminId)), ("invitesCount", String(describing: invitesCount)), ("revokedInvitesCount", String(describing: revokedInvitesCount))]) + return ("chatAdminWithInvites", [("adminId", adminId as Any), ("invitesCount", invitesCount as Any), ("revokedInvitesCount", revokedInvitesCount as Any)]) } } @@ -871,7 +871,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .chatBannedRights(let flags, let untilDate): - return ("chatBannedRights", [("flags", String(describing: flags)), ("untilDate", String(describing: untilDate))]) + return ("chatBannedRights", [("flags", flags as Any), ("untilDate", untilDate as Any)]) } } @@ -989,9 +989,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .channelFull(let flags, let flags2, let id, let about, let participantsCount, let adminsCount, let kickedCount, let bannedCount, let onlineCount, let readInboxMaxId, let readOutboxMaxId, let unreadCount, let chatPhoto, let notifySettings, let exportedInvite, let botInfo, let migratedFromChatId, let migratedFromMaxId, let pinnedMsgId, let stickerset, let availableMinId, let folderId, let linkedChatId, let location, let slowmodeSeconds, let slowmodeNextSendDate, let statsDc, let pts, let call, let ttlPeriod, let pendingSuggestions, let groupcallDefaultJoinAs, let themeEmoticon, let requestsPending, let recentRequesters, let defaultSendAs, let availableReactions): - return ("channelFull", [("flags", String(describing: flags)), ("flags2", String(describing: flags2)), ("id", String(describing: id)), ("about", String(describing: about)), ("participantsCount", String(describing: participantsCount)), ("adminsCount", String(describing: adminsCount)), ("kickedCount", String(describing: kickedCount)), ("bannedCount", String(describing: bannedCount)), ("onlineCount", String(describing: onlineCount)), ("readInboxMaxId", String(describing: readInboxMaxId)), ("readOutboxMaxId", String(describing: readOutboxMaxId)), ("unreadCount", String(describing: unreadCount)), ("chatPhoto", String(describing: chatPhoto)), ("notifySettings", String(describing: notifySettings)), ("exportedInvite", String(describing: exportedInvite)), ("botInfo", String(describing: botInfo)), ("migratedFromChatId", String(describing: migratedFromChatId)), ("migratedFromMaxId", String(describing: migratedFromMaxId)), ("pinnedMsgId", String(describing: pinnedMsgId)), ("stickerset", String(describing: stickerset)), ("availableMinId", String(describing: availableMinId)), ("folderId", String(describing: folderId)), ("linkedChatId", String(describing: linkedChatId)), ("location", String(describing: location)), ("slowmodeSeconds", String(describing: slowmodeSeconds)), ("slowmodeNextSendDate", String(describing: slowmodeNextSendDate)), ("statsDc", String(describing: statsDc)), ("pts", String(describing: pts)), ("call", String(describing: call)), ("ttlPeriod", String(describing: ttlPeriod)), ("pendingSuggestions", String(describing: pendingSuggestions)), ("groupcallDefaultJoinAs", String(describing: groupcallDefaultJoinAs)), ("themeEmoticon", String(describing: themeEmoticon)), ("requestsPending", String(describing: requestsPending)), ("recentRequesters", String(describing: recentRequesters)), ("defaultSendAs", String(describing: defaultSendAs)), ("availableReactions", String(describing: availableReactions))]) + return ("channelFull", [("flags", flags as Any), ("flags2", flags2 as Any), ("id", id as Any), ("about", about as Any), ("participantsCount", participantsCount as Any), ("adminsCount", adminsCount as Any), ("kickedCount", kickedCount as Any), ("bannedCount", bannedCount as Any), ("onlineCount", onlineCount as Any), ("readInboxMaxId", readInboxMaxId as Any), ("readOutboxMaxId", readOutboxMaxId as Any), ("unreadCount", unreadCount as Any), ("chatPhoto", chatPhoto as Any), ("notifySettings", notifySettings as Any), ("exportedInvite", exportedInvite as Any), ("botInfo", botInfo as Any), ("migratedFromChatId", migratedFromChatId as Any), ("migratedFromMaxId", migratedFromMaxId as Any), ("pinnedMsgId", pinnedMsgId as Any), ("stickerset", stickerset as Any), ("availableMinId", availableMinId as Any), ("folderId", folderId as Any), ("linkedChatId", linkedChatId as Any), ("location", location as Any), ("slowmodeSeconds", slowmodeSeconds as Any), ("slowmodeNextSendDate", slowmodeNextSendDate as Any), ("statsDc", statsDc as Any), ("pts", pts as Any), ("call", call as Any), ("ttlPeriod", ttlPeriod as Any), ("pendingSuggestions", pendingSuggestions as Any), ("groupcallDefaultJoinAs", groupcallDefaultJoinAs as Any), ("themeEmoticon", themeEmoticon as Any), ("requestsPending", requestsPending as Any), ("recentRequesters", recentRequesters as Any), ("defaultSendAs", defaultSendAs as Any), ("availableReactions", availableReactions as Any)]) case .chatFull(let flags, let id, let about, let participants, let chatPhoto, let notifySettings, let exportedInvite, let botInfo, let pinnedMsgId, let folderId, let call, let ttlPeriod, let groupcallDefaultJoinAs, let themeEmoticon, let requestsPending, let recentRequesters, let availableReactions): - return ("chatFull", [("flags", String(describing: flags)), ("id", String(describing: id)), ("about", String(describing: about)), ("participants", String(describing: participants)), ("chatPhoto", String(describing: chatPhoto)), ("notifySettings", String(describing: notifySettings)), ("exportedInvite", String(describing: exportedInvite)), ("botInfo", String(describing: botInfo)), ("pinnedMsgId", String(describing: pinnedMsgId)), ("folderId", String(describing: folderId)), ("call", String(describing: call)), ("ttlPeriod", String(describing: ttlPeriod)), ("groupcallDefaultJoinAs", String(describing: groupcallDefaultJoinAs)), ("themeEmoticon", String(describing: themeEmoticon)), ("requestsPending", String(describing: requestsPending)), ("recentRequesters", String(describing: recentRequesters)), ("availableReactions", String(describing: availableReactions))]) + return ("chatFull", [("flags", flags as Any), ("id", id as Any), ("about", about as Any), ("participants", participants as Any), ("chatPhoto", chatPhoto as Any), ("notifySettings", notifySettings as Any), ("exportedInvite", exportedInvite as Any), ("botInfo", botInfo as Any), ("pinnedMsgId", pinnedMsgId as Any), ("folderId", folderId as Any), ("call", call as Any), ("ttlPeriod", ttlPeriod as Any), ("groupcallDefaultJoinAs", groupcallDefaultJoinAs as Any), ("themeEmoticon", themeEmoticon as Any), ("requestsPending", requestsPending as Any), ("recentRequesters", recentRequesters as Any), ("availableReactions", availableReactions as Any)]) } } @@ -1260,11 +1260,11 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .chatInvite(let flags, let title, let about, let photo, let participantsCount, let participants): - return ("chatInvite", [("flags", String(describing: flags)), ("title", String(describing: title)), ("about", String(describing: about)), ("photo", String(describing: photo)), ("participantsCount", String(describing: participantsCount)), ("participants", String(describing: participants))]) + return ("chatInvite", [("flags", flags as Any), ("title", title as Any), ("about", about as Any), ("photo", photo as Any), ("participantsCount", participantsCount as Any), ("participants", participants as Any)]) case .chatInviteAlready(let chat): - return ("chatInviteAlready", [("chat", String(describing: chat))]) + return ("chatInviteAlready", [("chat", chat as Any)]) case .chatInvitePeek(let chat, let expires): - return ("chatInvitePeek", [("chat", String(describing: chat)), ("expires", String(describing: expires))]) + return ("chatInvitePeek", [("chat", chat as Any), ("expires", expires as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api4.swift b/submodules/TelegramApi/Sources/Api4.swift index 9b7ed73b7a..6d40a03871 100644 --- a/submodules/TelegramApi/Sources/Api4.swift +++ b/submodules/TelegramApi/Sources/Api4.swift @@ -20,7 +20,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .chatInviteImporter(let flags, let userId, let date, let about, let approvedBy): - return ("chatInviteImporter", [("flags", String(describing: flags)), ("userId", String(describing: userId)), ("date", String(describing: date)), ("about", String(describing: about)), ("approvedBy", String(describing: approvedBy))]) + return ("chatInviteImporter", [("flags", flags as Any), ("userId", userId as Any), ("date", date as Any), ("about", about as Any), ("approvedBy", approvedBy as Any)]) } } @@ -68,7 +68,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .chatOnlines(let onlines): - return ("chatOnlines", [("onlines", String(describing: onlines))]) + return ("chatOnlines", [("onlines", onlines as Any)]) } } @@ -122,11 +122,11 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .chatParticipant(let userId, let inviterId, let date): - return ("chatParticipant", [("userId", String(describing: userId)), ("inviterId", String(describing: inviterId)), ("date", String(describing: date))]) + return ("chatParticipant", [("userId", userId as Any), ("inviterId", inviterId as Any), ("date", date as Any)]) case .chatParticipantAdmin(let userId, let inviterId, let date): - return ("chatParticipantAdmin", [("userId", String(describing: userId)), ("inviterId", String(describing: inviterId)), ("date", String(describing: date))]) + return ("chatParticipantAdmin", [("userId", userId as Any), ("inviterId", inviterId as Any), ("date", date as Any)]) case .chatParticipantCreator(let userId): - return ("chatParticipantCreator", [("userId", String(describing: userId))]) + return ("chatParticipantCreator", [("userId", userId as Any)]) } } @@ -211,9 +211,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .chatParticipants(let chatId, let participants, let version): - return ("chatParticipants", [("chatId", String(describing: chatId)), ("participants", String(describing: participants)), ("version", String(describing: version))]) + return ("chatParticipants", [("chatId", chatId as Any), ("participants", participants as Any), ("version", version as Any)]) case .chatParticipantsForbidden(let flags, let chatId, let selfParticipant): - return ("chatParticipantsForbidden", [("flags", String(describing: flags)), ("chatId", String(describing: chatId)), ("selfParticipant", String(describing: selfParticipant))]) + return ("chatParticipantsForbidden", [("flags", flags as Any), ("chatId", chatId as Any), ("selfParticipant", selfParticipant as Any)]) } } @@ -286,7 +286,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .chatPhoto(let flags, let photoId, let strippedThumb, let dcId): - return ("chatPhoto", [("flags", String(describing: flags)), ("photoId", String(describing: photoId)), ("strippedThumb", String(describing: strippedThumb)), ("dcId", String(describing: dcId))]) + return ("chatPhoto", [("flags", flags as Any), ("photoId", photoId as Any), ("strippedThumb", strippedThumb as Any), ("dcId", dcId as Any)]) case .chatPhotoEmpty: return ("chatPhotoEmpty", []) } @@ -354,11 +354,11 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .chatReactionsAll(let flags): - return ("chatReactionsAll", [("flags", String(describing: flags))]) + return ("chatReactionsAll", [("flags", flags as Any)]) case .chatReactionsNone: return ("chatReactionsNone", []) case .chatReactionsSome(let reactions): - return ("chatReactionsSome", [("reactions", String(describing: reactions))]) + return ("chatReactionsSome", [("reactions", reactions as Any)]) } } @@ -415,7 +415,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .codeSettings(let flags, let logoutTokens): - return ("codeSettings", [("flags", String(describing: flags)), ("logoutTokens", String(describing: logoutTokens))]) + return ("codeSettings", [("flags", flags as Any), ("logoutTokens", logoutTokens as Any)]) } } @@ -505,7 +505,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .config(let flags, let date, let expires, let testMode, let thisDc, let dcOptions, let dcTxtDomainName, let chatSizeMax, let megagroupSizeMax, let forwardedCountMax, let onlineUpdatePeriodMs, let offlineBlurTimeoutMs, let offlineIdleTimeoutMs, let onlineCloudTimeoutMs, let notifyCloudDelayMs, let notifyDefaultDelayMs, let pushChatPeriodMs, let pushChatLimit, let savedGifsLimit, let editTimeLimit, let revokeTimeLimit, let revokePmTimeLimit, let ratingEDecay, let stickersRecentLimit, let stickersFavedLimit, let channelsReadMediaPeriod, let tmpSessions, let pinnedDialogsCountMax, let pinnedInfolderCountMax, let callReceiveTimeoutMs, let callRingTimeoutMs, let callConnectTimeoutMs, let callPacketTimeoutMs, let meUrlPrefix, let autoupdateUrlPrefix, let gifSearchUsername, let venueSearchUsername, let imgSearchUsername, let staticMapsProvider, let captionLengthMax, let messageLengthMax, let webfileDcId, let suggestedLangCode, let langPackVersion, let baseLangPackVersion, let reactionsDefault): - return ("config", [("flags", String(describing: flags)), ("date", String(describing: date)), ("expires", String(describing: expires)), ("testMode", String(describing: testMode)), ("thisDc", String(describing: thisDc)), ("dcOptions", String(describing: dcOptions)), ("dcTxtDomainName", String(describing: dcTxtDomainName)), ("chatSizeMax", String(describing: chatSizeMax)), ("megagroupSizeMax", String(describing: megagroupSizeMax)), ("forwardedCountMax", String(describing: forwardedCountMax)), ("onlineUpdatePeriodMs", String(describing: onlineUpdatePeriodMs)), ("offlineBlurTimeoutMs", String(describing: offlineBlurTimeoutMs)), ("offlineIdleTimeoutMs", String(describing: offlineIdleTimeoutMs)), ("onlineCloudTimeoutMs", String(describing: onlineCloudTimeoutMs)), ("notifyCloudDelayMs", String(describing: notifyCloudDelayMs)), ("notifyDefaultDelayMs", String(describing: notifyDefaultDelayMs)), ("pushChatPeriodMs", String(describing: pushChatPeriodMs)), ("pushChatLimit", String(describing: pushChatLimit)), ("savedGifsLimit", String(describing: savedGifsLimit)), ("editTimeLimit", String(describing: editTimeLimit)), ("revokeTimeLimit", String(describing: revokeTimeLimit)), ("revokePmTimeLimit", String(describing: revokePmTimeLimit)), ("ratingEDecay", String(describing: ratingEDecay)), ("stickersRecentLimit", String(describing: stickersRecentLimit)), ("stickersFavedLimit", String(describing: stickersFavedLimit)), ("channelsReadMediaPeriod", String(describing: channelsReadMediaPeriod)), ("tmpSessions", String(describing: tmpSessions)), ("pinnedDialogsCountMax", String(describing: pinnedDialogsCountMax)), ("pinnedInfolderCountMax", String(describing: pinnedInfolderCountMax)), ("callReceiveTimeoutMs", String(describing: callReceiveTimeoutMs)), ("callRingTimeoutMs", String(describing: callRingTimeoutMs)), ("callConnectTimeoutMs", String(describing: callConnectTimeoutMs)), ("callPacketTimeoutMs", String(describing: callPacketTimeoutMs)), ("meUrlPrefix", String(describing: meUrlPrefix)), ("autoupdateUrlPrefix", String(describing: autoupdateUrlPrefix)), ("gifSearchUsername", String(describing: gifSearchUsername)), ("venueSearchUsername", String(describing: venueSearchUsername)), ("imgSearchUsername", String(describing: imgSearchUsername)), ("staticMapsProvider", String(describing: staticMapsProvider)), ("captionLengthMax", String(describing: captionLengthMax)), ("messageLengthMax", String(describing: messageLengthMax)), ("webfileDcId", String(describing: webfileDcId)), ("suggestedLangCode", String(describing: suggestedLangCode)), ("langPackVersion", String(describing: langPackVersion)), ("baseLangPackVersion", String(describing: baseLangPackVersion)), ("reactionsDefault", String(describing: reactionsDefault))]) + return ("config", [("flags", flags as Any), ("date", date as Any), ("expires", expires as Any), ("testMode", testMode as Any), ("thisDc", thisDc as Any), ("dcOptions", dcOptions as Any), ("dcTxtDomainName", dcTxtDomainName as Any), ("chatSizeMax", chatSizeMax as Any), ("megagroupSizeMax", megagroupSizeMax as Any), ("forwardedCountMax", forwardedCountMax as Any), ("onlineUpdatePeriodMs", onlineUpdatePeriodMs as Any), ("offlineBlurTimeoutMs", offlineBlurTimeoutMs as Any), ("offlineIdleTimeoutMs", offlineIdleTimeoutMs as Any), ("onlineCloudTimeoutMs", onlineCloudTimeoutMs as Any), ("notifyCloudDelayMs", notifyCloudDelayMs as Any), ("notifyDefaultDelayMs", notifyDefaultDelayMs as Any), ("pushChatPeriodMs", pushChatPeriodMs as Any), ("pushChatLimit", pushChatLimit as Any), ("savedGifsLimit", savedGifsLimit as Any), ("editTimeLimit", editTimeLimit as Any), ("revokeTimeLimit", revokeTimeLimit as Any), ("revokePmTimeLimit", revokePmTimeLimit as Any), ("ratingEDecay", ratingEDecay as Any), ("stickersRecentLimit", stickersRecentLimit as Any), ("stickersFavedLimit", stickersFavedLimit as Any), ("channelsReadMediaPeriod", channelsReadMediaPeriod as Any), ("tmpSessions", tmpSessions as Any), ("pinnedDialogsCountMax", pinnedDialogsCountMax as Any), ("pinnedInfolderCountMax", pinnedInfolderCountMax as Any), ("callReceiveTimeoutMs", callReceiveTimeoutMs as Any), ("callRingTimeoutMs", callRingTimeoutMs as Any), ("callConnectTimeoutMs", callConnectTimeoutMs as Any), ("callPacketTimeoutMs", callPacketTimeoutMs as Any), ("meUrlPrefix", meUrlPrefix as Any), ("autoupdateUrlPrefix", autoupdateUrlPrefix as Any), ("gifSearchUsername", gifSearchUsername as Any), ("venueSearchUsername", venueSearchUsername as Any), ("imgSearchUsername", imgSearchUsername as Any), ("staticMapsProvider", staticMapsProvider as Any), ("captionLengthMax", captionLengthMax as Any), ("messageLengthMax", messageLengthMax as Any), ("webfileDcId", webfileDcId as Any), ("suggestedLangCode", suggestedLangCode as Any), ("langPackVersion", langPackVersion as Any), ("baseLangPackVersion", baseLangPackVersion as Any), ("reactionsDefault", reactionsDefault as Any)]) } } @@ -683,7 +683,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .contact(let userId, let mutual): - return ("contact", [("userId", String(describing: userId)), ("mutual", String(describing: mutual))]) + return ("contact", [("userId", userId as Any), ("mutual", mutual as Any)]) } } @@ -725,7 +725,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .contactStatus(let userId, let status): - return ("contactStatus", [("userId", String(describing: userId)), ("status", String(describing: status))]) + return ("contactStatus", [("userId", userId as Any), ("status", status as Any)]) } } @@ -766,7 +766,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .dataJSON(let data): - return ("dataJSON", [("data", String(describing: data))]) + return ("dataJSON", [("data", data as Any)]) } } @@ -806,7 +806,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .dcOption(let flags, let id, let ipAddress, let port, let secret): - return ("dcOption", [("flags", String(describing: flags)), ("id", String(describing: id)), ("ipAddress", String(describing: ipAddress)), ("port", String(describing: port)), ("secret", String(describing: secret))]) + return ("dcOption", [("flags", flags as Any), ("id", id as Any), ("ipAddress", ipAddress as Any), ("port", port as Any), ("secret", secret as Any)]) } } @@ -854,7 +854,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .defaultHistoryTTL(let period): - return ("defaultHistoryTTL", [("period", String(describing: period))]) + return ("defaultHistoryTTL", [("period", period as Any)]) } } @@ -916,9 +916,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .dialog(let flags, let peer, let topMessage, let readInboxMaxId, let readOutboxMaxId, let unreadCount, let unreadMentionsCount, let unreadReactionsCount, let notifySettings, let pts, let draft, let folderId, let ttlPeriod): - return ("dialog", [("flags", String(describing: flags)), ("peer", String(describing: peer)), ("topMessage", String(describing: topMessage)), ("readInboxMaxId", String(describing: readInboxMaxId)), ("readOutboxMaxId", String(describing: readOutboxMaxId)), ("unreadCount", String(describing: unreadCount)), ("unreadMentionsCount", String(describing: unreadMentionsCount)), ("unreadReactionsCount", String(describing: unreadReactionsCount)), ("notifySettings", String(describing: notifySettings)), ("pts", String(describing: pts)), ("draft", String(describing: draft)), ("folderId", String(describing: folderId)), ("ttlPeriod", String(describing: ttlPeriod))]) + return ("dialog", [("flags", flags as Any), ("peer", peer as Any), ("topMessage", topMessage as Any), ("readInboxMaxId", readInboxMaxId as Any), ("readOutboxMaxId", readOutboxMaxId as Any), ("unreadCount", unreadCount as Any), ("unreadMentionsCount", unreadMentionsCount as Any), ("unreadReactionsCount", unreadReactionsCount as Any), ("notifySettings", notifySettings as Any), ("pts", pts as Any), ("draft", draft as Any), ("folderId", folderId as Any), ("ttlPeriod", ttlPeriod as Any)]) case .dialogFolder(let flags, let folder, let peer, let topMessage, let unreadMutedPeersCount, let unreadUnmutedPeersCount, let unreadMutedMessagesCount, let unreadUnmutedMessagesCount): - return ("dialogFolder", [("flags", String(describing: flags)), ("folder", String(describing: folder)), ("peer", String(describing: peer)), ("topMessage", String(describing: topMessage)), ("unreadMutedPeersCount", String(describing: unreadMutedPeersCount)), ("unreadUnmutedPeersCount", String(describing: unreadUnmutedPeersCount)), ("unreadMutedMessagesCount", String(describing: unreadMutedMessagesCount)), ("unreadUnmutedMessagesCount", String(describing: unreadUnmutedMessagesCount))]) + return ("dialogFolder", [("flags", flags as Any), ("folder", folder as Any), ("peer", peer as Any), ("topMessage", topMessage as Any), ("unreadMutedPeersCount", unreadMutedPeersCount as Any), ("unreadUnmutedPeersCount", unreadUnmutedPeersCount as Any), ("unreadMutedMessagesCount", unreadMutedMessagesCount as Any), ("unreadUnmutedMessagesCount", unreadUnmutedMessagesCount as Any)]) } } @@ -1057,7 +1057,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .dialogFilter(let flags, let id, let title, let emoticon, let pinnedPeers, let includePeers, let excludePeers): - return ("dialogFilter", [("flags", String(describing: flags)), ("id", String(describing: id)), ("title", String(describing: title)), ("emoticon", String(describing: emoticon)), ("pinnedPeers", String(describing: pinnedPeers)), ("includePeers", String(describing: includePeers)), ("excludePeers", String(describing: excludePeers))]) + return ("dialogFilter", [("flags", flags as Any), ("id", id as Any), ("title", title as Any), ("emoticon", emoticon as Any), ("pinnedPeers", pinnedPeers as Any), ("includePeers", includePeers as Any), ("excludePeers", excludePeers as Any)]) case .dialogFilterDefault: return ("dialogFilterDefault", []) } @@ -1123,7 +1123,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .dialogFilterSuggested(let filter, let description): - return ("dialogFilterSuggested", [("filter", String(describing: filter)), ("description", String(describing: description))]) + return ("dialogFilterSuggested", [("filter", filter as Any), ("description", description as Any)]) } } @@ -1171,9 +1171,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .dialogPeer(let peer): - return ("dialogPeer", [("peer", String(describing: peer))]) + return ("dialogPeer", [("peer", peer as Any)]) case .dialogPeerFolder(let folderId): - return ("dialogPeerFolder", [("folderId", String(describing: folderId))]) + return ("dialogPeerFolder", [("folderId", folderId as Any)]) } } @@ -1251,9 +1251,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .document(let flags, let id, let accessHash, let fileReference, let date, let mimeType, let size, let thumbs, let videoThumbs, let dcId, let attributes): - return ("document", [("flags", String(describing: flags)), ("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("fileReference", String(describing: fileReference)), ("date", String(describing: date)), ("mimeType", String(describing: mimeType)), ("size", String(describing: size)), ("thumbs", String(describing: thumbs)), ("videoThumbs", String(describing: videoThumbs)), ("dcId", String(describing: dcId)), ("attributes", String(describing: attributes))]) + return ("document", [("flags", flags as Any), ("id", id as Any), ("accessHash", accessHash as Any), ("fileReference", fileReference as Any), ("date", date as Any), ("mimeType", mimeType as Any), ("size", size as Any), ("thumbs", thumbs as Any), ("videoThumbs", videoThumbs as Any), ("dcId", dcId as Any), ("attributes", attributes as Any)]) case .documentEmpty(let id): - return ("documentEmpty", [("id", String(describing: id))]) + return ("documentEmpty", [("id", id as Any)]) } } @@ -1400,19 +1400,19 @@ public extension Api { case .documentAttributeAnimated: return ("documentAttributeAnimated", []) case .documentAttributeAudio(let flags, let duration, let title, let performer, let waveform): - return ("documentAttributeAudio", [("flags", String(describing: flags)), ("duration", String(describing: duration)), ("title", String(describing: title)), ("performer", String(describing: performer)), ("waveform", String(describing: waveform))]) + return ("documentAttributeAudio", [("flags", flags as Any), ("duration", duration as Any), ("title", title as Any), ("performer", performer as Any), ("waveform", waveform as Any)]) case .documentAttributeCustomEmoji(let flags, let alt, let stickerset): - return ("documentAttributeCustomEmoji", [("flags", String(describing: flags)), ("alt", String(describing: alt)), ("stickerset", String(describing: stickerset))]) + return ("documentAttributeCustomEmoji", [("flags", flags as Any), ("alt", alt as Any), ("stickerset", stickerset as Any)]) case .documentAttributeFilename(let fileName): - return ("documentAttributeFilename", [("fileName", String(describing: fileName))]) + return ("documentAttributeFilename", [("fileName", fileName as Any)]) case .documentAttributeHasStickers: return ("documentAttributeHasStickers", []) case .documentAttributeImageSize(let w, let h): - return ("documentAttributeImageSize", [("w", String(describing: w)), ("h", String(describing: h))]) + return ("documentAttributeImageSize", [("w", w as Any), ("h", h as Any)]) case .documentAttributeSticker(let flags, let alt, let stickerset, let maskCoords): - return ("documentAttributeSticker", [("flags", String(describing: flags)), ("alt", String(describing: alt)), ("stickerset", String(describing: stickerset)), ("maskCoords", String(describing: maskCoords))]) + return ("documentAttributeSticker", [("flags", flags as Any), ("alt", alt as Any), ("stickerset", stickerset as Any), ("maskCoords", maskCoords as Any)]) case .documentAttributeVideo(let flags, let duration, let w, let h): - return ("documentAttributeVideo", [("flags", String(describing: flags)), ("duration", String(describing: duration)), ("w", String(describing: w)), ("h", String(describing: h))]) + return ("documentAttributeVideo", [("flags", flags as Any), ("duration", duration as Any), ("w", w as Any), ("h", h as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api5.swift b/submodules/TelegramApi/Sources/Api5.swift index 42ddc4ef5a..43a2b20dc3 100644 --- a/submodules/TelegramApi/Sources/Api5.swift +++ b/submodules/TelegramApi/Sources/Api5.swift @@ -32,9 +32,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .draftMessage(let flags, let replyToMsgId, let message, let entities, let date): - return ("draftMessage", [("flags", String(describing: flags)), ("replyToMsgId", String(describing: replyToMsgId)), ("message", String(describing: message)), ("entities", String(describing: entities)), ("date", String(describing: date))]) + return ("draftMessage", [("flags", flags as Any), ("replyToMsgId", replyToMsgId as Any), ("message", message as Any), ("entities", entities as Any), ("date", date as Any)]) case .draftMessageEmpty(let flags, let date): - return ("draftMessageEmpty", [("flags", String(describing: flags)), ("date", String(describing: date))]) + return ("draftMessageEmpty", [("flags", flags as Any), ("date", date as Any)]) } } @@ -112,11 +112,11 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .emailVerificationApple(let token): - return ("emailVerificationApple", [("token", String(describing: token))]) + return ("emailVerificationApple", [("token", token as Any)]) case .emailVerificationCode(let code): - return ("emailVerificationCode", [("code", String(describing: code))]) + return ("emailVerificationCode", [("code", code as Any)]) case .emailVerificationGoogle(let token): - return ("emailVerificationGoogle", [("token", String(describing: token))]) + return ("emailVerificationGoogle", [("token", token as Any)]) } } @@ -191,7 +191,7 @@ public extension Api { case .emailVerifyPurposeLoginChange: return ("emailVerifyPurposeLoginChange", []) case .emailVerifyPurposeLoginSetup(let phoneNumber, let phoneCodeHash): - return ("emailVerifyPurposeLoginSetup", [("phoneNumber", String(describing: phoneNumber)), ("phoneCodeHash", String(describing: phoneCodeHash))]) + return ("emailVerifyPurposeLoginSetup", [("phoneNumber", phoneNumber as Any), ("phoneCodeHash", phoneCodeHash as Any)]) case .emailVerifyPurposePassport: return ("emailVerifyPurposePassport", []) } @@ -255,9 +255,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .emojiKeyword(let keyword, let emoticons): - return ("emojiKeyword", [("keyword", String(describing: keyword)), ("emoticons", String(describing: emoticons))]) + return ("emojiKeyword", [("keyword", keyword as Any), ("emoticons", emoticons as Any)]) case .emojiKeywordDeleted(let keyword, let emoticons): - return ("emojiKeywordDeleted", [("keyword", String(describing: keyword)), ("emoticons", String(describing: emoticons))]) + return ("emojiKeywordDeleted", [("keyword", keyword as Any), ("emoticons", emoticons as Any)]) } } @@ -321,7 +321,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .emojiKeywordsDifference(let langCode, let fromVersion, let version, let keywords): - return ("emojiKeywordsDifference", [("langCode", String(describing: langCode)), ("fromVersion", String(describing: fromVersion)), ("version", String(describing: version)), ("keywords", String(describing: keywords))]) + return ("emojiKeywordsDifference", [("langCode", langCode as Any), ("fromVersion", fromVersion as Any), ("version", version as Any), ("keywords", keywords as Any)]) } } @@ -368,7 +368,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .emojiLanguage(let langCode): - return ("emojiLanguage", [("langCode", String(describing: langCode))]) + return ("emojiLanguage", [("langCode", langCode as Any)]) } } @@ -419,11 +419,11 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .emojiStatus(let documentId): - return ("emojiStatus", [("documentId", String(describing: documentId))]) + return ("emojiStatus", [("documentId", documentId as Any)]) case .emojiStatusEmpty: return ("emojiStatusEmpty", []) case .emojiStatusUntil(let documentId, let until): - return ("emojiStatusUntil", [("documentId", String(describing: documentId)), ("until", String(describing: until))]) + return ("emojiStatusUntil", [("documentId", documentId as Any), ("until", until as Any)]) } } @@ -476,7 +476,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .emojiURL(let url): - return ("emojiURL", [("url", String(describing: url))]) + return ("emojiURL", [("url", url as Any)]) } } @@ -558,15 +558,15 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .encryptedChat(let id, let accessHash, let date, let adminId, let participantId, let gAOrB, let keyFingerprint): - return ("encryptedChat", [("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("date", String(describing: date)), ("adminId", String(describing: adminId)), ("participantId", String(describing: participantId)), ("gAOrB", String(describing: gAOrB)), ("keyFingerprint", String(describing: keyFingerprint))]) + return ("encryptedChat", [("id", id as Any), ("accessHash", accessHash as Any), ("date", date as Any), ("adminId", adminId as Any), ("participantId", participantId as Any), ("gAOrB", gAOrB as Any), ("keyFingerprint", keyFingerprint as Any)]) case .encryptedChatDiscarded(let flags, let id): - return ("encryptedChatDiscarded", [("flags", String(describing: flags)), ("id", String(describing: id))]) + return ("encryptedChatDiscarded", [("flags", flags as Any), ("id", id as Any)]) case .encryptedChatEmpty(let id): - return ("encryptedChatEmpty", [("id", String(describing: id))]) + return ("encryptedChatEmpty", [("id", id as Any)]) case .encryptedChatRequested(let flags, let folderId, let id, let accessHash, let date, let adminId, let participantId, let gA): - return ("encryptedChatRequested", [("flags", String(describing: flags)), ("folderId", String(describing: folderId)), ("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("date", String(describing: date)), ("adminId", String(describing: adminId)), ("participantId", String(describing: participantId)), ("gA", String(describing: gA))]) + return ("encryptedChatRequested", [("flags", flags as Any), ("folderId", folderId as Any), ("id", id as Any), ("accessHash", accessHash as Any), ("date", date as Any), ("adminId", adminId as Any), ("participantId", participantId as Any), ("gA", gA as Any)]) case .encryptedChatWaiting(let id, let accessHash, let date, let adminId, let participantId): - return ("encryptedChatWaiting", [("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("date", String(describing: date)), ("adminId", String(describing: adminId)), ("participantId", String(describing: participantId))]) + return ("encryptedChatWaiting", [("id", id as Any), ("accessHash", accessHash as Any), ("date", date as Any), ("adminId", adminId as Any), ("participantId", participantId as Any)]) } } @@ -711,7 +711,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .encryptedFile(let id, let accessHash, let size, let dcId, let keyFingerprint): - return ("encryptedFile", [("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("size", String(describing: size)), ("dcId", String(describing: dcId)), ("keyFingerprint", String(describing: keyFingerprint))]) + return ("encryptedFile", [("id", id as Any), ("accessHash", accessHash as Any), ("size", size as Any), ("dcId", dcId as Any), ("keyFingerprint", keyFingerprint as Any)]) case .encryptedFileEmpty: return ("encryptedFileEmpty", []) } @@ -778,9 +778,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .encryptedMessage(let randomId, let chatId, let date, let bytes, let file): - return ("encryptedMessage", [("randomId", String(describing: randomId)), ("chatId", String(describing: chatId)), ("date", String(describing: date)), ("bytes", String(describing: bytes)), ("file", String(describing: file))]) + return ("encryptedMessage", [("randomId", randomId as Any), ("chatId", chatId as Any), ("date", date as Any), ("bytes", bytes as Any), ("file", file as Any)]) case .encryptedMessageService(let randomId, let chatId, let date, let bytes): - return ("encryptedMessageService", [("randomId", String(describing: randomId)), ("chatId", String(describing: chatId)), ("date", String(describing: date)), ("bytes", String(describing: bytes))]) + return ("encryptedMessageService", [("randomId", randomId as Any), ("chatId", chatId as Any), ("date", date as Any), ("bytes", bytes as Any)]) } } @@ -866,7 +866,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .chatInviteExported(let flags, let link, let adminId, let date, let startDate, let expireDate, let usageLimit, let usage, let requested, let title): - return ("chatInviteExported", [("flags", String(describing: flags)), ("link", String(describing: link)), ("adminId", String(describing: adminId)), ("date", String(describing: date)), ("startDate", String(describing: startDate)), ("expireDate", String(describing: expireDate)), ("usageLimit", String(describing: usageLimit)), ("usage", String(describing: usage)), ("requested", String(describing: requested)), ("title", String(describing: title))]) + return ("chatInviteExported", [("flags", flags as Any), ("link", link as Any), ("adminId", adminId as Any), ("date", date as Any), ("startDate", startDate as Any), ("expireDate", expireDate as Any), ("usageLimit", usageLimit as Any), ("usage", usage as Any), ("requested", requested as Any), ("title", title as Any)]) case .chatInvitePublicJoinRequests: return ("chatInvitePublicJoinRequests", []) } @@ -935,7 +935,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .exportedContactToken(let url, let expires): - return ("exportedContactToken", [("url", String(describing: url)), ("expires", String(describing: expires))]) + return ("exportedContactToken", [("url", url as Any), ("expires", expires as Any)]) } } @@ -975,7 +975,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .exportedMessageLink(let link, let html): - return ("exportedMessageLink", [("link", String(describing: link)), ("html", String(describing: html))]) + return ("exportedMessageLink", [("link", link as Any), ("html", html as Any)]) } } @@ -1016,7 +1016,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .fileHash(let offset, let limit, let hash): - return ("fileHash", [("offset", String(describing: offset)), ("limit", String(describing: limit)), ("hash", String(describing: hash))]) + return ("fileHash", [("offset", offset as Any), ("limit", limit as Any), ("hash", hash as Any)]) } } @@ -1061,7 +1061,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .folder(let flags, let id, let title, let photo): - return ("folder", [("flags", String(describing: flags)), ("id", String(describing: id)), ("title", String(describing: title)), ("photo", String(describing: photo))]) + return ("folder", [("flags", flags as Any), ("id", id as Any), ("title", title as Any), ("photo", photo as Any)]) } } @@ -1109,7 +1109,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .folderPeer(let peer, let folderId): - return ("folderPeer", [("peer", String(describing: peer)), ("folderId", String(describing: folderId))]) + return ("folderPeer", [("peer", peer as Any), ("folderId", folderId as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api6.swift b/submodules/TelegramApi/Sources/Api6.swift index f59d75fea7..0423e82e22 100644 --- a/submodules/TelegramApi/Sources/Api6.swift +++ b/submodules/TelegramApi/Sources/Api6.swift @@ -37,9 +37,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .forumTopic(let flags, let id, let date, let title, let iconColor, let iconEmojiId, let topMessage, let readInboxMaxId, let readOutboxMaxId, let unreadCount, let unreadMentionsCount, let unreadReactionsCount, let fromId, let notifySettings, let draft): - return ("forumTopic", [("flags", String(describing: flags)), ("id", String(describing: id)), ("date", String(describing: date)), ("title", String(describing: title)), ("iconColor", String(describing: iconColor)), ("iconEmojiId", String(describing: iconEmojiId)), ("topMessage", String(describing: topMessage)), ("readInboxMaxId", String(describing: readInboxMaxId)), ("readOutboxMaxId", String(describing: readOutboxMaxId)), ("unreadCount", String(describing: unreadCount)), ("unreadMentionsCount", String(describing: unreadMentionsCount)), ("unreadReactionsCount", String(describing: unreadReactionsCount)), ("fromId", String(describing: fromId)), ("notifySettings", String(describing: notifySettings)), ("draft", String(describing: draft))]) + return ("forumTopic", [("flags", flags as Any), ("id", id as Any), ("date", date as Any), ("title", title as Any), ("iconColor", iconColor as Any), ("iconEmojiId", iconEmojiId as Any), ("topMessage", topMessage as Any), ("readInboxMaxId", readInboxMaxId as Any), ("readOutboxMaxId", readOutboxMaxId as Any), ("unreadCount", unreadCount as Any), ("unreadMentionsCount", unreadMentionsCount as Any), ("unreadReactionsCount", unreadReactionsCount as Any), ("fromId", fromId as Any), ("notifySettings", notifySettings as Any), ("draft", draft as Any)]) case .forumTopicDeleted(let id): - return ("forumTopicDeleted", [("id", String(describing: id))]) + return ("forumTopicDeleted", [("id", id as Any)]) } } @@ -141,7 +141,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .game(let flags, let id, let accessHash, let shortName, let title, let description, let photo, let document): - return ("game", [("flags", String(describing: flags)), ("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("shortName", String(describing: shortName)), ("title", String(describing: title)), ("description", String(describing: description)), ("photo", String(describing: photo)), ("document", String(describing: document))]) + return ("game", [("flags", flags as Any), ("id", id as Any), ("accessHash", accessHash as Any), ("shortName", shortName as Any), ("title", title as Any), ("description", description as Any), ("photo", photo as Any), ("document", document as Any)]) } } @@ -213,7 +213,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .geoPoint(let flags, let long, let lat, let accessHash, let accuracyRadius): - return ("geoPoint", [("flags", String(describing: flags)), ("long", String(describing: long)), ("lat", String(describing: lat)), ("accessHash", String(describing: accessHash)), ("accuracyRadius", String(describing: accuracyRadius))]) + return ("geoPoint", [("flags", flags as Any), ("long", long as Any), ("lat", lat as Any), ("accessHash", accessHash as Any), ("accuracyRadius", accuracyRadius as Any)]) case .geoPointEmpty: return ("geoPointEmpty", []) } @@ -267,7 +267,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .globalPrivacySettings(let flags, let archiveAndMuteNewNoncontactPeers): - return ("globalPrivacySettings", [("flags", String(describing: flags)), ("archiveAndMuteNewNoncontactPeers", String(describing: archiveAndMuteNewNoncontactPeers))]) + return ("globalPrivacySettings", [("flags", flags as Any), ("archiveAndMuteNewNoncontactPeers", archiveAndMuteNewNoncontactPeers as Any)]) } } @@ -327,9 +327,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .groupCall(let flags, let id, let accessHash, let participantsCount, let title, let streamDcId, let recordStartDate, let scheduleDate, let unmutedVideoCount, let unmutedVideoLimit, let version): - return ("groupCall", [("flags", String(describing: flags)), ("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("participantsCount", String(describing: participantsCount)), ("title", String(describing: title)), ("streamDcId", String(describing: streamDcId)), ("recordStartDate", String(describing: recordStartDate)), ("scheduleDate", String(describing: scheduleDate)), ("unmutedVideoCount", String(describing: unmutedVideoCount)), ("unmutedVideoLimit", String(describing: unmutedVideoLimit)), ("version", String(describing: version))]) + return ("groupCall", [("flags", flags as Any), ("id", id as Any), ("accessHash", accessHash as Any), ("participantsCount", participantsCount as Any), ("title", title as Any), ("streamDcId", streamDcId as Any), ("recordStartDate", recordStartDate as Any), ("scheduleDate", scheduleDate as Any), ("unmutedVideoCount", unmutedVideoCount as Any), ("unmutedVideoLimit", unmutedVideoLimit as Any), ("version", version as Any)]) case .groupCallDiscarded(let id, let accessHash, let duration): - return ("groupCallDiscarded", [("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("duration", String(describing: duration))]) + return ("groupCallDiscarded", [("id", id as Any), ("accessHash", accessHash as Any), ("duration", duration as Any)]) } } @@ -421,7 +421,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .groupCallParticipant(let flags, let peer, let date, let activeDate, let source, let volume, let about, let raiseHandRating, let video, let presentation): - return ("groupCallParticipant", [("flags", String(describing: flags)), ("peer", String(describing: peer)), ("date", String(describing: date)), ("activeDate", String(describing: activeDate)), ("source", String(describing: source)), ("volume", String(describing: volume)), ("about", String(describing: about)), ("raiseHandRating", String(describing: raiseHandRating)), ("video", String(describing: video)), ("presentation", String(describing: presentation))]) + return ("groupCallParticipant", [("flags", flags as Any), ("peer", peer as Any), ("date", date as Any), ("activeDate", activeDate as Any), ("source", source as Any), ("volume", volume as Any), ("about", about as Any), ("raiseHandRating", raiseHandRating as Any), ("video", video as Any), ("presentation", presentation as Any)]) } } @@ -497,7 +497,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .groupCallParticipantVideo(let flags, let endpoint, let sourceGroups, let audioSource): - return ("groupCallParticipantVideo", [("flags", String(describing: flags)), ("endpoint", String(describing: endpoint)), ("sourceGroups", String(describing: sourceGroups)), ("audioSource", String(describing: audioSource))]) + return ("groupCallParticipantVideo", [("flags", flags as Any), ("endpoint", endpoint as Any), ("sourceGroups", sourceGroups as Any), ("audioSource", audioSource as Any)]) } } @@ -549,7 +549,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .groupCallParticipantVideoSourceGroup(let semantics, let sources): - return ("groupCallParticipantVideoSourceGroup", [("semantics", String(describing: semantics)), ("sources", String(describing: sources))]) + return ("groupCallParticipantVideoSourceGroup", [("semantics", semantics as Any), ("sources", sources as Any)]) } } @@ -592,7 +592,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .groupCallStreamChannel(let channel, let scale, let lastTimestampMs): - return ("groupCallStreamChannel", [("channel", String(describing: channel)), ("scale", String(describing: scale)), ("lastTimestampMs", String(describing: lastTimestampMs))]) + return ("groupCallStreamChannel", [("channel", channel as Any), ("scale", scale as Any), ("lastTimestampMs", lastTimestampMs as Any)]) } } @@ -636,7 +636,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .highScore(let pos, let userId, let score): - return ("highScore", [("pos", String(describing: pos)), ("userId", String(describing: userId)), ("score", String(describing: score))]) + return ("highScore", [("pos", pos as Any), ("userId", userId as Any), ("score", score as Any)]) } } @@ -679,7 +679,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .importedContact(let userId, let clientId): - return ("importedContact", [("userId", String(describing: userId)), ("clientId", String(describing: clientId))]) + return ("importedContact", [("userId", userId as Any), ("clientId", clientId as Any)]) } } @@ -719,7 +719,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inlineBotSwitchPM(let text, let startParam): - return ("inlineBotSwitchPM", [("text", String(describing: text)), ("startParam", String(describing: startParam))]) + return ("inlineBotSwitchPM", [("text", text as Any), ("startParam", startParam as Any)]) } } @@ -837,7 +837,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputAppEvent(let time, let type, let peer, let data): - return ("inputAppEvent", [("time", String(describing: time)), ("type", String(describing: type)), ("peer", String(describing: peer)), ("data", String(describing: data))]) + return ("inputAppEvent", [("time", time as Any), ("type", type as Any), ("peer", peer as Any), ("data", data as Any)]) } } @@ -966,19 +966,19 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputBotInlineMessageGame(let flags, let replyMarkup): - return ("inputBotInlineMessageGame", [("flags", String(describing: flags)), ("replyMarkup", String(describing: replyMarkup))]) + return ("inputBotInlineMessageGame", [("flags", flags as Any), ("replyMarkup", replyMarkup as Any)]) case .inputBotInlineMessageMediaAuto(let flags, let message, let entities, let replyMarkup): - return ("inputBotInlineMessageMediaAuto", [("flags", String(describing: flags)), ("message", String(describing: message)), ("entities", String(describing: entities)), ("replyMarkup", String(describing: replyMarkup))]) + return ("inputBotInlineMessageMediaAuto", [("flags", flags as Any), ("message", message as Any), ("entities", entities as Any), ("replyMarkup", replyMarkup as Any)]) case .inputBotInlineMessageMediaContact(let flags, let phoneNumber, let firstName, let lastName, let vcard, let replyMarkup): - return ("inputBotInlineMessageMediaContact", [("flags", String(describing: flags)), ("phoneNumber", String(describing: phoneNumber)), ("firstName", String(describing: firstName)), ("lastName", String(describing: lastName)), ("vcard", String(describing: vcard)), ("replyMarkup", String(describing: replyMarkup))]) + return ("inputBotInlineMessageMediaContact", [("flags", flags as Any), ("phoneNumber", phoneNumber as Any), ("firstName", firstName as Any), ("lastName", lastName as Any), ("vcard", vcard as Any), ("replyMarkup", replyMarkup as Any)]) case .inputBotInlineMessageMediaGeo(let flags, let geoPoint, let heading, let period, let proximityNotificationRadius, let replyMarkup): - return ("inputBotInlineMessageMediaGeo", [("flags", String(describing: flags)), ("geoPoint", String(describing: geoPoint)), ("heading", String(describing: heading)), ("period", String(describing: period)), ("proximityNotificationRadius", String(describing: proximityNotificationRadius)), ("replyMarkup", String(describing: replyMarkup))]) + return ("inputBotInlineMessageMediaGeo", [("flags", flags as Any), ("geoPoint", geoPoint as Any), ("heading", heading as Any), ("period", period as Any), ("proximityNotificationRadius", proximityNotificationRadius as Any), ("replyMarkup", replyMarkup as Any)]) case .inputBotInlineMessageMediaInvoice(let flags, let title, let description, let photo, let invoice, let payload, let provider, let providerData, let replyMarkup): - return ("inputBotInlineMessageMediaInvoice", [("flags", String(describing: flags)), ("title", String(describing: title)), ("description", String(describing: description)), ("photo", String(describing: photo)), ("invoice", String(describing: invoice)), ("payload", String(describing: payload)), ("provider", String(describing: provider)), ("providerData", String(describing: providerData)), ("replyMarkup", String(describing: replyMarkup))]) + return ("inputBotInlineMessageMediaInvoice", [("flags", flags as Any), ("title", title as Any), ("description", description as Any), ("photo", photo as Any), ("invoice", invoice as Any), ("payload", payload as Any), ("provider", provider as Any), ("providerData", providerData as Any), ("replyMarkup", replyMarkup as Any)]) case .inputBotInlineMessageMediaVenue(let flags, let geoPoint, let title, let address, let provider, let venueId, let venueType, let replyMarkup): - return ("inputBotInlineMessageMediaVenue", [("flags", String(describing: flags)), ("geoPoint", String(describing: geoPoint)), ("title", String(describing: title)), ("address", String(describing: address)), ("provider", String(describing: provider)), ("venueId", String(describing: venueId)), ("venueType", String(describing: venueType)), ("replyMarkup", String(describing: replyMarkup))]) + return ("inputBotInlineMessageMediaVenue", [("flags", flags as Any), ("geoPoint", geoPoint as Any), ("title", title as Any), ("address", address as Any), ("provider", provider as Any), ("venueId", venueId as Any), ("venueType", venueType as Any), ("replyMarkup", replyMarkup as Any)]) case .inputBotInlineMessageText(let flags, let message, let entities, let replyMarkup): - return ("inputBotInlineMessageText", [("flags", String(describing: flags)), ("message", String(describing: message)), ("entities", String(describing: entities)), ("replyMarkup", String(describing: replyMarkup))]) + return ("inputBotInlineMessageText", [("flags", flags as Any), ("message", message as Any), ("entities", entities as Any), ("replyMarkup", replyMarkup as Any)]) } } @@ -1216,9 +1216,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputBotInlineMessageID(let dcId, let id, let accessHash): - return ("inputBotInlineMessageID", [("dcId", String(describing: dcId)), ("id", String(describing: id)), ("accessHash", String(describing: accessHash))]) + return ("inputBotInlineMessageID", [("dcId", dcId as Any), ("id", id as Any), ("accessHash", accessHash as Any)]) case .inputBotInlineMessageID64(let dcId, let ownerId, let id, let accessHash): - return ("inputBotInlineMessageID64", [("dcId", String(describing: dcId)), ("ownerId", String(describing: ownerId)), ("id", String(describing: id)), ("accessHash", String(describing: accessHash))]) + return ("inputBotInlineMessageID64", [("dcId", dcId as Any), ("ownerId", ownerId as Any), ("id", id as Any), ("accessHash", accessHash as Any)]) } } @@ -1320,13 +1320,13 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputBotInlineResult(let flags, let id, let type, let title, let description, let url, let thumb, let content, let sendMessage): - return ("inputBotInlineResult", [("flags", String(describing: flags)), ("id", String(describing: id)), ("type", String(describing: type)), ("title", String(describing: title)), ("description", String(describing: description)), ("url", String(describing: url)), ("thumb", String(describing: thumb)), ("content", String(describing: content)), ("sendMessage", String(describing: sendMessage))]) + return ("inputBotInlineResult", [("flags", flags as Any), ("id", id as Any), ("type", type as Any), ("title", title as Any), ("description", description as Any), ("url", url as Any), ("thumb", thumb as Any), ("content", content as Any), ("sendMessage", sendMessage as Any)]) case .inputBotInlineResultDocument(let flags, let id, let type, let title, let description, let document, let sendMessage): - return ("inputBotInlineResultDocument", [("flags", String(describing: flags)), ("id", String(describing: id)), ("type", String(describing: type)), ("title", String(describing: title)), ("description", String(describing: description)), ("document", String(describing: document)), ("sendMessage", String(describing: sendMessage))]) + return ("inputBotInlineResultDocument", [("flags", flags as Any), ("id", id as Any), ("type", type as Any), ("title", title as Any), ("description", description as Any), ("document", document as Any), ("sendMessage", sendMessage as Any)]) case .inputBotInlineResultGame(let id, let shortName, let sendMessage): - return ("inputBotInlineResultGame", [("id", String(describing: id)), ("shortName", String(describing: shortName)), ("sendMessage", String(describing: sendMessage))]) + return ("inputBotInlineResultGame", [("id", id as Any), ("shortName", shortName as Any), ("sendMessage", sendMessage as Any)]) case .inputBotInlineResultPhoto(let id, let type, let photo, let sendMessage): - return ("inputBotInlineResultPhoto", [("id", String(describing: id)), ("type", String(describing: type)), ("photo", String(describing: photo)), ("sendMessage", String(describing: sendMessage))]) + return ("inputBotInlineResultPhoto", [("id", id as Any), ("type", type as Any), ("photo", photo as Any), ("sendMessage", sendMessage as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api7.swift b/submodules/TelegramApi/Sources/Api7.swift index 14d86d4ec5..a88a4dce08 100644 --- a/submodules/TelegramApi/Sources/Api7.swift +++ b/submodules/TelegramApi/Sources/Api7.swift @@ -33,11 +33,11 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputChannel(let channelId, let accessHash): - return ("inputChannel", [("channelId", String(describing: channelId)), ("accessHash", String(describing: accessHash))]) + return ("inputChannel", [("channelId", channelId as Any), ("accessHash", accessHash as Any)]) case .inputChannelEmpty: return ("inputChannelEmpty", []) case .inputChannelFromMessage(let peer, let msgId, let channelId): - return ("inputChannelFromMessage", [("peer", String(describing: peer)), ("msgId", String(describing: msgId)), ("channelId", String(describing: channelId))]) + return ("inputChannelFromMessage", [("peer", peer as Any), ("msgId", msgId as Any), ("channelId", channelId as Any)]) } } @@ -115,11 +115,11 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputChatPhoto(let id): - return ("inputChatPhoto", [("id", String(describing: id))]) + return ("inputChatPhoto", [("id", id as Any)]) case .inputChatPhotoEmpty: return ("inputChatPhotoEmpty", []) case .inputChatUploadedPhoto(let flags, let file, let video, let videoStartTs): - return ("inputChatUploadedPhoto", [("flags", String(describing: flags)), ("file", String(describing: file)), ("video", String(describing: video)), ("videoStartTs", String(describing: videoStartTs))]) + return ("inputChatUploadedPhoto", [("flags", flags as Any), ("file", file as Any), ("video", video as Any), ("videoStartTs", videoStartTs as Any)]) } } @@ -195,7 +195,7 @@ public extension Api { case .inputCheckPasswordEmpty: return ("inputCheckPasswordEmpty", []) case .inputCheckPasswordSRP(let srpId, let A, let M1): - return ("inputCheckPasswordSRP", [("srpId", String(describing: srpId)), ("A", String(describing: A)), ("M1", String(describing: M1))]) + return ("inputCheckPasswordSRP", [("srpId", srpId as Any), ("A", A as Any), ("M1", M1 as Any)]) } } @@ -241,7 +241,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputClientProxy(let address, let port): - return ("inputClientProxy", [("address", String(describing: address)), ("port", String(describing: port))]) + return ("inputClientProxy", [("address", address as Any), ("port", port as Any)]) } } @@ -283,7 +283,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputPhoneContact(let clientId, let phone, let firstName, let lastName): - return ("inputPhoneContact", [("clientId", String(describing: clientId)), ("phone", String(describing: phone)), ("firstName", String(describing: firstName)), ("lastName", String(describing: lastName))]) + return ("inputPhoneContact", [("clientId", clientId as Any), ("phone", phone as Any), ("firstName", firstName as Any), ("lastName", lastName as Any)]) } } @@ -335,9 +335,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputDialogPeer(let peer): - return ("inputDialogPeer", [("peer", String(describing: peer))]) + return ("inputDialogPeer", [("peer", peer as Any)]) case .inputDialogPeerFolder(let folderId): - return ("inputDialogPeerFolder", [("folderId", String(describing: folderId))]) + return ("inputDialogPeerFolder", [("folderId", folderId as Any)]) } } @@ -395,7 +395,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputDocument(let id, let accessHash, let fileReference): - return ("inputDocument", [("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("fileReference", String(describing: fileReference))]) + return ("inputDocument", [("id", id as Any), ("accessHash", accessHash as Any), ("fileReference", fileReference as Any)]) case .inputDocumentEmpty: return ("inputDocumentEmpty", []) } @@ -443,7 +443,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputEncryptedChat(let chatId, let accessHash): - return ("inputEncryptedChat", [("chatId", String(describing: chatId)), ("accessHash", String(describing: accessHash))]) + return ("inputEncryptedChat", [("chatId", chatId as Any), ("accessHash", accessHash as Any)]) } } @@ -509,13 +509,13 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputEncryptedFile(let id, let accessHash): - return ("inputEncryptedFile", [("id", String(describing: id)), ("accessHash", String(describing: accessHash))]) + return ("inputEncryptedFile", [("id", id as Any), ("accessHash", accessHash as Any)]) case .inputEncryptedFileBigUploaded(let id, let parts, let keyFingerprint): - return ("inputEncryptedFileBigUploaded", [("id", String(describing: id)), ("parts", String(describing: parts)), ("keyFingerprint", String(describing: keyFingerprint))]) + return ("inputEncryptedFileBigUploaded", [("id", id as Any), ("parts", parts as Any), ("keyFingerprint", keyFingerprint as Any)]) case .inputEncryptedFileEmpty: return ("inputEncryptedFileEmpty", []) case .inputEncryptedFileUploaded(let id, let parts, let md5Checksum, let keyFingerprint): - return ("inputEncryptedFileUploaded", [("id", String(describing: id)), ("parts", String(describing: parts)), ("md5Checksum", String(describing: md5Checksum)), ("keyFingerprint", String(describing: keyFingerprint))]) + return ("inputEncryptedFileUploaded", [("id", id as Any), ("parts", parts as Any), ("md5Checksum", md5Checksum as Any), ("keyFingerprint", keyFingerprint as Any)]) } } @@ -606,9 +606,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputFile(let id, let parts, let name, let md5Checksum): - return ("inputFile", [("id", String(describing: id)), ("parts", String(describing: parts)), ("name", String(describing: name)), ("md5Checksum", String(describing: md5Checksum))]) + return ("inputFile", [("id", id as Any), ("parts", parts as Any), ("name", name as Any), ("md5Checksum", md5Checksum as Any)]) case .inputFileBig(let id, let parts, let name): - return ("inputFileBig", [("id", String(describing: id)), ("parts", String(describing: parts)), ("name", String(describing: name))]) + return ("inputFileBig", [("id", id as Any), ("parts", parts as Any), ("name", name as Any)]) } } @@ -757,23 +757,23 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputDocumentFileLocation(let id, let accessHash, let fileReference, let thumbSize): - return ("inputDocumentFileLocation", [("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("fileReference", String(describing: fileReference)), ("thumbSize", String(describing: thumbSize))]) + return ("inputDocumentFileLocation", [("id", id as Any), ("accessHash", accessHash as Any), ("fileReference", fileReference as Any), ("thumbSize", thumbSize as Any)]) case .inputEncryptedFileLocation(let id, let accessHash): - return ("inputEncryptedFileLocation", [("id", String(describing: id)), ("accessHash", String(describing: accessHash))]) + return ("inputEncryptedFileLocation", [("id", id as Any), ("accessHash", accessHash as Any)]) case .inputFileLocation(let volumeId, let localId, let secret, let fileReference): - return ("inputFileLocation", [("volumeId", String(describing: volumeId)), ("localId", String(describing: localId)), ("secret", String(describing: secret)), ("fileReference", String(describing: fileReference))]) + return ("inputFileLocation", [("volumeId", volumeId as Any), ("localId", localId as Any), ("secret", secret as Any), ("fileReference", fileReference as Any)]) case .inputGroupCallStream(let flags, let call, let timeMs, let scale, let videoChannel, let videoQuality): - return ("inputGroupCallStream", [("flags", String(describing: flags)), ("call", String(describing: call)), ("timeMs", String(describing: timeMs)), ("scale", String(describing: scale)), ("videoChannel", String(describing: videoChannel)), ("videoQuality", String(describing: videoQuality))]) + return ("inputGroupCallStream", [("flags", flags as Any), ("call", call as Any), ("timeMs", timeMs as Any), ("scale", scale as Any), ("videoChannel", videoChannel as Any), ("videoQuality", videoQuality as Any)]) case .inputPeerPhotoFileLocation(let flags, let peer, let photoId): - return ("inputPeerPhotoFileLocation", [("flags", String(describing: flags)), ("peer", String(describing: peer)), ("photoId", String(describing: photoId))]) + return ("inputPeerPhotoFileLocation", [("flags", flags as Any), ("peer", peer as Any), ("photoId", photoId as Any)]) case .inputPhotoFileLocation(let id, let accessHash, let fileReference, let thumbSize): - return ("inputPhotoFileLocation", [("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("fileReference", String(describing: fileReference)), ("thumbSize", String(describing: thumbSize))]) + return ("inputPhotoFileLocation", [("id", id as Any), ("accessHash", accessHash as Any), ("fileReference", fileReference as Any), ("thumbSize", thumbSize as Any)]) case .inputPhotoLegacyFileLocation(let id, let accessHash, let fileReference, let volumeId, let localId, let secret): - return ("inputPhotoLegacyFileLocation", [("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("fileReference", String(describing: fileReference)), ("volumeId", String(describing: volumeId)), ("localId", String(describing: localId)), ("secret", String(describing: secret))]) + return ("inputPhotoLegacyFileLocation", [("id", id as Any), ("accessHash", accessHash as Any), ("fileReference", fileReference as Any), ("volumeId", volumeId as Any), ("localId", localId as Any), ("secret", secret as Any)]) case .inputSecureFileLocation(let id, let accessHash): - return ("inputSecureFileLocation", [("id", String(describing: id)), ("accessHash", String(describing: accessHash))]) + return ("inputSecureFileLocation", [("id", id as Any), ("accessHash", accessHash as Any)]) case .inputStickerSetThumb(let stickerset, let thumbVersion): - return ("inputStickerSetThumb", [("stickerset", String(describing: stickerset)), ("thumbVersion", String(describing: thumbVersion))]) + return ("inputStickerSetThumb", [("stickerset", stickerset as Any), ("thumbVersion", thumbVersion as Any)]) case .inputTakeoutFileLocation: return ("inputTakeoutFileLocation", []) } @@ -981,7 +981,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputFolderPeer(let peer, let folderId): - return ("inputFolderPeer", [("peer", String(describing: peer)), ("folderId", String(describing: folderId))]) + return ("inputFolderPeer", [("peer", peer as Any), ("folderId", folderId as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api8.swift b/submodules/TelegramApi/Sources/Api8.swift index 89c644924e..67f940676e 100644 --- a/submodules/TelegramApi/Sources/Api8.swift +++ b/submodules/TelegramApi/Sources/Api8.swift @@ -25,9 +25,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputGameID(let id, let accessHash): - return ("inputGameID", [("id", String(describing: id)), ("accessHash", String(describing: accessHash))]) + return ("inputGameID", [("id", id as Any), ("accessHash", accessHash as Any)]) case .inputGameShortName(let botId, let shortName): - return ("inputGameShortName", [("botId", String(describing: botId)), ("shortName", String(describing: shortName))]) + return ("inputGameShortName", [("botId", botId as Any), ("shortName", shortName as Any)]) } } @@ -92,7 +92,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputGeoPoint(let flags, let lat, let long, let accuracyRadius): - return ("inputGeoPoint", [("flags", String(describing: flags)), ("lat", String(describing: lat)), ("long", String(describing: long)), ("accuracyRadius", String(describing: accuracyRadius))]) + return ("inputGeoPoint", [("flags", flags as Any), ("lat", lat as Any), ("long", long as Any), ("accuracyRadius", accuracyRadius as Any)]) case .inputGeoPointEmpty: return ("inputGeoPointEmpty", []) } @@ -143,7 +143,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputGroupCall(let id, let accessHash): - return ("inputGroupCall", [("id", String(describing: id)), ("accessHash", String(describing: accessHash))]) + return ("inputGroupCall", [("id", id as Any), ("accessHash", accessHash as Any)]) } } @@ -190,9 +190,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputInvoiceMessage(let peer, let msgId): - return ("inputInvoiceMessage", [("peer", String(describing: peer)), ("msgId", String(describing: msgId))]) + return ("inputInvoiceMessage", [("peer", peer as Any), ("msgId", msgId as Any)]) case .inputInvoiceSlug(let slug): - return ("inputInvoiceSlug", [("slug", String(describing: slug))]) + return ("inputInvoiceSlug", [("slug", slug as Any)]) } } @@ -405,35 +405,35 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputMediaContact(let phoneNumber, let firstName, let lastName, let vcard): - return ("inputMediaContact", [("phoneNumber", String(describing: phoneNumber)), ("firstName", String(describing: firstName)), ("lastName", String(describing: lastName)), ("vcard", String(describing: vcard))]) + return ("inputMediaContact", [("phoneNumber", phoneNumber as Any), ("firstName", firstName as Any), ("lastName", lastName as Any), ("vcard", vcard as Any)]) case .inputMediaDice(let emoticon): - return ("inputMediaDice", [("emoticon", String(describing: emoticon))]) + return ("inputMediaDice", [("emoticon", emoticon as Any)]) case .inputMediaDocument(let flags, let id, let ttlSeconds, let query): - return ("inputMediaDocument", [("flags", String(describing: flags)), ("id", String(describing: id)), ("ttlSeconds", String(describing: ttlSeconds)), ("query", String(describing: query))]) + return ("inputMediaDocument", [("flags", flags as Any), ("id", id as Any), ("ttlSeconds", ttlSeconds as Any), ("query", query as Any)]) case .inputMediaDocumentExternal(let flags, let url, let ttlSeconds): - return ("inputMediaDocumentExternal", [("flags", String(describing: flags)), ("url", String(describing: url)), ("ttlSeconds", String(describing: ttlSeconds))]) + return ("inputMediaDocumentExternal", [("flags", flags as Any), ("url", url as Any), ("ttlSeconds", ttlSeconds as Any)]) case .inputMediaEmpty: return ("inputMediaEmpty", []) case .inputMediaGame(let id): - return ("inputMediaGame", [("id", String(describing: id))]) + return ("inputMediaGame", [("id", id as Any)]) case .inputMediaGeoLive(let flags, let geoPoint, let heading, let period, let proximityNotificationRadius): - return ("inputMediaGeoLive", [("flags", String(describing: flags)), ("geoPoint", String(describing: geoPoint)), ("heading", String(describing: heading)), ("period", String(describing: period)), ("proximityNotificationRadius", String(describing: proximityNotificationRadius))]) + return ("inputMediaGeoLive", [("flags", flags as Any), ("geoPoint", geoPoint as Any), ("heading", heading as Any), ("period", period as Any), ("proximityNotificationRadius", proximityNotificationRadius as Any)]) case .inputMediaGeoPoint(let geoPoint): - return ("inputMediaGeoPoint", [("geoPoint", String(describing: geoPoint))]) + return ("inputMediaGeoPoint", [("geoPoint", geoPoint as Any)]) case .inputMediaInvoice(let flags, let title, let description, let photo, let invoice, let payload, let provider, let providerData, let startParam, let extendedMedia): - return ("inputMediaInvoice", [("flags", String(describing: flags)), ("title", String(describing: title)), ("description", String(describing: description)), ("photo", String(describing: photo)), ("invoice", String(describing: invoice)), ("payload", String(describing: payload)), ("provider", String(describing: provider)), ("providerData", String(describing: providerData)), ("startParam", String(describing: startParam)), ("extendedMedia", String(describing: extendedMedia))]) + return ("inputMediaInvoice", [("flags", flags as Any), ("title", title as Any), ("description", description as Any), ("photo", photo as Any), ("invoice", invoice as Any), ("payload", payload as Any), ("provider", provider as Any), ("providerData", providerData as Any), ("startParam", startParam as Any), ("extendedMedia", extendedMedia as Any)]) case .inputMediaPhoto(let flags, let id, let ttlSeconds): - return ("inputMediaPhoto", [("flags", String(describing: flags)), ("id", String(describing: id)), ("ttlSeconds", String(describing: ttlSeconds))]) + return ("inputMediaPhoto", [("flags", flags as Any), ("id", id as Any), ("ttlSeconds", ttlSeconds as Any)]) case .inputMediaPhotoExternal(let flags, let url, let ttlSeconds): - return ("inputMediaPhotoExternal", [("flags", String(describing: flags)), ("url", String(describing: url)), ("ttlSeconds", String(describing: ttlSeconds))]) + return ("inputMediaPhotoExternal", [("flags", flags as Any), ("url", url as Any), ("ttlSeconds", ttlSeconds as Any)]) case .inputMediaPoll(let flags, let poll, let correctAnswers, let solution, let solutionEntities): - return ("inputMediaPoll", [("flags", String(describing: flags)), ("poll", String(describing: poll)), ("correctAnswers", String(describing: correctAnswers)), ("solution", String(describing: solution)), ("solutionEntities", String(describing: solutionEntities))]) + return ("inputMediaPoll", [("flags", flags as Any), ("poll", poll as Any), ("correctAnswers", correctAnswers as Any), ("solution", solution as Any), ("solutionEntities", solutionEntities as Any)]) case .inputMediaUploadedDocument(let flags, let file, let thumb, let mimeType, let attributes, let stickers, let ttlSeconds): - return ("inputMediaUploadedDocument", [("flags", String(describing: flags)), ("file", String(describing: file)), ("thumb", String(describing: thumb)), ("mimeType", String(describing: mimeType)), ("attributes", String(describing: attributes)), ("stickers", String(describing: stickers)), ("ttlSeconds", String(describing: ttlSeconds))]) + return ("inputMediaUploadedDocument", [("flags", flags as Any), ("file", file as Any), ("thumb", thumb as Any), ("mimeType", mimeType as Any), ("attributes", attributes as Any), ("stickers", stickers as Any), ("ttlSeconds", ttlSeconds as Any)]) case .inputMediaUploadedPhoto(let flags, let file, let stickers, let ttlSeconds): - return ("inputMediaUploadedPhoto", [("flags", String(describing: flags)), ("file", String(describing: file)), ("stickers", String(describing: stickers)), ("ttlSeconds", String(describing: ttlSeconds))]) + return ("inputMediaUploadedPhoto", [("flags", flags as Any), ("file", file as Any), ("stickers", stickers as Any), ("ttlSeconds", ttlSeconds as Any)]) case .inputMediaVenue(let geoPoint, let title, let address, let provider, let venueId, let venueType): - return ("inputMediaVenue", [("geoPoint", String(describing: geoPoint)), ("title", String(describing: title)), ("address", String(describing: address)), ("provider", String(describing: provider)), ("venueId", String(describing: venueId)), ("venueType", String(describing: venueType))]) + return ("inputMediaVenue", [("geoPoint", geoPoint as Any), ("title", title as Any), ("address", address as Any), ("provider", provider as Any), ("venueId", venueId as Any), ("venueType", venueType as Any)]) } } @@ -804,13 +804,13 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputMessageCallbackQuery(let id, let queryId): - return ("inputMessageCallbackQuery", [("id", String(describing: id)), ("queryId", String(describing: queryId))]) + return ("inputMessageCallbackQuery", [("id", id as Any), ("queryId", queryId as Any)]) case .inputMessageID(let id): - return ("inputMessageID", [("id", String(describing: id))]) + return ("inputMessageID", [("id", id as Any)]) case .inputMessagePinned: return ("inputMessagePinned", []) case .inputMessageReplyTo(let id): - return ("inputMessageReplyTo", [("id", String(describing: id))]) + return ("inputMessageReplyTo", [("id", id as Any)]) } } @@ -907,9 +907,9 @@ public extension Api { case .inputNotifyChats: return ("inputNotifyChats", []) case .inputNotifyForumTopic(let peer, let topMsgId): - return ("inputNotifyForumTopic", [("peer", String(describing: peer)), ("topMsgId", String(describing: topMsgId))]) + return ("inputNotifyForumTopic", [("peer", peer as Any), ("topMsgId", topMsgId as Any)]) case .inputNotifyPeer(let peer): - return ("inputNotifyPeer", [("peer", String(describing: peer))]) + return ("inputNotifyPeer", [("peer", peer as Any)]) case .inputNotifyUsers: return ("inputNotifyUsers", []) } @@ -997,13 +997,13 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputPaymentCredentials(let flags, let data): - return ("inputPaymentCredentials", [("flags", String(describing: flags)), ("data", String(describing: data))]) + return ("inputPaymentCredentials", [("flags", flags as Any), ("data", data as Any)]) case .inputPaymentCredentialsApplePay(let paymentData): - return ("inputPaymentCredentialsApplePay", [("paymentData", String(describing: paymentData))]) + return ("inputPaymentCredentialsApplePay", [("paymentData", paymentData as Any)]) case .inputPaymentCredentialsGooglePay(let paymentToken): - return ("inputPaymentCredentialsGooglePay", [("paymentToken", String(describing: paymentToken))]) + return ("inputPaymentCredentialsGooglePay", [("paymentToken", paymentToken as Any)]) case .inputPaymentCredentialsSaved(let id, let tmpPassword): - return ("inputPaymentCredentialsSaved", [("id", String(describing: id)), ("tmpPassword", String(describing: tmpPassword))]) + return ("inputPaymentCredentialsSaved", [("id", id as Any), ("tmpPassword", tmpPassword as Any)]) } } diff --git a/submodules/TelegramApi/Sources/Api9.swift b/submodules/TelegramApi/Sources/Api9.swift index dab267e25b..4c60320822 100644 --- a/submodules/TelegramApi/Sources/Api9.swift +++ b/submodules/TelegramApi/Sources/Api9.swift @@ -64,19 +64,19 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputPeerChannel(let channelId, let accessHash): - return ("inputPeerChannel", [("channelId", String(describing: channelId)), ("accessHash", String(describing: accessHash))]) + return ("inputPeerChannel", [("channelId", channelId as Any), ("accessHash", accessHash as Any)]) case .inputPeerChannelFromMessage(let peer, let msgId, let channelId): - return ("inputPeerChannelFromMessage", [("peer", String(describing: peer)), ("msgId", String(describing: msgId)), ("channelId", String(describing: channelId))]) + return ("inputPeerChannelFromMessage", [("peer", peer as Any), ("msgId", msgId as Any), ("channelId", channelId as Any)]) case .inputPeerChat(let chatId): - return ("inputPeerChat", [("chatId", String(describing: chatId))]) + return ("inputPeerChat", [("chatId", chatId as Any)]) case .inputPeerEmpty: return ("inputPeerEmpty", []) case .inputPeerSelf: return ("inputPeerSelf", []) case .inputPeerUser(let userId, let accessHash): - return ("inputPeerUser", [("userId", String(describing: userId)), ("accessHash", String(describing: accessHash))]) + return ("inputPeerUser", [("userId", userId as Any), ("accessHash", accessHash as Any)]) case .inputPeerUserFromMessage(let peer, let msgId, let userId): - return ("inputPeerUserFromMessage", [("peer", String(describing: peer)), ("msgId", String(describing: msgId)), ("userId", String(describing: userId))]) + return ("inputPeerUserFromMessage", [("peer", peer as Any), ("msgId", msgId as Any), ("userId", userId as Any)]) } } @@ -188,7 +188,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputPeerNotifySettings(let flags, let showPreviews, let silent, let muteUntil, let sound): - return ("inputPeerNotifySettings", [("flags", String(describing: flags)), ("showPreviews", String(describing: showPreviews)), ("silent", String(describing: silent)), ("muteUntil", String(describing: muteUntil)), ("sound", String(describing: sound))]) + return ("inputPeerNotifySettings", [("flags", flags as Any), ("showPreviews", showPreviews as Any), ("silent", silent as Any), ("muteUntil", muteUntil as Any), ("sound", sound as Any)]) } } @@ -243,7 +243,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputPhoneCall(let id, let accessHash): - return ("inputPhoneCall", [("id", String(describing: id)), ("accessHash", String(describing: accessHash))]) + return ("inputPhoneCall", [("id", id as Any), ("accessHash", accessHash as Any)]) } } @@ -291,7 +291,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputPhoto(let id, let accessHash, let fileReference): - return ("inputPhoto", [("id", String(describing: id)), ("accessHash", String(describing: accessHash)), ("fileReference", String(describing: fileReference))]) + return ("inputPhoto", [("id", id as Any), ("accessHash", accessHash as Any), ("fileReference", fileReference as Any)]) case .inputPhotoEmpty: return ("inputPhotoEmpty", []) } @@ -529,19 +529,19 @@ public extension Api { case .inputPrivacyValueAllowAll: return ("inputPrivacyValueAllowAll", []) case .inputPrivacyValueAllowChatParticipants(let chats): - return ("inputPrivacyValueAllowChatParticipants", [("chats", String(describing: chats))]) + return ("inputPrivacyValueAllowChatParticipants", [("chats", chats as Any)]) case .inputPrivacyValueAllowContacts: return ("inputPrivacyValueAllowContacts", []) case .inputPrivacyValueAllowUsers(let users): - return ("inputPrivacyValueAllowUsers", [("users", String(describing: users))]) + return ("inputPrivacyValueAllowUsers", [("users", users as Any)]) case .inputPrivacyValueDisallowAll: return ("inputPrivacyValueDisallowAll", []) case .inputPrivacyValueDisallowChatParticipants(let chats): - return ("inputPrivacyValueDisallowChatParticipants", [("chats", String(describing: chats))]) + return ("inputPrivacyValueDisallowChatParticipants", [("chats", chats as Any)]) case .inputPrivacyValueDisallowContacts: return ("inputPrivacyValueDisallowContacts", []) case .inputPrivacyValueDisallowUsers(let users): - return ("inputPrivacyValueDisallowUsers", [("users", String(describing: users))]) + return ("inputPrivacyValueDisallowUsers", [("users", users as Any)]) } } @@ -642,9 +642,9 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputSecureFile(let id, let accessHash): - return ("inputSecureFile", [("id", String(describing: id)), ("accessHash", String(describing: accessHash))]) + return ("inputSecureFile", [("id", id as Any), ("accessHash", accessHash as Any)]) case .inputSecureFileUploaded(let id, let parts, let md5Checksum, let fileHash, let secret): - return ("inputSecureFileUploaded", [("id", String(describing: id)), ("parts", String(describing: parts)), ("md5Checksum", String(describing: md5Checksum)), ("fileHash", String(describing: fileHash)), ("secret", String(describing: secret))]) + return ("inputSecureFileUploaded", [("id", id as Any), ("parts", parts as Any), ("md5Checksum", md5Checksum as Any), ("fileHash", fileHash as Any), ("secret", secret as Any)]) } } @@ -722,7 +722,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputSecureValue(let flags, let type, let data, let frontSide, let reverseSide, let selfie, let translation, let files, let plainData): - return ("inputSecureValue", [("flags", String(describing: flags)), ("type", String(describing: type)), ("data", String(describing: data)), ("frontSide", String(describing: frontSide)), ("reverseSide", String(describing: reverseSide)), ("selfie", String(describing: selfie)), ("translation", String(describing: translation)), ("files", String(describing: files)), ("plainData", String(describing: plainData))]) + return ("inputSecureValue", [("flags", flags as Any), ("type", type as Any), ("data", data as Any), ("frontSide", frontSide as Any), ("reverseSide", reverseSide as Any), ("selfie", selfie as Any), ("translation", translation as Any), ("files", files as Any), ("plainData", plainData as Any)]) } } @@ -806,7 +806,7 @@ public extension Api { public func descriptionFields() -> (String, [(String, Any)]) { switch self { case .inputSingleMedia(let flags, let media, let randomId, let message, let entities): - return ("inputSingleMedia", [("flags", String(describing: flags)), ("media", String(describing: media)), ("randomId", String(describing: randomId)), ("message", String(describing: message)), ("entities", String(describing: entities))]) + return ("inputSingleMedia", [("flags", flags as Any), ("media", media as Any), ("randomId", randomId as Any), ("message", message as Any), ("entities", entities as Any)]) } } diff --git a/submodules/TelegramCore/Sources/Network/MultipartFetch.swift b/submodules/TelegramCore/Sources/Network/MultipartFetch.swift index e75d0afc6b..36ca2f18db 100644 --- a/submodules/TelegramCore/Sources/Network/MultipartFetch.swift +++ b/submodules/TelegramCore/Sources/Network/MultipartFetch.swift @@ -532,18 +532,62 @@ private final class MultipartFetchManager { self.reportCompleteSize = reportCompleteSize self.finishWithError = finishWithError - self.rangesDisposable = (intervals - |> deliverOn(self.queue)).start(next: { [weak self] intervals in - if let strongSelf = self { - if let _ = strongSelf.currentIntervals { - strongSelf.currentIntervals = intervals - strongSelf.checkState() - } else { - strongSelf.currentIntervals = intervals - strongSelf.checkState() + /*if resource.id.stringRepresentation == "telegram-cloud-document-1-4922941873166746479" { + let tempRanges = Promise<[(Range, MediaBoxFetchPriority)]>() + + tempRanges.set(.single([(0 ..< Int64.max, .default)])) + Thread(block: { + for i in 0 ..< 10 { + Thread.sleep(forTimeInterval: 0.1) + + var randomSet = RangeSet() + if i % 2 == 0 { + for _ in 0 ..< 10 { + let lower: Int64 = Int64.random(in: 0 ..< 4980736 + 131072) + let upper: Int64 = Int64.random(in: lower ..< (lower + 1234)) + randomSet.insert(contentsOf: lower ..< upper) + var ranges: [(Range, MediaBoxFetchPriority)] = [] + for range in randomSet.ranges { + ranges.append((range, .default)) + } + tempRanges.set(.single(ranges)) + } + } } - } - }) + + Thread.sleep(forTimeInterval: 0.1) + tempRanges.set(.single([])) + + Thread.sleep(forTimeInterval: 5.0) + tempRanges.set(.single([(0 ..< Int64.max, .default)])) + }).start() + + self.rangesDisposable = (tempRanges.get() + |> deliverOn(self.queue)).start(next: { [weak self] intervals in + if let strongSelf = self { + if let _ = strongSelf.currentIntervals { + strongSelf.currentIntervals = intervals + strongSelf.checkState() + } else { + strongSelf.currentIntervals = intervals + strongSelf.checkState() + } + } + }) + } else {*/ + self.rangesDisposable = (intervals + |> deliverOn(self.queue)).start(next: { [weak self] intervals in + if let strongSelf = self { + if let _ = strongSelf.currentIntervals { + strongSelf.currentIntervals = intervals + strongSelf.checkState() + } else { + strongSelf.currentIntervals = intervals + strongSelf.checkState() + } + } + }) + //} /*self.markSpeedRecord() self.speedTimer = SwiftSignalKit.Timer(timeout: 1.0, repeat: true, completion: { [weak self] in @@ -824,7 +868,20 @@ public func resourceFetchInfo(resource: TelegramMediaResource) -> MediaResourceF ) } -func multipartFetch(postbox: Postbox, network: Network, mediaReferenceRevalidationContext: MediaReferenceRevalidationContext?, resource: TelegramMediaResource, datacenterId: Int, size: Int64?, intervals: Signal<[(Range, MediaBoxFetchPriority)], NoError>, parameters: MediaResourceFetchParameters?, encryptionKey: SecretFileEncryptionKey? = nil, decryptedSize: Int64? = nil, continueInBackground: Bool = false, useMainConnection: Bool = false) -> Signal { +func multipartFetch( + postbox: Postbox, + network: Network, + mediaReferenceRevalidationContext: MediaReferenceRevalidationContext?, + resource: TelegramMediaResource, + datacenterId: Int, + size: Int64?, + intervals: Signal<[(Range, MediaBoxFetchPriority)], NoError>, + parameters: MediaResourceFetchParameters?, + encryptionKey: SecretFileEncryptionKey? = nil, + decryptedSize: Int64? = nil, + continueInBackground: Bool = false, + useMainConnection: Bool = false +) -> Signal { return Signal { subscriber in let location: MultipartFetchMasterLocation if let resource = resource as? MediaResourceWithWebFileReference { @@ -886,7 +943,7 @@ func multipartFetch(postbox: Postbox, network: Network, mediaReferenceRevalidati subscriber.putNext(.dataPart(resourceOffset: dataOffset, data: data, range: 0 ..< Int64(data.count), complete: false)) }, reportCompleteSize: { size in subscriber.putNext(.resourceSizeUpdated(size)) - subscriber.putCompletion() + //subscriber.putCompletion() }, finishWithError: { error in subscriber.putError(error) }, useMainConnection: useMainConnection)