mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 11:23:48 +00:00
Update API
This commit is contained in:
parent
313ccd7831
commit
1b9b272b8a
@ -204,7 +204,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
|
|||||||
dict[1605510357] = { return Api.ChatAdminRights.parse_chatAdminRights($0) }
|
dict[1605510357] = { return Api.ChatAdminRights.parse_chatAdminRights($0) }
|
||||||
dict[-219353309] = { return Api.ChatAdminWithInvites.parse_chatAdminWithInvites($0) }
|
dict[-219353309] = { return Api.ChatAdminWithInvites.parse_chatAdminWithInvites($0) }
|
||||||
dict[-1626209256] = { return Api.ChatBannedRights.parse_chatBannedRights($0) }
|
dict[-1626209256] = { return Api.ChatBannedRights.parse_chatBannedRights($0) }
|
||||||
dict[-529258018] = { return Api.ChatFull.parse_channelFull($0) }
|
dict[-1705864337] = { return Api.ChatFull.parse_channelFull($0) }
|
||||||
dict[640893467] = { return Api.ChatFull.parse_chatFull($0) }
|
dict[640893467] = { return Api.ChatFull.parse_chatFull($0) }
|
||||||
dict[1553807106] = { return Api.ChatInvite.parse_chatInvite($0) }
|
dict[1553807106] = { return Api.ChatInvite.parse_chatInvite($0) }
|
||||||
dict[1516793212] = { return Api.ChatInvite.parse_chatInviteAlready($0) }
|
dict[1516793212] = { return Api.ChatInvite.parse_chatInviteAlready($0) }
|
||||||
@ -816,6 +816,8 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
|
|||||||
dict[1103656293] = { return Api.PrivacyRule.parse_privacyValueDisallowChatParticipants($0) }
|
dict[1103656293] = { return Api.PrivacyRule.parse_privacyValueDisallowChatParticipants($0) }
|
||||||
dict[-125240806] = { return Api.PrivacyRule.parse_privacyValueDisallowContacts($0) }
|
dict[-125240806] = { return Api.PrivacyRule.parse_privacyValueDisallowContacts($0) }
|
||||||
dict[-463335103] = { return Api.PrivacyRule.parse_privacyValueDisallowUsers($0) }
|
dict[-463335103] = { return Api.PrivacyRule.parse_privacyValueDisallowUsers($0) }
|
||||||
|
dict[1296815210] = { return Api.ProfileTab.parse_profileTabGifts($0) }
|
||||||
|
dict[-1181952362] = { return Api.ProfileTab.parse_profileTabPosts($0) }
|
||||||
dict[32685898] = { return Api.PublicForward.parse_publicForwardMessage($0) }
|
dict[32685898] = { return Api.PublicForward.parse_publicForwardMessage($0) }
|
||||||
dict[-302797360] = { return Api.PublicForward.parse_publicForwardStory($0) }
|
dict[-302797360] = { return Api.PublicForward.parse_publicForwardStory($0) }
|
||||||
dict[110563371] = { return Api.QuickReply.parse_quickReply($0) }
|
dict[110563371] = { return Api.QuickReply.parse_quickReply($0) }
|
||||||
@ -933,6 +935,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
|
|||||||
dict[-718310409] = { return Api.SendMessageAction.parse_sendMessageRecordAudioAction($0) }
|
dict[-718310409] = { return Api.SendMessageAction.parse_sendMessageRecordAudioAction($0) }
|
||||||
dict[-1997373508] = { return Api.SendMessageAction.parse_sendMessageRecordRoundAction($0) }
|
dict[-1997373508] = { return Api.SendMessageAction.parse_sendMessageRecordRoundAction($0) }
|
||||||
dict[-1584933265] = { return Api.SendMessageAction.parse_sendMessageRecordVideoAction($0) }
|
dict[-1584933265] = { return Api.SendMessageAction.parse_sendMessageRecordVideoAction($0) }
|
||||||
|
dict[929929052] = { return Api.SendMessageAction.parse_sendMessageTextDraftAction($0) }
|
||||||
dict[381645902] = { return Api.SendMessageAction.parse_sendMessageTypingAction($0) }
|
dict[381645902] = { return Api.SendMessageAction.parse_sendMessageTypingAction($0) }
|
||||||
dict[-212740181] = { return Api.SendMessageAction.parse_sendMessageUploadAudioAction($0) }
|
dict[-212740181] = { return Api.SendMessageAction.parse_sendMessageUploadAudioAction($0) }
|
||||||
dict[-1441998364] = { return Api.SendMessageAction.parse_sendMessageUploadDocumentAction($0) }
|
dict[-1441998364] = { return Api.SendMessageAction.parse_sendMessageUploadDocumentAction($0) }
|
||||||
@ -1182,7 +1185,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
|
|||||||
dict[-1831650802] = { return Api.UrlAuthResult.parse_urlAuthResultRequest($0) }
|
dict[-1831650802] = { return Api.UrlAuthResult.parse_urlAuthResultRequest($0) }
|
||||||
dict[34280482] = { return Api.User.parse_user($0) }
|
dict[34280482] = { return Api.User.parse_user($0) }
|
||||||
dict[-742634630] = { return Api.User.parse_userEmpty($0) }
|
dict[-742634630] = { return Api.User.parse_userEmpty($0) }
|
||||||
dict[-510712709] = { return Api.UserFull.parse_userFull($0) }
|
dict[-116852838] = { return Api.UserFull.parse_userFull($0) }
|
||||||
dict[-2100168954] = { return Api.UserProfilePhoto.parse_userProfilePhoto($0) }
|
dict[-2100168954] = { return Api.UserProfilePhoto.parse_userProfilePhoto($0) }
|
||||||
dict[1326562017] = { return Api.UserProfilePhoto.parse_userProfilePhotoEmpty($0) }
|
dict[1326562017] = { return Api.UserProfilePhoto.parse_userProfilePhotoEmpty($0) }
|
||||||
dict[164646985] = { return Api.UserStatus.parse_userStatusEmpty($0) }
|
dict[164646985] = { return Api.UserStatus.parse_userStatusEmpty($0) }
|
||||||
@ -1505,6 +1508,8 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
|
|||||||
dict[157948117] = { return Api.upload.File.parse_file($0) }
|
dict[157948117] = { return Api.upload.File.parse_file($0) }
|
||||||
dict[-242427324] = { return Api.upload.File.parse_fileCdnRedirect($0) }
|
dict[-242427324] = { return Api.upload.File.parse_fileCdnRedirect($0) }
|
||||||
dict[568808380] = { return Api.upload.WebFile.parse_webFile($0) }
|
dict[568808380] = { return Api.upload.WebFile.parse_webFile($0) }
|
||||||
|
dict[883094167] = { return Api.users.SavedMusic.parse_savedMusic($0) }
|
||||||
|
dict[-477656412] = { return Api.users.SavedMusic.parse_savedMusicNotModified($0) }
|
||||||
dict[997004590] = { return Api.users.UserFull.parse_userFull($0) }
|
dict[997004590] = { return Api.users.UserFull.parse_userFull($0) }
|
||||||
dict[1658259128] = { return Api.users.Users.parse_users($0) }
|
dict[1658259128] = { return Api.users.Users.parse_users($0) }
|
||||||
dict[828000628] = { return Api.users.Users.parse_usersSlice($0) }
|
dict[828000628] = { return Api.users.Users.parse_usersSlice($0) }
|
||||||
@ -2061,6 +2066,8 @@ public extension Api {
|
|||||||
_1.serialize(buffer, boxed)
|
_1.serialize(buffer, boxed)
|
||||||
case let _1 as Api.PrivacyRule:
|
case let _1 as Api.PrivacyRule:
|
||||||
_1.serialize(buffer, boxed)
|
_1.serialize(buffer, boxed)
|
||||||
|
case let _1 as Api.ProfileTab:
|
||||||
|
_1.serialize(buffer, boxed)
|
||||||
case let _1 as Api.PublicForward:
|
case let _1 as Api.PublicForward:
|
||||||
_1.serialize(buffer, boxed)
|
_1.serialize(buffer, boxed)
|
||||||
case let _1 as Api.QuickReply:
|
case let _1 as Api.QuickReply:
|
||||||
@ -2657,6 +2664,8 @@ public extension Api {
|
|||||||
_1.serialize(buffer, boxed)
|
_1.serialize(buffer, boxed)
|
||||||
case let _1 as Api.upload.WebFile:
|
case let _1 as Api.upload.WebFile:
|
||||||
_1.serialize(buffer, boxed)
|
_1.serialize(buffer, boxed)
|
||||||
|
case let _1 as Api.users.SavedMusic:
|
||||||
|
_1.serialize(buffer, boxed)
|
||||||
case let _1 as Api.users.UserFull:
|
case let _1 as Api.users.UserFull:
|
||||||
_1.serialize(buffer, boxed)
|
_1.serialize(buffer, boxed)
|
||||||
case let _1 as Api.users.Users:
|
case let _1 as Api.users.Users:
|
||||||
|
@ -214,6 +214,46 @@ public extension Api {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public extension Api {
|
||||||
|
enum ProfileTab: TypeConstructorDescription {
|
||||||
|
case profileTabGifts
|
||||||
|
case profileTabPosts
|
||||||
|
|
||||||
|
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||||
|
switch self {
|
||||||
|
case .profileTabGifts:
|
||||||
|
if boxed {
|
||||||
|
buffer.appendInt32(1296815210)
|
||||||
|
}
|
||||||
|
|
||||||
|
break
|
||||||
|
case .profileTabPosts:
|
||||||
|
if boxed {
|
||||||
|
buffer.appendInt32(-1181952362)
|
||||||
|
}
|
||||||
|
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public func descriptionFields() -> (String, [(String, Any)]) {
|
||||||
|
switch self {
|
||||||
|
case .profileTabGifts:
|
||||||
|
return ("profileTabGifts", [])
|
||||||
|
case .profileTabPosts:
|
||||||
|
return ("profileTabPosts", [])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static func parse_profileTabGifts(_ reader: BufferReader) -> ProfileTab? {
|
||||||
|
return Api.ProfileTab.profileTabGifts
|
||||||
|
}
|
||||||
|
public static func parse_profileTabPosts(_ reader: BufferReader) -> ProfileTab? {
|
||||||
|
return Api.ProfileTab.profileTabPosts
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
public extension Api {
|
public extension Api {
|
||||||
indirect enum PublicForward: TypeConstructorDescription {
|
indirect enum PublicForward: TypeConstructorDescription {
|
||||||
case publicForwardMessage(message: Api.Message)
|
case publicForwardMessage(message: Api.Message)
|
||||||
@ -774,123 +814,3 @@ public extension Api {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public extension Api {
|
|
||||||
enum ReplyMarkup: TypeConstructorDescription {
|
|
||||||
case replyInlineMarkup(rows: [Api.KeyboardButtonRow])
|
|
||||||
case replyKeyboardForceReply(flags: Int32, placeholder: String?)
|
|
||||||
case replyKeyboardHide(flags: Int32)
|
|
||||||
case replyKeyboardMarkup(flags: Int32, rows: [Api.KeyboardButtonRow], placeholder: String?)
|
|
||||||
|
|
||||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
|
||||||
switch self {
|
|
||||||
case .replyInlineMarkup(let rows):
|
|
||||||
if boxed {
|
|
||||||
buffer.appendInt32(1218642516)
|
|
||||||
}
|
|
||||||
buffer.appendInt32(481674261)
|
|
||||||
buffer.appendInt32(Int32(rows.count))
|
|
||||||
for item in rows {
|
|
||||||
item.serialize(buffer, true)
|
|
||||||
}
|
|
||||||
break
|
|
||||||
case .replyKeyboardForceReply(let flags, let placeholder):
|
|
||||||
if boxed {
|
|
||||||
buffer.appendInt32(-2035021048)
|
|
||||||
}
|
|
||||||
serializeInt32(flags, buffer: buffer, boxed: false)
|
|
||||||
if Int(flags) & Int(1 << 3) != 0 {serializeString(placeholder!, buffer: buffer, boxed: false)}
|
|
||||||
break
|
|
||||||
case .replyKeyboardHide(let flags):
|
|
||||||
if boxed {
|
|
||||||
buffer.appendInt32(-1606526075)
|
|
||||||
}
|
|
||||||
serializeInt32(flags, buffer: buffer, boxed: false)
|
|
||||||
break
|
|
||||||
case .replyKeyboardMarkup(let flags, let rows, let placeholder):
|
|
||||||
if boxed {
|
|
||||||
buffer.appendInt32(-2049074735)
|
|
||||||
}
|
|
||||||
serializeInt32(flags, buffer: buffer, boxed: false)
|
|
||||||
buffer.appendInt32(481674261)
|
|
||||||
buffer.appendInt32(Int32(rows.count))
|
|
||||||
for item in rows {
|
|
||||||
item.serialize(buffer, true)
|
|
||||||
}
|
|
||||||
if Int(flags) & Int(1 << 3) != 0 {serializeString(placeholder!, buffer: buffer, boxed: false)}
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public func descriptionFields() -> (String, [(String, Any)]) {
|
|
||||||
switch self {
|
|
||||||
case .replyInlineMarkup(let rows):
|
|
||||||
return ("replyInlineMarkup", [("rows", rows as Any)])
|
|
||||||
case .replyKeyboardForceReply(let flags, let placeholder):
|
|
||||||
return ("replyKeyboardForceReply", [("flags", flags as Any), ("placeholder", placeholder as Any)])
|
|
||||||
case .replyKeyboardHide(let flags):
|
|
||||||
return ("replyKeyboardHide", [("flags", flags as Any)])
|
|
||||||
case .replyKeyboardMarkup(let flags, let rows, let placeholder):
|
|
||||||
return ("replyKeyboardMarkup", [("flags", flags as Any), ("rows", rows as Any), ("placeholder", placeholder as Any)])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static func parse_replyInlineMarkup(_ reader: BufferReader) -> ReplyMarkup? {
|
|
||||||
var _1: [Api.KeyboardButtonRow]?
|
|
||||||
if let _ = reader.readInt32() {
|
|
||||||
_1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.KeyboardButtonRow.self)
|
|
||||||
}
|
|
||||||
let _c1 = _1 != nil
|
|
||||||
if _c1 {
|
|
||||||
return Api.ReplyMarkup.replyInlineMarkup(rows: _1!)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public static func parse_replyKeyboardForceReply(_ reader: BufferReader) -> ReplyMarkup? {
|
|
||||||
var _1: Int32?
|
|
||||||
_1 = reader.readInt32()
|
|
||||||
var _2: String?
|
|
||||||
if Int(_1!) & Int(1 << 3) != 0 {_2 = parseString(reader) }
|
|
||||||
let _c1 = _1 != nil
|
|
||||||
let _c2 = (Int(_1!) & Int(1 << 3) == 0) || _2 != nil
|
|
||||||
if _c1 && _c2 {
|
|
||||||
return Api.ReplyMarkup.replyKeyboardForceReply(flags: _1!, placeholder: _2)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public static func parse_replyKeyboardHide(_ reader: BufferReader) -> ReplyMarkup? {
|
|
||||||
var _1: Int32?
|
|
||||||
_1 = reader.readInt32()
|
|
||||||
let _c1 = _1 != nil
|
|
||||||
if _c1 {
|
|
||||||
return Api.ReplyMarkup.replyKeyboardHide(flags: _1!)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public static func parse_replyKeyboardMarkup(_ reader: BufferReader) -> ReplyMarkup? {
|
|
||||||
var _1: Int32?
|
|
||||||
_1 = reader.readInt32()
|
|
||||||
var _2: [Api.KeyboardButtonRow]?
|
|
||||||
if let _ = reader.readInt32() {
|
|
||||||
_2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.KeyboardButtonRow.self)
|
|
||||||
}
|
|
||||||
var _3: String?
|
|
||||||
if Int(_1!) & Int(1 << 3) != 0 {_3 = parseString(reader) }
|
|
||||||
let _c1 = _1 != nil
|
|
||||||
let _c2 = _2 != nil
|
|
||||||
let _c3 = (Int(_1!) & Int(1 << 3) == 0) || _3 != nil
|
|
||||||
if _c1 && _c2 && _c3 {
|
|
||||||
return Api.ReplyMarkup.replyKeyboardMarkup(flags: _1!, rows: _2!, placeholder: _3)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -1,3 +1,123 @@
|
|||||||
|
public extension Api {
|
||||||
|
enum ReplyMarkup: TypeConstructorDescription {
|
||||||
|
case replyInlineMarkup(rows: [Api.KeyboardButtonRow])
|
||||||
|
case replyKeyboardForceReply(flags: Int32, placeholder: String?)
|
||||||
|
case replyKeyboardHide(flags: Int32)
|
||||||
|
case replyKeyboardMarkup(flags: Int32, rows: [Api.KeyboardButtonRow], placeholder: String?)
|
||||||
|
|
||||||
|
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||||
|
switch self {
|
||||||
|
case .replyInlineMarkup(let rows):
|
||||||
|
if boxed {
|
||||||
|
buffer.appendInt32(1218642516)
|
||||||
|
}
|
||||||
|
buffer.appendInt32(481674261)
|
||||||
|
buffer.appendInt32(Int32(rows.count))
|
||||||
|
for item in rows {
|
||||||
|
item.serialize(buffer, true)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case .replyKeyboardForceReply(let flags, let placeholder):
|
||||||
|
if boxed {
|
||||||
|
buffer.appendInt32(-2035021048)
|
||||||
|
}
|
||||||
|
serializeInt32(flags, buffer: buffer, boxed: false)
|
||||||
|
if Int(flags) & Int(1 << 3) != 0 {serializeString(placeholder!, buffer: buffer, boxed: false)}
|
||||||
|
break
|
||||||
|
case .replyKeyboardHide(let flags):
|
||||||
|
if boxed {
|
||||||
|
buffer.appendInt32(-1606526075)
|
||||||
|
}
|
||||||
|
serializeInt32(flags, buffer: buffer, boxed: false)
|
||||||
|
break
|
||||||
|
case .replyKeyboardMarkup(let flags, let rows, let placeholder):
|
||||||
|
if boxed {
|
||||||
|
buffer.appendInt32(-2049074735)
|
||||||
|
}
|
||||||
|
serializeInt32(flags, buffer: buffer, boxed: false)
|
||||||
|
buffer.appendInt32(481674261)
|
||||||
|
buffer.appendInt32(Int32(rows.count))
|
||||||
|
for item in rows {
|
||||||
|
item.serialize(buffer, true)
|
||||||
|
}
|
||||||
|
if Int(flags) & Int(1 << 3) != 0 {serializeString(placeholder!, buffer: buffer, boxed: false)}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public func descriptionFields() -> (String, [(String, Any)]) {
|
||||||
|
switch self {
|
||||||
|
case .replyInlineMarkup(let rows):
|
||||||
|
return ("replyInlineMarkup", [("rows", rows as Any)])
|
||||||
|
case .replyKeyboardForceReply(let flags, let placeholder):
|
||||||
|
return ("replyKeyboardForceReply", [("flags", flags as Any), ("placeholder", placeholder as Any)])
|
||||||
|
case .replyKeyboardHide(let flags):
|
||||||
|
return ("replyKeyboardHide", [("flags", flags as Any)])
|
||||||
|
case .replyKeyboardMarkup(let flags, let rows, let placeholder):
|
||||||
|
return ("replyKeyboardMarkup", [("flags", flags as Any), ("rows", rows as Any), ("placeholder", placeholder as Any)])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static func parse_replyInlineMarkup(_ reader: BufferReader) -> ReplyMarkup? {
|
||||||
|
var _1: [Api.KeyboardButtonRow]?
|
||||||
|
if let _ = reader.readInt32() {
|
||||||
|
_1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.KeyboardButtonRow.self)
|
||||||
|
}
|
||||||
|
let _c1 = _1 != nil
|
||||||
|
if _c1 {
|
||||||
|
return Api.ReplyMarkup.replyInlineMarkup(rows: _1!)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static func parse_replyKeyboardForceReply(_ reader: BufferReader) -> ReplyMarkup? {
|
||||||
|
var _1: Int32?
|
||||||
|
_1 = reader.readInt32()
|
||||||
|
var _2: String?
|
||||||
|
if Int(_1!) & Int(1 << 3) != 0 {_2 = parseString(reader) }
|
||||||
|
let _c1 = _1 != nil
|
||||||
|
let _c2 = (Int(_1!) & Int(1 << 3) == 0) || _2 != nil
|
||||||
|
if _c1 && _c2 {
|
||||||
|
return Api.ReplyMarkup.replyKeyboardForceReply(flags: _1!, placeholder: _2)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static func parse_replyKeyboardHide(_ reader: BufferReader) -> ReplyMarkup? {
|
||||||
|
var _1: Int32?
|
||||||
|
_1 = reader.readInt32()
|
||||||
|
let _c1 = _1 != nil
|
||||||
|
if _c1 {
|
||||||
|
return Api.ReplyMarkup.replyKeyboardHide(flags: _1!)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static func parse_replyKeyboardMarkup(_ reader: BufferReader) -> ReplyMarkup? {
|
||||||
|
var _1: Int32?
|
||||||
|
_1 = reader.readInt32()
|
||||||
|
var _2: [Api.KeyboardButtonRow]?
|
||||||
|
if let _ = reader.readInt32() {
|
||||||
|
_2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.KeyboardButtonRow.self)
|
||||||
|
}
|
||||||
|
var _3: String?
|
||||||
|
if Int(_1!) & Int(1 << 3) != 0 {_3 = parseString(reader) }
|
||||||
|
let _c1 = _1 != nil
|
||||||
|
let _c2 = _2 != nil
|
||||||
|
let _c3 = (Int(_1!) & Int(1 << 3) == 0) || _3 != nil
|
||||||
|
if _c1 && _c2 && _c3 {
|
||||||
|
return Api.ReplyMarkup.replyKeyboardMarkup(flags: _1!, rows: _2!, placeholder: _3)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
public extension Api {
|
public extension Api {
|
||||||
enum ReportReason: TypeConstructorDescription {
|
enum ReportReason: TypeConstructorDescription {
|
||||||
case inputReportReasonChildAbuse
|
case inputReportReasonChildAbuse
|
||||||
|
@ -53,6 +53,7 @@ public extension Api {
|
|||||||
case sendMessageRecordAudioAction
|
case sendMessageRecordAudioAction
|
||||||
case sendMessageRecordRoundAction
|
case sendMessageRecordRoundAction
|
||||||
case sendMessageRecordVideoAction
|
case sendMessageRecordVideoAction
|
||||||
|
case sendMessageTextDraftAction(randomId: Int64, text: Api.TextWithEntities)
|
||||||
case sendMessageTypingAction
|
case sendMessageTypingAction
|
||||||
case sendMessageUploadAudioAction(progress: Int32)
|
case sendMessageUploadAudioAction(progress: Int32)
|
||||||
case sendMessageUploadDocumentAction(progress: Int32)
|
case sendMessageUploadDocumentAction(progress: Int32)
|
||||||
@ -130,6 +131,13 @@ public extension Api {
|
|||||||
buffer.appendInt32(-1584933265)
|
buffer.appendInt32(-1584933265)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break
|
||||||
|
case .sendMessageTextDraftAction(let randomId, let text):
|
||||||
|
if boxed {
|
||||||
|
buffer.appendInt32(929929052)
|
||||||
|
}
|
||||||
|
serializeInt64(randomId, buffer: buffer, boxed: false)
|
||||||
|
text.serialize(buffer, true)
|
||||||
break
|
break
|
||||||
case .sendMessageTypingAction:
|
case .sendMessageTypingAction:
|
||||||
if boxed {
|
if boxed {
|
||||||
@ -200,6 +208,8 @@ public extension Api {
|
|||||||
return ("sendMessageRecordRoundAction", [])
|
return ("sendMessageRecordRoundAction", [])
|
||||||
case .sendMessageRecordVideoAction:
|
case .sendMessageRecordVideoAction:
|
||||||
return ("sendMessageRecordVideoAction", [])
|
return ("sendMessageRecordVideoAction", [])
|
||||||
|
case .sendMessageTextDraftAction(let randomId, let text):
|
||||||
|
return ("sendMessageTextDraftAction", [("randomId", randomId as Any), ("text", text as Any)])
|
||||||
case .sendMessageTypingAction:
|
case .sendMessageTypingAction:
|
||||||
return ("sendMessageTypingAction", [])
|
return ("sendMessageTypingAction", [])
|
||||||
case .sendMessageUploadAudioAction(let progress):
|
case .sendMessageUploadAudioAction(let progress):
|
||||||
@ -282,6 +292,22 @@ public extension Api {
|
|||||||
public static func parse_sendMessageRecordVideoAction(_ reader: BufferReader) -> SendMessageAction? {
|
public static func parse_sendMessageRecordVideoAction(_ reader: BufferReader) -> SendMessageAction? {
|
||||||
return Api.SendMessageAction.sendMessageRecordVideoAction
|
return Api.SendMessageAction.sendMessageRecordVideoAction
|
||||||
}
|
}
|
||||||
|
public static func parse_sendMessageTextDraftAction(_ reader: BufferReader) -> SendMessageAction? {
|
||||||
|
var _1: Int64?
|
||||||
|
_1 = reader.readInt64()
|
||||||
|
var _2: Api.TextWithEntities?
|
||||||
|
if let signature = reader.readInt32() {
|
||||||
|
_2 = Api.parse(reader, signature: signature) as? Api.TextWithEntities
|
||||||
|
}
|
||||||
|
let _c1 = _1 != nil
|
||||||
|
let _c2 = _2 != nil
|
||||||
|
if _c1 && _c2 {
|
||||||
|
return Api.SendMessageAction.sendMessageTextDraftAction(randomId: _1!, text: _2!)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
public static func parse_sendMessageTypingAction(_ reader: BufferReader) -> SendMessageAction? {
|
public static func parse_sendMessageTypingAction(_ reader: BufferReader) -> SendMessageAction? {
|
||||||
return Api.SendMessageAction.sendMessageTypingAction
|
return Api.SendMessageAction.sendMessageTypingAction
|
||||||
}
|
}
|
||||||
@ -1038,79 +1064,3 @@ public extension Api {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public extension Api {
|
|
||||||
enum StarGiftAttributeId: TypeConstructorDescription {
|
|
||||||
case starGiftAttributeIdBackdrop(backdropId: Int32)
|
|
||||||
case starGiftAttributeIdModel(documentId: Int64)
|
|
||||||
case starGiftAttributeIdPattern(documentId: Int64)
|
|
||||||
|
|
||||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
|
||||||
switch self {
|
|
||||||
case .starGiftAttributeIdBackdrop(let backdropId):
|
|
||||||
if boxed {
|
|
||||||
buffer.appendInt32(520210263)
|
|
||||||
}
|
|
||||||
serializeInt32(backdropId, buffer: buffer, boxed: false)
|
|
||||||
break
|
|
||||||
case .starGiftAttributeIdModel(let documentId):
|
|
||||||
if boxed {
|
|
||||||
buffer.appendInt32(1219145276)
|
|
||||||
}
|
|
||||||
serializeInt64(documentId, buffer: buffer, boxed: false)
|
|
||||||
break
|
|
||||||
case .starGiftAttributeIdPattern(let documentId):
|
|
||||||
if boxed {
|
|
||||||
buffer.appendInt32(1242965043)
|
|
||||||
}
|
|
||||||
serializeInt64(documentId, buffer: buffer, boxed: false)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public func descriptionFields() -> (String, [(String, Any)]) {
|
|
||||||
switch self {
|
|
||||||
case .starGiftAttributeIdBackdrop(let backdropId):
|
|
||||||
return ("starGiftAttributeIdBackdrop", [("backdropId", backdropId as Any)])
|
|
||||||
case .starGiftAttributeIdModel(let documentId):
|
|
||||||
return ("starGiftAttributeIdModel", [("documentId", documentId as Any)])
|
|
||||||
case .starGiftAttributeIdPattern(let documentId):
|
|
||||||
return ("starGiftAttributeIdPattern", [("documentId", documentId as Any)])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static func parse_starGiftAttributeIdBackdrop(_ reader: BufferReader) -> StarGiftAttributeId? {
|
|
||||||
var _1: Int32?
|
|
||||||
_1 = reader.readInt32()
|
|
||||||
let _c1 = _1 != nil
|
|
||||||
if _c1 {
|
|
||||||
return Api.StarGiftAttributeId.starGiftAttributeIdBackdrop(backdropId: _1!)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public static func parse_starGiftAttributeIdModel(_ reader: BufferReader) -> StarGiftAttributeId? {
|
|
||||||
var _1: Int64?
|
|
||||||
_1 = reader.readInt64()
|
|
||||||
let _c1 = _1 != nil
|
|
||||||
if _c1 {
|
|
||||||
return Api.StarGiftAttributeId.starGiftAttributeIdModel(documentId: _1!)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public static func parse_starGiftAttributeIdPattern(_ reader: BufferReader) -> StarGiftAttributeId? {
|
|
||||||
var _1: Int64?
|
|
||||||
_1 = reader.readInt64()
|
|
||||||
let _c1 = _1 != nil
|
|
||||||
if _c1 {
|
|
||||||
return Api.StarGiftAttributeId.starGiftAttributeIdPattern(documentId: _1!)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -1,3 +1,79 @@
|
|||||||
|
public extension Api {
|
||||||
|
enum StarGiftAttributeId: TypeConstructorDescription {
|
||||||
|
case starGiftAttributeIdBackdrop(backdropId: Int32)
|
||||||
|
case starGiftAttributeIdModel(documentId: Int64)
|
||||||
|
case starGiftAttributeIdPattern(documentId: Int64)
|
||||||
|
|
||||||
|
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||||
|
switch self {
|
||||||
|
case .starGiftAttributeIdBackdrop(let backdropId):
|
||||||
|
if boxed {
|
||||||
|
buffer.appendInt32(520210263)
|
||||||
|
}
|
||||||
|
serializeInt32(backdropId, buffer: buffer, boxed: false)
|
||||||
|
break
|
||||||
|
case .starGiftAttributeIdModel(let documentId):
|
||||||
|
if boxed {
|
||||||
|
buffer.appendInt32(1219145276)
|
||||||
|
}
|
||||||
|
serializeInt64(documentId, buffer: buffer, boxed: false)
|
||||||
|
break
|
||||||
|
case .starGiftAttributeIdPattern(let documentId):
|
||||||
|
if boxed {
|
||||||
|
buffer.appendInt32(1242965043)
|
||||||
|
}
|
||||||
|
serializeInt64(documentId, buffer: buffer, boxed: false)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public func descriptionFields() -> (String, [(String, Any)]) {
|
||||||
|
switch self {
|
||||||
|
case .starGiftAttributeIdBackdrop(let backdropId):
|
||||||
|
return ("starGiftAttributeIdBackdrop", [("backdropId", backdropId as Any)])
|
||||||
|
case .starGiftAttributeIdModel(let documentId):
|
||||||
|
return ("starGiftAttributeIdModel", [("documentId", documentId as Any)])
|
||||||
|
case .starGiftAttributeIdPattern(let documentId):
|
||||||
|
return ("starGiftAttributeIdPattern", [("documentId", documentId as Any)])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static func parse_starGiftAttributeIdBackdrop(_ reader: BufferReader) -> StarGiftAttributeId? {
|
||||||
|
var _1: Int32?
|
||||||
|
_1 = reader.readInt32()
|
||||||
|
let _c1 = _1 != nil
|
||||||
|
if _c1 {
|
||||||
|
return Api.StarGiftAttributeId.starGiftAttributeIdBackdrop(backdropId: _1!)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static func parse_starGiftAttributeIdModel(_ reader: BufferReader) -> StarGiftAttributeId? {
|
||||||
|
var _1: Int64?
|
||||||
|
_1 = reader.readInt64()
|
||||||
|
let _c1 = _1 != nil
|
||||||
|
if _c1 {
|
||||||
|
return Api.StarGiftAttributeId.starGiftAttributeIdModel(documentId: _1!)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static func parse_starGiftAttributeIdPattern(_ reader: BufferReader) -> StarGiftAttributeId? {
|
||||||
|
var _1: Int64?
|
||||||
|
_1 = reader.readInt64()
|
||||||
|
let _c1 = _1 != nil
|
||||||
|
if _c1 {
|
||||||
|
return Api.StarGiftAttributeId.starGiftAttributeIdPattern(documentId: _1!)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
public extension Api {
|
public extension Api {
|
||||||
enum StarGiftCollection: TypeConstructorDescription {
|
enum StarGiftCollection: TypeConstructorDescription {
|
||||||
case starGiftCollection(flags: Int32, collectionId: Int32, title: String, icon: Api.Document?, giftsCount: Int32, hash: Int64)
|
case starGiftCollection(flags: Int32, collectionId: Int32, title: String, icon: Api.Document?, giftsCount: Int32, hash: Int64)
|
||||||
@ -1178,125 +1254,3 @@ public extension Api {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public extension Api {
|
|
||||||
enum StatsPercentValue: TypeConstructorDescription {
|
|
||||||
case statsPercentValue(part: Double, total: Double)
|
|
||||||
|
|
||||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
|
||||||
switch self {
|
|
||||||
case .statsPercentValue(let part, let total):
|
|
||||||
if boxed {
|
|
||||||
buffer.appendInt32(-875679776)
|
|
||||||
}
|
|
||||||
serializeDouble(part, buffer: buffer, boxed: false)
|
|
||||||
serializeDouble(total, buffer: buffer, boxed: false)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public func descriptionFields() -> (String, [(String, Any)]) {
|
|
||||||
switch self {
|
|
||||||
case .statsPercentValue(let part, let total):
|
|
||||||
return ("statsPercentValue", [("part", part as Any), ("total", total as Any)])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static func parse_statsPercentValue(_ reader: BufferReader) -> StatsPercentValue? {
|
|
||||||
var _1: Double?
|
|
||||||
_1 = reader.readDouble()
|
|
||||||
var _2: Double?
|
|
||||||
_2 = reader.readDouble()
|
|
||||||
let _c1 = _1 != nil
|
|
||||||
let _c2 = _2 != nil
|
|
||||||
if _c1 && _c2 {
|
|
||||||
return Api.StatsPercentValue.statsPercentValue(part: _1!, total: _2!)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public extension Api {
|
|
||||||
enum StatsURL: TypeConstructorDescription {
|
|
||||||
case statsURL(url: String)
|
|
||||||
|
|
||||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
|
||||||
switch self {
|
|
||||||
case .statsURL(let url):
|
|
||||||
if boxed {
|
|
||||||
buffer.appendInt32(1202287072)
|
|
||||||
}
|
|
||||||
serializeString(url, buffer: buffer, boxed: false)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public func descriptionFields() -> (String, [(String, Any)]) {
|
|
||||||
switch self {
|
|
||||||
case .statsURL(let url):
|
|
||||||
return ("statsURL", [("url", url as Any)])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static func parse_statsURL(_ reader: BufferReader) -> StatsURL? {
|
|
||||||
var _1: String?
|
|
||||||
_1 = parseString(reader)
|
|
||||||
let _c1 = _1 != nil
|
|
||||||
if _c1 {
|
|
||||||
return Api.StatsURL.statsURL(url: _1!)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public extension Api {
|
|
||||||
enum StickerKeyword: TypeConstructorDescription {
|
|
||||||
case stickerKeyword(documentId: Int64, keyword: [String])
|
|
||||||
|
|
||||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
|
||||||
switch self {
|
|
||||||
case .stickerKeyword(let documentId, let keyword):
|
|
||||||
if boxed {
|
|
||||||
buffer.appendInt32(-50416996)
|
|
||||||
}
|
|
||||||
serializeInt64(documentId, buffer: buffer, boxed: false)
|
|
||||||
buffer.appendInt32(481674261)
|
|
||||||
buffer.appendInt32(Int32(keyword.count))
|
|
||||||
for item in keyword {
|
|
||||||
serializeString(item, buffer: buffer, boxed: false)
|
|
||||||
}
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public func descriptionFields() -> (String, [(String, Any)]) {
|
|
||||||
switch self {
|
|
||||||
case .stickerKeyword(let documentId, let keyword):
|
|
||||||
return ("stickerKeyword", [("documentId", documentId as Any), ("keyword", keyword as Any)])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static func parse_stickerKeyword(_ reader: BufferReader) -> StickerKeyword? {
|
|
||||||
var _1: Int64?
|
|
||||||
_1 = reader.readInt64()
|
|
||||||
var _2: [String]?
|
|
||||||
if let _ = reader.readInt32() {
|
|
||||||
_2 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self)
|
|
||||||
}
|
|
||||||
let _c1 = _1 != nil
|
|
||||||
let _c2 = _2 != nil
|
|
||||||
if _c1 && _c2 {
|
|
||||||
return Api.StickerKeyword.stickerKeyword(documentId: _1!, keyword: _2!)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@ -1,3 +1,125 @@
|
|||||||
|
public extension Api {
|
||||||
|
enum StatsPercentValue: TypeConstructorDescription {
|
||||||
|
case statsPercentValue(part: Double, total: Double)
|
||||||
|
|
||||||
|
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||||
|
switch self {
|
||||||
|
case .statsPercentValue(let part, let total):
|
||||||
|
if boxed {
|
||||||
|
buffer.appendInt32(-875679776)
|
||||||
|
}
|
||||||
|
serializeDouble(part, buffer: buffer, boxed: false)
|
||||||
|
serializeDouble(total, buffer: buffer, boxed: false)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public func descriptionFields() -> (String, [(String, Any)]) {
|
||||||
|
switch self {
|
||||||
|
case .statsPercentValue(let part, let total):
|
||||||
|
return ("statsPercentValue", [("part", part as Any), ("total", total as Any)])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static func parse_statsPercentValue(_ reader: BufferReader) -> StatsPercentValue? {
|
||||||
|
var _1: Double?
|
||||||
|
_1 = reader.readDouble()
|
||||||
|
var _2: Double?
|
||||||
|
_2 = reader.readDouble()
|
||||||
|
let _c1 = _1 != nil
|
||||||
|
let _c2 = _2 != nil
|
||||||
|
if _c1 && _c2 {
|
||||||
|
return Api.StatsPercentValue.statsPercentValue(part: _1!, total: _2!)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public extension Api {
|
||||||
|
enum StatsURL: TypeConstructorDescription {
|
||||||
|
case statsURL(url: String)
|
||||||
|
|
||||||
|
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||||
|
switch self {
|
||||||
|
case .statsURL(let url):
|
||||||
|
if boxed {
|
||||||
|
buffer.appendInt32(1202287072)
|
||||||
|
}
|
||||||
|
serializeString(url, buffer: buffer, boxed: false)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public func descriptionFields() -> (String, [(String, Any)]) {
|
||||||
|
switch self {
|
||||||
|
case .statsURL(let url):
|
||||||
|
return ("statsURL", [("url", url as Any)])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static func parse_statsURL(_ reader: BufferReader) -> StatsURL? {
|
||||||
|
var _1: String?
|
||||||
|
_1 = parseString(reader)
|
||||||
|
let _c1 = _1 != nil
|
||||||
|
if _c1 {
|
||||||
|
return Api.StatsURL.statsURL(url: _1!)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public extension Api {
|
||||||
|
enum StickerKeyword: TypeConstructorDescription {
|
||||||
|
case stickerKeyword(documentId: Int64, keyword: [String])
|
||||||
|
|
||||||
|
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||||
|
switch self {
|
||||||
|
case .stickerKeyword(let documentId, let keyword):
|
||||||
|
if boxed {
|
||||||
|
buffer.appendInt32(-50416996)
|
||||||
|
}
|
||||||
|
serializeInt64(documentId, buffer: buffer, boxed: false)
|
||||||
|
buffer.appendInt32(481674261)
|
||||||
|
buffer.appendInt32(Int32(keyword.count))
|
||||||
|
for item in keyword {
|
||||||
|
serializeString(item, buffer: buffer, boxed: false)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public func descriptionFields() -> (String, [(String, Any)]) {
|
||||||
|
switch self {
|
||||||
|
case .stickerKeyword(let documentId, let keyword):
|
||||||
|
return ("stickerKeyword", [("documentId", documentId as Any), ("keyword", keyword as Any)])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static func parse_stickerKeyword(_ reader: BufferReader) -> StickerKeyword? {
|
||||||
|
var _1: Int64?
|
||||||
|
_1 = reader.readInt64()
|
||||||
|
var _2: [String]?
|
||||||
|
if let _ = reader.readInt32() {
|
||||||
|
_2 = Api.parseVector(reader, elementSignature: -1255641564, elementType: String.self)
|
||||||
|
}
|
||||||
|
let _c1 = _1 != nil
|
||||||
|
let _c2 = _2 != nil
|
||||||
|
if _c1 && _c2 {
|
||||||
|
return Api.StickerKeyword.stickerKeyword(documentId: _1!, keyword: _2!)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
public extension Api {
|
public extension Api {
|
||||||
enum StickerPack: TypeConstructorDescription {
|
enum StickerPack: TypeConstructorDescription {
|
||||||
case stickerPack(emoticon: String, documents: [Int64])
|
case stickerPack(emoticon: String, documents: [Int64])
|
||||||
|
@ -614,13 +614,13 @@ public extension Api {
|
|||||||
}
|
}
|
||||||
public extension Api {
|
public extension Api {
|
||||||
enum UserFull: TypeConstructorDescription {
|
enum UserFull: TypeConstructorDescription {
|
||||||
case userFull(flags: Int32, flags2: Int32, id: Int64, about: String?, settings: Api.PeerSettings, personalPhoto: Api.Photo?, profilePhoto: Api.Photo?, fallbackPhoto: Api.Photo?, notifySettings: Api.PeerNotifySettings, botInfo: Api.BotInfo?, pinnedMsgId: Int32?, commonChatsCount: Int32, folderId: Int32?, ttlPeriod: Int32?, themeEmoticon: String?, privateForwardName: String?, botGroupAdminRights: Api.ChatAdminRights?, botBroadcastAdminRights: Api.ChatAdminRights?, wallpaper: Api.WallPaper?, stories: Api.PeerStories?, businessWorkHours: Api.BusinessWorkHours?, businessLocation: Api.BusinessLocation?, businessGreetingMessage: Api.BusinessGreetingMessage?, businessAwayMessage: Api.BusinessAwayMessage?, businessIntro: Api.BusinessIntro?, birthday: Api.Birthday?, personalChannelId: Int64?, personalChannelMessage: Int32?, stargiftsCount: Int32?, starrefProgram: Api.StarRefProgram?, botVerification: Api.BotVerification?, sendPaidMessagesStars: Int64?, disallowedGifts: Api.DisallowedGiftsSettings?, starsRating: Api.StarsRating?, starsMyPendingRating: Api.StarsRating?, starsMyPendingRatingDate: Int32?, linkedBotforumChannelId: Int64?)
|
case userFull(flags: Int32, flags2: Int32, id: Int64, about: String?, settings: Api.PeerSettings, personalPhoto: Api.Photo?, profilePhoto: Api.Photo?, fallbackPhoto: Api.Photo?, notifySettings: Api.PeerNotifySettings, botInfo: Api.BotInfo?, pinnedMsgId: Int32?, commonChatsCount: Int32, folderId: Int32?, ttlPeriod: Int32?, themeEmoticon: String?, privateForwardName: String?, botGroupAdminRights: Api.ChatAdminRights?, botBroadcastAdminRights: Api.ChatAdminRights?, wallpaper: Api.WallPaper?, stories: Api.PeerStories?, businessWorkHours: Api.BusinessWorkHours?, businessLocation: Api.BusinessLocation?, businessGreetingMessage: Api.BusinessGreetingMessage?, businessAwayMessage: Api.BusinessAwayMessage?, businessIntro: Api.BusinessIntro?, birthday: Api.Birthday?, personalChannelId: Int64?, personalChannelMessage: Int32?, stargiftsCount: Int32?, starrefProgram: Api.StarRefProgram?, botVerification: Api.BotVerification?, sendPaidMessagesStars: Int64?, disallowedGifts: Api.DisallowedGiftsSettings?, starsRating: Api.StarsRating?, starsMyPendingRating: Api.StarsRating?, starsMyPendingRatingDate: Int32?, linkedBotforumChannelId: Int64?, tabsOrder: [Api.ProfileTab]?, savedMusic: Api.Document?)
|
||||||
|
|
||||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||||
switch self {
|
switch self {
|
||||||
case .userFull(let flags, let flags2, 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 wallpaper, let stories, let businessWorkHours, let businessLocation, let businessGreetingMessage, let businessAwayMessage, let businessIntro, let birthday, let personalChannelId, let personalChannelMessage, let stargiftsCount, let starrefProgram, let botVerification, let sendPaidMessagesStars, let disallowedGifts, let starsRating, let starsMyPendingRating, let starsMyPendingRatingDate, let linkedBotforumChannelId):
|
case .userFull(let flags, let flags2, 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 wallpaper, let stories, let businessWorkHours, let businessLocation, let businessGreetingMessage, let businessAwayMessage, let businessIntro, let birthday, let personalChannelId, let personalChannelMessage, let stargiftsCount, let starrefProgram, let botVerification, let sendPaidMessagesStars, let disallowedGifts, let starsRating, let starsMyPendingRating, let starsMyPendingRatingDate, let linkedBotforumChannelId, let tabsOrder, let savedMusic):
|
||||||
if boxed {
|
if boxed {
|
||||||
buffer.appendInt32(-510712709)
|
buffer.appendInt32(-116852838)
|
||||||
}
|
}
|
||||||
serializeInt32(flags, buffer: buffer, boxed: false)
|
serializeInt32(flags, buffer: buffer, boxed: false)
|
||||||
serializeInt32(flags2, buffer: buffer, boxed: false)
|
serializeInt32(flags2, buffer: buffer, boxed: false)
|
||||||
@ -659,14 +659,20 @@ public extension Api {
|
|||||||
if Int(flags2) & Int(1 << 18) != 0 {starsMyPendingRating!.serialize(buffer, true)}
|
if Int(flags2) & Int(1 << 18) != 0 {starsMyPendingRating!.serialize(buffer, true)}
|
||||||
if Int(flags2) & Int(1 << 18) != 0 {serializeInt32(starsMyPendingRatingDate!, buffer: buffer, boxed: false)}
|
if Int(flags2) & Int(1 << 18) != 0 {serializeInt32(starsMyPendingRatingDate!, buffer: buffer, boxed: false)}
|
||||||
if Int(flags2) & Int(1 << 19) != 0 {serializeInt64(linkedBotforumChannelId!, buffer: buffer, boxed: false)}
|
if Int(flags2) & Int(1 << 19) != 0 {serializeInt64(linkedBotforumChannelId!, buffer: buffer, boxed: false)}
|
||||||
|
if Int(flags2) & Int(1 << 20) != 0 {buffer.appendInt32(481674261)
|
||||||
|
buffer.appendInt32(Int32(tabsOrder!.count))
|
||||||
|
for item in tabsOrder! {
|
||||||
|
item.serialize(buffer, true)
|
||||||
|
}}
|
||||||
|
if Int(flags2) & Int(1 << 21) != 0 {savedMusic!.serialize(buffer, true)}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public func descriptionFields() -> (String, [(String, Any)]) {
|
public func descriptionFields() -> (String, [(String, Any)]) {
|
||||||
switch self {
|
switch self {
|
||||||
case .userFull(let flags, let flags2, 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 wallpaper, let stories, let businessWorkHours, let businessLocation, let businessGreetingMessage, let businessAwayMessage, let businessIntro, let birthday, let personalChannelId, let personalChannelMessage, let stargiftsCount, let starrefProgram, let botVerification, let sendPaidMessagesStars, let disallowedGifts, let starsRating, let starsMyPendingRating, let starsMyPendingRatingDate, let linkedBotforumChannelId):
|
case .userFull(let flags, let flags2, 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 wallpaper, let stories, let businessWorkHours, let businessLocation, let businessGreetingMessage, let businessAwayMessage, let businessIntro, let birthday, let personalChannelId, let personalChannelMessage, let stargiftsCount, let starrefProgram, let botVerification, let sendPaidMessagesStars, let disallowedGifts, let starsRating, let starsMyPendingRating, let starsMyPendingRatingDate, let linkedBotforumChannelId, let tabsOrder, let savedMusic):
|
||||||
return ("userFull", [("flags", flags as Any), ("flags2", flags2 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), ("wallpaper", wallpaper as Any), ("stories", stories as Any), ("businessWorkHours", businessWorkHours as Any), ("businessLocation", businessLocation as Any), ("businessGreetingMessage", businessGreetingMessage as Any), ("businessAwayMessage", businessAwayMessage as Any), ("businessIntro", businessIntro as Any), ("birthday", birthday as Any), ("personalChannelId", personalChannelId as Any), ("personalChannelMessage", personalChannelMessage as Any), ("stargiftsCount", stargiftsCount as Any), ("starrefProgram", starrefProgram as Any), ("botVerification", botVerification as Any), ("sendPaidMessagesStars", sendPaidMessagesStars as Any), ("disallowedGifts", disallowedGifts as Any), ("starsRating", starsRating as Any), ("starsMyPendingRating", starsMyPendingRating as Any), ("starsMyPendingRatingDate", starsMyPendingRatingDate as Any), ("linkedBotforumChannelId", linkedBotforumChannelId as Any)])
|
return ("userFull", [("flags", flags as Any), ("flags2", flags2 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), ("wallpaper", wallpaper as Any), ("stories", stories as Any), ("businessWorkHours", businessWorkHours as Any), ("businessLocation", businessLocation as Any), ("businessGreetingMessage", businessGreetingMessage as Any), ("businessAwayMessage", businessAwayMessage as Any), ("businessIntro", businessIntro as Any), ("birthday", birthday as Any), ("personalChannelId", personalChannelId as Any), ("personalChannelMessage", personalChannelMessage as Any), ("stargiftsCount", stargiftsCount as Any), ("starrefProgram", starrefProgram as Any), ("botVerification", botVerification as Any), ("sendPaidMessagesStars", sendPaidMessagesStars as Any), ("disallowedGifts", disallowedGifts as Any), ("starsRating", starsRating as Any), ("starsMyPendingRating", starsMyPendingRating as Any), ("starsMyPendingRatingDate", starsMyPendingRatingDate as Any), ("linkedBotforumChannelId", linkedBotforumChannelId as Any), ("tabsOrder", tabsOrder as Any), ("savedMusic", savedMusic as Any)])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -787,6 +793,14 @@ public extension Api {
|
|||||||
if Int(_2!) & Int(1 << 18) != 0 {_36 = reader.readInt32() }
|
if Int(_2!) & Int(1 << 18) != 0 {_36 = reader.readInt32() }
|
||||||
var _37: Int64?
|
var _37: Int64?
|
||||||
if Int(_2!) & Int(1 << 19) != 0 {_37 = reader.readInt64() }
|
if Int(_2!) & Int(1 << 19) != 0 {_37 = reader.readInt64() }
|
||||||
|
var _38: [Api.ProfileTab]?
|
||||||
|
if Int(_2!) & Int(1 << 20) != 0 {if let _ = reader.readInt32() {
|
||||||
|
_38 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ProfileTab.self)
|
||||||
|
} }
|
||||||
|
var _39: Api.Document?
|
||||||
|
if Int(_2!) & Int(1 << 21) != 0 {if let signature = reader.readInt32() {
|
||||||
|
_39 = Api.parse(reader, signature: signature) as? Api.Document
|
||||||
|
} }
|
||||||
let _c1 = _1 != nil
|
let _c1 = _1 != nil
|
||||||
let _c2 = _2 != nil
|
let _c2 = _2 != nil
|
||||||
let _c3 = _3 != nil
|
let _c3 = _3 != nil
|
||||||
@ -824,8 +838,10 @@ public extension Api {
|
|||||||
let _c35 = (Int(_2!) & Int(1 << 18) == 0) || _35 != nil
|
let _c35 = (Int(_2!) & Int(1 << 18) == 0) || _35 != nil
|
||||||
let _c36 = (Int(_2!) & Int(1 << 18) == 0) || _36 != nil
|
let _c36 = (Int(_2!) & Int(1 << 18) == 0) || _36 != nil
|
||||||
let _c37 = (Int(_2!) & Int(1 << 19) == 0) || _37 != nil
|
let _c37 = (Int(_2!) & Int(1 << 19) == 0) || _37 != nil
|
||||||
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 && _c20 && _c21 && _c22 && _c23 && _c24 && _c25 && _c26 && _c27 && _c28 && _c29 && _c30 && _c31 && _c32 && _c33 && _c34 && _c35 && _c36 && _c37 {
|
let _c38 = (Int(_2!) & Int(1 << 20) == 0) || _38 != nil
|
||||||
return Api.UserFull.userFull(flags: _1!, flags2: _2!, id: _3!, about: _4, settings: _5!, personalPhoto: _6, profilePhoto: _7, fallbackPhoto: _8, notifySettings: _9!, botInfo: _10, pinnedMsgId: _11, commonChatsCount: _12!, folderId: _13, ttlPeriod: _14, themeEmoticon: _15, privateForwardName: _16, botGroupAdminRights: _17, botBroadcastAdminRights: _18, wallpaper: _19, stories: _20, businessWorkHours: _21, businessLocation: _22, businessGreetingMessage: _23, businessAwayMessage: _24, businessIntro: _25, birthday: _26, personalChannelId: _27, personalChannelMessage: _28, stargiftsCount: _29, starrefProgram: _30, botVerification: _31, sendPaidMessagesStars: _32, disallowedGifts: _33, starsRating: _34, starsMyPendingRating: _35, starsMyPendingRatingDate: _36, linkedBotforumChannelId: _37)
|
let _c39 = (Int(_2!) & Int(1 << 21) == 0) || _39 != nil
|
||||||
|
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 && _c20 && _c21 && _c22 && _c23 && _c24 && _c25 && _c26 && _c27 && _c28 && _c29 && _c30 && _c31 && _c32 && _c33 && _c34 && _c35 && _c36 && _c37 && _c38 && _c39 {
|
||||||
|
return Api.UserFull.userFull(flags: _1!, flags2: _2!, id: _3!, about: _4, settings: _5!, personalPhoto: _6, profilePhoto: _7, fallbackPhoto: _8, notifySettings: _9!, botInfo: _10, pinnedMsgId: _11, commonChatsCount: _12!, folderId: _13, ttlPeriod: _14, themeEmoticon: _15, privateForwardName: _16, botGroupAdminRights: _17, botBroadcastAdminRights: _18, wallpaper: _19, stories: _20, businessWorkHours: _21, businessLocation: _22, businessGreetingMessage: _23, businessAwayMessage: _24, businessIntro: _25, birthday: _26, personalChannelId: _27, personalChannelMessage: _28, stargiftsCount: _29, starrefProgram: _30, botVerification: _31, sendPaidMessagesStars: _32, disallowedGifts: _33, starsRating: _34, starsMyPendingRating: _35, starsMyPendingRatingDate: _36, linkedBotforumChannelId: _37, tabsOrder: _38, savedMusic: _39)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return nil
|
return nil
|
||||||
|
@ -248,6 +248,72 @@ public extension Api.upload {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public extension Api.users {
|
||||||
|
enum SavedMusic: TypeConstructorDescription {
|
||||||
|
case savedMusic(count: Int32, documents: [Api.Document])
|
||||||
|
case savedMusicNotModified(count: Int32)
|
||||||
|
|
||||||
|
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||||
|
switch self {
|
||||||
|
case .savedMusic(let count, let documents):
|
||||||
|
if boxed {
|
||||||
|
buffer.appendInt32(883094167)
|
||||||
|
}
|
||||||
|
serializeInt32(count, buffer: buffer, boxed: false)
|
||||||
|
buffer.appendInt32(481674261)
|
||||||
|
buffer.appendInt32(Int32(documents.count))
|
||||||
|
for item in documents {
|
||||||
|
item.serialize(buffer, true)
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case .savedMusicNotModified(let count):
|
||||||
|
if boxed {
|
||||||
|
buffer.appendInt32(-477656412)
|
||||||
|
}
|
||||||
|
serializeInt32(count, buffer: buffer, boxed: false)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public func descriptionFields() -> (String, [(String, Any)]) {
|
||||||
|
switch self {
|
||||||
|
case .savedMusic(let count, let documents):
|
||||||
|
return ("savedMusic", [("count", count as Any), ("documents", documents as Any)])
|
||||||
|
case .savedMusicNotModified(let count):
|
||||||
|
return ("savedMusicNotModified", [("count", count as Any)])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static func parse_savedMusic(_ reader: BufferReader) -> SavedMusic? {
|
||||||
|
var _1: Int32?
|
||||||
|
_1 = reader.readInt32()
|
||||||
|
var _2: [Api.Document]?
|
||||||
|
if let _ = reader.readInt32() {
|
||||||
|
_2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Document.self)
|
||||||
|
}
|
||||||
|
let _c1 = _1 != nil
|
||||||
|
let _c2 = _2 != nil
|
||||||
|
if _c1 && _c2 {
|
||||||
|
return Api.users.SavedMusic.savedMusic(count: _1!, documents: _2!)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static func parse_savedMusicNotModified(_ reader: BufferReader) -> SavedMusic? {
|
||||||
|
var _1: Int32?
|
||||||
|
_1 = reader.readInt32()
|
||||||
|
let _c1 = _1 != nil
|
||||||
|
if _c1 {
|
||||||
|
return Api.users.SavedMusic.savedMusicNotModified(count: _1!)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
public extension Api.users {
|
public extension Api.users {
|
||||||
enum UserFull: TypeConstructorDescription {
|
enum UserFull: TypeConstructorDescription {
|
||||||
case userFull(fullUser: Api.UserFull, chats: [Api.Chat], users: [Api.User])
|
case userFull(fullUser: Api.UserFull, chats: [Api.Chat], users: [Api.User])
|
||||||
|
@ -961,6 +961,25 @@ public extension Api.functions.account {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public extension Api.functions.account {
|
||||||
|
static func reorderProfileTabs(order: [Api.ProfileTab]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.Bool>) {
|
||||||
|
let buffer = Buffer()
|
||||||
|
buffer.appendInt32(-1056282459)
|
||||||
|
buffer.appendInt32(481674261)
|
||||||
|
buffer.appendInt32(Int32(order.count))
|
||||||
|
for item in order {
|
||||||
|
item.serialize(buffer, true)
|
||||||
|
}
|
||||||
|
return (FunctionDescription(name: "account.reorderProfileTabs", parameters: [("order", String(describing: order))]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in
|
||||||
|
let reader = BufferReader(buffer)
|
||||||
|
var result: Api.Bool?
|
||||||
|
if let signature = reader.readInt32() {
|
||||||
|
result = Api.parse(reader, signature: signature) as? Api.Bool
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
public extension Api.functions.account {
|
public extension Api.functions.account {
|
||||||
static func reorderUsernames(order: [String]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.Bool>) {
|
static func reorderUsernames(order: [String]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.Bool>) {
|
||||||
let buffer = Buffer()
|
let buffer = Buffer()
|
||||||
@ -1168,6 +1187,23 @@ public extension Api.functions.account {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public extension Api.functions.account {
|
||||||
|
static func saveMusic(flags: Int32, id: Api.InputDocument, afterId: Api.InputDocument?) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.Bool>) {
|
||||||
|
let buffer = Buffer()
|
||||||
|
buffer.appendInt32(-1301859671)
|
||||||
|
serializeInt32(flags, buffer: buffer, boxed: false)
|
||||||
|
id.serialize(buffer, true)
|
||||||
|
if Int(flags) & Int(1 << 1) != 0 {afterId!.serialize(buffer, true)}
|
||||||
|
return (FunctionDescription(name: "account.saveMusic", parameters: [("flags", String(describing: flags)), ("id", String(describing: id)), ("afterId", String(describing: afterId))]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in
|
||||||
|
let reader = BufferReader(buffer)
|
||||||
|
var result: Api.Bool?
|
||||||
|
if let signature = reader.readInt32() {
|
||||||
|
result = Api.parse(reader, signature: signature) as? Api.Bool
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
public extension Api.functions.account {
|
public extension Api.functions.account {
|
||||||
static func saveRingtone(id: Api.InputDocument, unsave: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.account.SavedRingtone>) {
|
static func saveRingtone(id: Api.InputDocument, unsave: Api.Bool) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.account.SavedRingtone>) {
|
||||||
let buffer = Buffer()
|
let buffer = Buffer()
|
||||||
@ -3468,6 +3504,26 @@ public extension Api.functions.channels {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public extension Api.functions.channels {
|
||||||
|
static func reorderProfileTabs(channel: Api.InputChannel, order: [Api.ProfileTab]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.Bool>) {
|
||||||
|
let buffer = Buffer()
|
||||||
|
buffer.appendInt32(-1631808998)
|
||||||
|
channel.serialize(buffer, true)
|
||||||
|
buffer.appendInt32(481674261)
|
||||||
|
buffer.appendInt32(Int32(order.count))
|
||||||
|
for item in order {
|
||||||
|
item.serialize(buffer, true)
|
||||||
|
}
|
||||||
|
return (FunctionDescription(name: "channels.reorderProfileTabs", parameters: [("channel", String(describing: channel)), ("order", String(describing: order))]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Bool? in
|
||||||
|
let reader = BufferReader(buffer)
|
||||||
|
var result: Api.Bool?
|
||||||
|
if let signature = reader.readInt32() {
|
||||||
|
result = Api.parse(reader, signature: signature) as? Api.Bool
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
public extension Api.functions.channels {
|
public extension Api.functions.channels {
|
||||||
static func reorderUsernames(channel: Api.InputChannel, order: [String]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.Bool>) {
|
static func reorderUsernames(channel: Api.InputChannel, order: [String]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.Bool>) {
|
||||||
let buffer = Buffer()
|
let buffer = Buffer()
|
||||||
@ -12242,6 +12298,24 @@ public extension Api.functions.users {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public extension Api.functions.users {
|
||||||
|
static func getSavedMusic(id: Api.InputUser, offset: Int32, limit: Int32, hash: Int64) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.users.SavedMusic>) {
|
||||||
|
let buffer = Buffer()
|
||||||
|
buffer.appendInt32(2022539235)
|
||||||
|
id.serialize(buffer, true)
|
||||||
|
serializeInt32(offset, buffer: buffer, boxed: false)
|
||||||
|
serializeInt32(limit, buffer: buffer, boxed: false)
|
||||||
|
serializeInt64(hash, buffer: buffer, boxed: false)
|
||||||
|
return (FunctionDescription(name: "users.getSavedMusic", parameters: [("id", String(describing: id)), ("offset", String(describing: offset)), ("limit", String(describing: limit)), ("hash", String(describing: hash))]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.users.SavedMusic? in
|
||||||
|
let reader = BufferReader(buffer)
|
||||||
|
var result: Api.users.SavedMusic?
|
||||||
|
if let signature = reader.readInt32() {
|
||||||
|
result = Api.parse(reader, signature: signature) as? Api.users.SavedMusic
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
public extension Api.functions.users {
|
public extension Api.functions.users {
|
||||||
static func getUsers(id: [Api.InputUser]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.User]>) {
|
static func getUsers(id: [Api.InputUser]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<[Api.User]>) {
|
||||||
let buffer = Buffer()
|
let buffer = Buffer()
|
||||||
|
@ -952,14 +952,14 @@ public extension Api {
|
|||||||
}
|
}
|
||||||
public extension Api {
|
public extension Api {
|
||||||
enum ChatFull: TypeConstructorDescription {
|
enum ChatFull: TypeConstructorDescription {
|
||||||
case channelFull(flags: Int32, flags2: Int32, id: Int64, about: String, participantsCount: Int32?, adminsCount: Int32?, kickedCount: Int32?, bannedCount: Int32?, onlineCount: Int32?, readInboxMaxId: Int32, readOutboxMaxId: Int32, unreadCount: Int32, chatPhoto: Api.Photo, notifySettings: Api.PeerNotifySettings, exportedInvite: Api.ExportedChatInvite?, botInfo: [Api.BotInfo], migratedFromChatId: Int64?, migratedFromMaxId: Int32?, pinnedMsgId: Int32?, stickerset: Api.StickerSet?, availableMinId: Int32?, folderId: Int32?, linkedChatId: Int64?, location: Api.ChannelLocation?, slowmodeSeconds: Int32?, slowmodeNextSendDate: Int32?, statsDc: Int32?, pts: Int32, call: Api.InputGroupCall?, ttlPeriod: Int32?, pendingSuggestions: [String]?, groupcallDefaultJoinAs: Api.Peer?, themeEmoticon: String?, requestsPending: Int32?, recentRequesters: [Int64]?, defaultSendAs: Api.Peer?, availableReactions: Api.ChatReactions?, reactionsLimit: Int32?, stories: Api.PeerStories?, wallpaper: Api.WallPaper?, boostsApplied: Int32?, boostsUnrestrict: Int32?, emojiset: Api.StickerSet?, botVerification: Api.BotVerification?, stargiftsCount: Int32?, sendPaidMessagesStars: Int64?)
|
case channelFull(flags: Int32, flags2: Int32, id: Int64, about: String, participantsCount: Int32?, adminsCount: Int32?, kickedCount: Int32?, bannedCount: Int32?, onlineCount: Int32?, readInboxMaxId: Int32, readOutboxMaxId: Int32, unreadCount: Int32, chatPhoto: Api.Photo, notifySettings: Api.PeerNotifySettings, exportedInvite: Api.ExportedChatInvite?, botInfo: [Api.BotInfo], migratedFromChatId: Int64?, migratedFromMaxId: Int32?, pinnedMsgId: Int32?, stickerset: Api.StickerSet?, availableMinId: Int32?, folderId: Int32?, linkedChatId: Int64?, location: Api.ChannelLocation?, slowmodeSeconds: Int32?, slowmodeNextSendDate: Int32?, statsDc: Int32?, pts: Int32, call: Api.InputGroupCall?, ttlPeriod: Int32?, pendingSuggestions: [String]?, groupcallDefaultJoinAs: Api.Peer?, themeEmoticon: String?, requestsPending: Int32?, recentRequesters: [Int64]?, defaultSendAs: Api.Peer?, availableReactions: Api.ChatReactions?, reactionsLimit: Int32?, stories: Api.PeerStories?, wallpaper: Api.WallPaper?, boostsApplied: Int32?, boostsUnrestrict: Int32?, emojiset: Api.StickerSet?, botVerification: Api.BotVerification?, stargiftsCount: Int32?, sendPaidMessagesStars: Int64?, tabsOrder: [Api.ProfileTab]?)
|
||||||
case chatFull(flags: Int32, id: Int64, about: String, participants: Api.ChatParticipants, chatPhoto: Api.Photo?, notifySettings: Api.PeerNotifySettings, exportedInvite: Api.ExportedChatInvite?, botInfo: [Api.BotInfo]?, pinnedMsgId: Int32?, folderId: Int32?, call: Api.InputGroupCall?, ttlPeriod: Int32?, groupcallDefaultJoinAs: Api.Peer?, themeEmoticon: String?, requestsPending: Int32?, recentRequesters: [Int64]?, availableReactions: Api.ChatReactions?, reactionsLimit: Int32?)
|
case chatFull(flags: Int32, id: Int64, about: String, participants: Api.ChatParticipants, chatPhoto: Api.Photo?, notifySettings: Api.PeerNotifySettings, exportedInvite: Api.ExportedChatInvite?, botInfo: [Api.BotInfo]?, pinnedMsgId: Int32?, folderId: Int32?, call: Api.InputGroupCall?, ttlPeriod: Int32?, groupcallDefaultJoinAs: Api.Peer?, themeEmoticon: String?, requestsPending: Int32?, recentRequesters: [Int64]?, availableReactions: Api.ChatReactions?, reactionsLimit: Int32?)
|
||||||
|
|
||||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||||
switch self {
|
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, let reactionsLimit, let stories, let wallpaper, let boostsApplied, let boostsUnrestrict, let emojiset, let botVerification, let stargiftsCount, let sendPaidMessagesStars):
|
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, let reactionsLimit, let stories, let wallpaper, let boostsApplied, let boostsUnrestrict, let emojiset, let botVerification, let stargiftsCount, let sendPaidMessagesStars, let tabsOrder):
|
||||||
if boxed {
|
if boxed {
|
||||||
buffer.appendInt32(-529258018)
|
buffer.appendInt32(-1705864337)
|
||||||
}
|
}
|
||||||
serializeInt32(flags, buffer: buffer, boxed: false)
|
serializeInt32(flags, buffer: buffer, boxed: false)
|
||||||
serializeInt32(flags2, buffer: buffer, boxed: false)
|
serializeInt32(flags2, buffer: buffer, boxed: false)
|
||||||
@ -1019,6 +1019,11 @@ public extension Api {
|
|||||||
if Int(flags2) & Int(1 << 17) != 0 {botVerification!.serialize(buffer, true)}
|
if Int(flags2) & Int(1 << 17) != 0 {botVerification!.serialize(buffer, true)}
|
||||||
if Int(flags2) & Int(1 << 18) != 0 {serializeInt32(stargiftsCount!, buffer: buffer, boxed: false)}
|
if Int(flags2) & Int(1 << 18) != 0 {serializeInt32(stargiftsCount!, buffer: buffer, boxed: false)}
|
||||||
if Int(flags2) & Int(1 << 21) != 0 {serializeInt64(sendPaidMessagesStars!, buffer: buffer, boxed: false)}
|
if Int(flags2) & Int(1 << 21) != 0 {serializeInt64(sendPaidMessagesStars!, buffer: buffer, boxed: false)}
|
||||||
|
if Int(flags2) & Int(1 << 22) != 0 {buffer.appendInt32(481674261)
|
||||||
|
buffer.appendInt32(Int32(tabsOrder!.count))
|
||||||
|
for item in tabsOrder! {
|
||||||
|
item.serialize(buffer, true)
|
||||||
|
}}
|
||||||
break
|
break
|
||||||
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, let reactionsLimit):
|
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, let reactionsLimit):
|
||||||
if boxed {
|
if boxed {
|
||||||
@ -1056,8 +1061,8 @@ public extension Api {
|
|||||||
|
|
||||||
public func descriptionFields() -> (String, [(String, Any)]) {
|
public func descriptionFields() -> (String, [(String, Any)]) {
|
||||||
switch self {
|
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, let reactionsLimit, let stories, let wallpaper, let boostsApplied, let boostsUnrestrict, let emojiset, let botVerification, let stargiftsCount, let sendPaidMessagesStars):
|
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, let reactionsLimit, let stories, let wallpaper, let boostsApplied, let boostsUnrestrict, let emojiset, let botVerification, let stargiftsCount, let sendPaidMessagesStars, let tabsOrder):
|
||||||
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), ("reactionsLimit", reactionsLimit as Any), ("stories", stories as Any), ("wallpaper", wallpaper as Any), ("boostsApplied", boostsApplied as Any), ("boostsUnrestrict", boostsUnrestrict as Any), ("emojiset", emojiset as Any), ("botVerification", botVerification as Any), ("stargiftsCount", stargiftsCount as Any), ("sendPaidMessagesStars", sendPaidMessagesStars as Any)])
|
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), ("reactionsLimit", reactionsLimit as Any), ("stories", stories as Any), ("wallpaper", wallpaper as Any), ("boostsApplied", boostsApplied as Any), ("boostsUnrestrict", boostsUnrestrict as Any), ("emojiset", emojiset as Any), ("botVerification", botVerification as Any), ("stargiftsCount", stargiftsCount as Any), ("sendPaidMessagesStars", sendPaidMessagesStars as Any), ("tabsOrder", tabsOrder 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, let reactionsLimit):
|
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, let reactionsLimit):
|
||||||
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), ("reactionsLimit", reactionsLimit as Any)])
|
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), ("reactionsLimit", reactionsLimit as Any)])
|
||||||
}
|
}
|
||||||
@ -1188,6 +1193,10 @@ public extension Api {
|
|||||||
if Int(_2!) & Int(1 << 18) != 0 {_45 = reader.readInt32() }
|
if Int(_2!) & Int(1 << 18) != 0 {_45 = reader.readInt32() }
|
||||||
var _46: Int64?
|
var _46: Int64?
|
||||||
if Int(_2!) & Int(1 << 21) != 0 {_46 = reader.readInt64() }
|
if Int(_2!) & Int(1 << 21) != 0 {_46 = reader.readInt64() }
|
||||||
|
var _47: [Api.ProfileTab]?
|
||||||
|
if Int(_2!) & Int(1 << 22) != 0 {if let _ = reader.readInt32() {
|
||||||
|
_47 = Api.parseVector(reader, elementSignature: 0, elementType: Api.ProfileTab.self)
|
||||||
|
} }
|
||||||
let _c1 = _1 != nil
|
let _c1 = _1 != nil
|
||||||
let _c2 = _2 != nil
|
let _c2 = _2 != nil
|
||||||
let _c3 = _3 != nil
|
let _c3 = _3 != nil
|
||||||
@ -1234,8 +1243,9 @@ public extension Api {
|
|||||||
let _c44 = (Int(_2!) & Int(1 << 17) == 0) || _44 != nil
|
let _c44 = (Int(_2!) & Int(1 << 17) == 0) || _44 != nil
|
||||||
let _c45 = (Int(_2!) & Int(1 << 18) == 0) || _45 != nil
|
let _c45 = (Int(_2!) & Int(1 << 18) == 0) || _45 != nil
|
||||||
let _c46 = (Int(_2!) & Int(1 << 21) == 0) || _46 != nil
|
let _c46 = (Int(_2!) & Int(1 << 21) == 0) || _46 != nil
|
||||||
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 && _c20 && _c21 && _c22 && _c23 && _c24 && _c25 && _c26 && _c27 && _c28 && _c29 && _c30 && _c31 && _c32 && _c33 && _c34 && _c35 && _c36 && _c37 && _c38 && _c39 && _c40 && _c41 && _c42 && _c43 && _c44 && _c45 && _c46 {
|
let _c47 = (Int(_2!) & Int(1 << 22) == 0) || _47 != nil
|
||||||
return Api.ChatFull.channelFull(flags: _1!, flags2: _2!, id: _3!, about: _4!, participantsCount: _5, adminsCount: _6, kickedCount: _7, bannedCount: _8, onlineCount: _9, readInboxMaxId: _10!, readOutboxMaxId: _11!, unreadCount: _12!, chatPhoto: _13!, notifySettings: _14!, exportedInvite: _15, botInfo: _16!, migratedFromChatId: _17, migratedFromMaxId: _18, pinnedMsgId: _19, stickerset: _20, availableMinId: _21, folderId: _22, linkedChatId: _23, location: _24, slowmodeSeconds: _25, slowmodeNextSendDate: _26, statsDc: _27, pts: _28!, call: _29, ttlPeriod: _30, pendingSuggestions: _31, groupcallDefaultJoinAs: _32, themeEmoticon: _33, requestsPending: _34, recentRequesters: _35, defaultSendAs: _36, availableReactions: _37, reactionsLimit: _38, stories: _39, wallpaper: _40, boostsApplied: _41, boostsUnrestrict: _42, emojiset: _43, botVerification: _44, stargiftsCount: _45, sendPaidMessagesStars: _46)
|
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 && _c8 && _c9 && _c10 && _c11 && _c12 && _c13 && _c14 && _c15 && _c16 && _c17 && _c18 && _c19 && _c20 && _c21 && _c22 && _c23 && _c24 && _c25 && _c26 && _c27 && _c28 && _c29 && _c30 && _c31 && _c32 && _c33 && _c34 && _c35 && _c36 && _c37 && _c38 && _c39 && _c40 && _c41 && _c42 && _c43 && _c44 && _c45 && _c46 && _c47 {
|
||||||
|
return Api.ChatFull.channelFull(flags: _1!, flags2: _2!, id: _3!, about: _4!, participantsCount: _5, adminsCount: _6, kickedCount: _7, bannedCount: _8, onlineCount: _9, readInboxMaxId: _10!, readOutboxMaxId: _11!, unreadCount: _12!, chatPhoto: _13!, notifySettings: _14!, exportedInvite: _15, botInfo: _16!, migratedFromChatId: _17, migratedFromMaxId: _18, pinnedMsgId: _19, stickerset: _20, availableMinId: _21, folderId: _22, linkedChatId: _23, location: _24, slowmodeSeconds: _25, slowmodeNextSendDate: _26, statsDc: _27, pts: _28!, call: _29, ttlPeriod: _30, pendingSuggestions: _31, groupcallDefaultJoinAs: _32, themeEmoticon: _33, requestsPending: _34, recentRequesters: _35, defaultSendAs: _36, availableReactions: _37, reactionsLimit: _38, stories: _39, wallpaper: _40, boostsApplied: _41, boostsUnrestrict: _42, emojiset: _43, botVerification: _44, stargiftsCount: _45, sendPaidMessagesStars: _46, tabsOrder: _47)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return nil
|
return nil
|
||||||
|
@ -144,6 +144,8 @@ extension PeerInputActivity {
|
|||||||
}
|
}
|
||||||
case let .sendMessageEmojiInteractionSeen(emoticon):
|
case let .sendMessageEmojiInteractionSeen(emoticon):
|
||||||
self = .seeingEmojiInteraction(emoticon: emoticon)
|
self = .seeingEmojiInteraction(emoticon: emoticon)
|
||||||
|
case .sendMessageTextDraftAction:
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -265,7 +265,7 @@ func _internal_fetchAndUpdateCachedPeerData(accountPeerId: PeerId, peerId rawPee
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch fullUser {
|
switch fullUser {
|
||||||
case let .userFull(_, _, _, _, _, _, _, _, userFullNotifySettings, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _):
|
case let .userFull(_, _, _, _, _, _, _, _, userFullNotifySettings, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _):
|
||||||
updatePeers(transaction: transaction, accountPeerId: accountPeerId, peers: parsedPeers)
|
updatePeers(transaction: transaction, accountPeerId: accountPeerId, peers: parsedPeers)
|
||||||
transaction.updateCurrentPeerNotificationSettings([peerId: TelegramPeerNotificationSettings(apiSettings: userFullNotifySettings)])
|
transaction.updateCurrentPeerNotificationSettings([peerId: TelegramPeerNotificationSettings(apiSettings: userFullNotifySettings)])
|
||||||
}
|
}
|
||||||
@ -277,7 +277,7 @@ func _internal_fetchAndUpdateCachedPeerData(accountPeerId: PeerId, peerId rawPee
|
|||||||
previous = CachedUserData()
|
previous = CachedUserData()
|
||||||
}
|
}
|
||||||
switch fullUser {
|
switch fullUser {
|
||||||
case let .userFull(userFullFlags, userFullFlags2, _, userFullAbout, userFullSettings, personalPhoto, profilePhoto, fallbackPhoto, _, userFullBotInfo, userFullPinnedMsgId, userFullCommonChatsCount, _, userFullTtlPeriod, userFullThemeEmoticon, _, groupAdminRights, channelAdminRights, userWallpaper, _, businessWorkHours, businessLocation, greetingMessage, awayMessage, businessIntro, birthday, personalChannelId, personalChannelMessage, starGiftsCount, starRefProgram, verification, sendPaidMessageStars, disallowedStarGifts, starsRating, starsMyPendingRating, starsMyPendingRatingDate, linkedBotChannelId):
|
case let .userFull(userFullFlags, userFullFlags2, _, userFullAbout, userFullSettings, personalPhoto, profilePhoto, fallbackPhoto, _, userFullBotInfo, userFullPinnedMsgId, userFullCommonChatsCount, _, userFullTtlPeriod, userFullThemeEmoticon, _, groupAdminRights, channelAdminRights, userWallpaper, _, businessWorkHours, businessLocation, greetingMessage, awayMessage, businessIntro, birthday, personalChannelId, personalChannelMessage, starGiftsCount, starRefProgram, verification, sendPaidMessageStars, disallowedStarGifts, starsRating, starsMyPendingRating, starsMyPendingRatingDate, linkedBotChannelId, _, _):
|
||||||
let botInfo = userFullBotInfo.flatMap(BotInfo.init(apiBotInfo:))
|
let botInfo = userFullBotInfo.flatMap(BotInfo.init(apiBotInfo:))
|
||||||
let isBlocked = (userFullFlags & (1 << 0)) != 0
|
let isBlocked = (userFullFlags & (1 << 0)) != 0
|
||||||
let voiceCallsAvailable = (userFullFlags & (1 << 4)) != 0
|
let voiceCallsAvailable = (userFullFlags & (1 << 4)) != 0
|
||||||
@ -630,14 +630,14 @@ func _internal_fetchAndUpdateCachedPeerData(accountPeerId: PeerId, peerId rawPee
|
|||||||
switch result {
|
switch result {
|
||||||
case let .chatFull(fullChat, chats, users):
|
case let .chatFull(fullChat, chats, users):
|
||||||
switch fullChat {
|
switch fullChat {
|
||||||
case let .channelFull(_, _, _, _, _, _, _, _, _, _, _, _, _, notifySettings, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _):
|
case let .channelFull(_, _, _, _, _, _, _, _, _, _, _, _, _, notifySettings, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _):
|
||||||
transaction.updateCurrentPeerNotificationSettings([peerId: TelegramPeerNotificationSettings(apiSettings: notifySettings)])
|
transaction.updateCurrentPeerNotificationSettings([peerId: TelegramPeerNotificationSettings(apiSettings: notifySettings)])
|
||||||
case .chatFull:
|
case .chatFull:
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
switch fullChat {
|
switch fullChat {
|
||||||
case let .channelFull(flags, flags2, _, about, participantsCount, adminsCount, kickedCount, bannedCount, _, _, _, _, chatPhoto, _, apiExportedInvite, apiBotInfos, migratedFromChatId, migratedFromMaxId, pinnedMsgId, stickerSet, minAvailableMsgId, _, linkedChatId, location, slowmodeSeconds, slowmodeNextSendDate, statsDc, _, inputCall, ttl, pendingSuggestions, groupcallDefaultJoinAs, themeEmoticon, requestsPending, _, defaultSendAs, allowedReactions, reactionsLimit, _, wallpaper, appliedBoosts, boostsUnrestrict, emojiSet, verification, starGiftsCount, sendPaidMessageStars):
|
case let .channelFull(flags, flags2, _, about, participantsCount, adminsCount, kickedCount, bannedCount, _, _, _, _, chatPhoto, _, apiExportedInvite, apiBotInfos, migratedFromChatId, migratedFromMaxId, pinnedMsgId, stickerSet, minAvailableMsgId, _, linkedChatId, location, slowmodeSeconds, slowmodeNextSendDate, statsDc, _, inputCall, ttl, pendingSuggestions, groupcallDefaultJoinAs, themeEmoticon, requestsPending, _, defaultSendAs, allowedReactions, reactionsLimit, _, wallpaper, appliedBoosts, boostsUnrestrict, emojiSet, verification, starGiftsCount, sendPaidMessageStars, _):
|
||||||
var channelFlags = CachedChannelFlags()
|
var channelFlags = CachedChannelFlags()
|
||||||
if (flags & (1 << 3)) != 0 {
|
if (flags & (1 << 3)) != 0 {
|
||||||
channelFlags.insert(.canDisplayParticipants)
|
channelFlags.insert(.canDisplayParticipants)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user